Skip to main content
POST
https://api.trillet.ai
/
v1
/
api
/
meta-lead
/
configure
/
{flowId}
Configure Meta Lead Ads
curl --request POST \
  --url https://api.trillet.ai/v1/api/meta-lead/configure/{flowId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "clientId": "<string>",
  "clientSecret": "<string>",
  "userAccessToken": "<string>",
  "callDelaySeconds": 123,
  "selectedPages": [
    {
      "pageId": "<string>",
      "forms": [
        {}
      ]
    }
  ]
}
'
{
  "success": true,
  "webhookRegistered": true
}

Headers

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Path Parameters

flowId
string
required
The call flow ID to configure Meta Lead Ads for.

Request Body

clientId
string
required
Meta App client ID.
clientSecret
string
required
Meta App client secret.
userAccessToken
string
required
Meta user access token from the OAuth flow.
callDelaySeconds
number
default:"0"
Delay in seconds before calling a new lead.
selectedPages
array
required
Array of Facebook pages and lead forms to monitor.

Response Fields

success
boolean
Whether the configuration was successful.
webhookRegistered
boolean
Whether the webhook was successfully registered with Meta.
{
  "success": true,
  "webhookRegistered": true
}