Facebook Lead Ads Subscriptions API

The Subscriptions API from Facebook Lead Ads — 1 operation(s) for subscriptions.

OpenAPI Specification

facebook-lead-ads-subscriptions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Meta Marketing API - Lead Ads Bulk Leads Subscriptions API
  description: 'Graph API endpoints for managing Facebook and Instagram lead

    generation forms, retrieving captured leads, downloading bulk lead

    exports, and configuring leadgen webhooks. Authentication uses a

    Page access token (OAuth 2.0 bearer) with the leads_retrieval,

    pages_show_list, and pages_manage_ads permissions granted by a Page

    admin.

    '
  version: v22.0
  contact:
    name: Meta for Developers
    url: https://developers.facebook.com/docs/marketing-api/guides/lead-ads/
servers:
- url: https://graph.facebook.com/v22.0
  description: Meta Graph API
security:
- PageAccessToken:
  - leads_retrieval
  - pages_show_list
  - pages_manage_ads
tags:
- name: Subscriptions
paths:
  /{app-id}/subscriptions:
    parameters:
    - name: app-id
      in: path
      required: true
      schema:
        type: string
    post:
      summary: Subscribe an app to leadgen webhook events
      operationId: subscribeAppWebhook
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - object
              - callback_url
              - fields
              - verify_token
              properties:
                object:
                  type: string
                  enum:
                  - page
                callback_url:
                  type: string
                  format: uri
                fields:
                  type: string
                  description: Comma-separated, must include "leadgen".
                verify_token:
                  type: string
      responses:
        '200':
          description: Subscription confirmed
      tags:
      - Subscriptions
components:
  securitySchemes:
    PageAccessToken:
      type: oauth2
      description: 'Page access token obtained via Facebook Login / Meta Business

        Login with leads_retrieval, pages_show_list, and

        pages_manage_ads permissions.

        '
      flows:
        authorizationCode:
          authorizationUrl: https://www.facebook.com/v22.0/dialog/oauth
          tokenUrl: https://graph.facebook.com/v22.0/oauth/access_token
          scopes:
            leads_retrieval: Read leads from lead ad forms
            pages_show_list: List Pages the user manages
            pages_manage_ads: Manage ads associated with a Page