Skip to main content

Get Lead

POST 

/facebook/page/getLead

This endpoint allows you to get the content of a Lead Ads lead: the answers a person gave in one of your Facebook Lead Ads forms.

You don't need it to receive your leads: the Facebook Lead webhook event already carries the lead's content. Get Lead stays available as an optional re-fetch — for example, for a lead event that arrived with leadFetched false.

Get Lead helps after a temporary failure of the automatic fetch (for example, Facebook did not answer in time). When the lead event arrived with leadFetched false because the connection's token expired or a permission is missing, Get Lead fails for the same reason (reason 10 or 11).

Settings:

SettingValue
URLhttps://api.99digital.co.il/facebook/page/getLead
MethodJSON via POST
HeaderYour API key for the service (the apiKey header)

Body:

ParameterDescription / ExampleMandatoryExample
fromThe ID you received for the connection (a Facebook Pages connection)yes463745743546345
leadgenIdThe lead ID: the leadgenId of the Facebook Lead webhook eventyes1293847560192837

Response:

{
"status": "OK",
"from": "463745743546345",
"leadgenId": "1293847560192837",
"lead": {
"id": "1293847560192837",
"created_time": "2026-11-25T08:30:00+0000",
"form_id": "918273645501928",
"is_organic": false,
"field_data": [
{ "name": "full_name", "values": ["Dana Cohen"] },
{ "name": "email", "values": ["dana@example.com"] },
{ "name": "phone_number", "values": ["+972501234567"] }
]
},
"reason": 1
}

Response-Explain:

ParameterDescription
statusOK or FAIL
fromYour ID for the service
leadgenIdThe lead ID you sent
leadThe lead, as Facebook returns it — see the table below

lead:

ValueInformation
idThe lead ID
created_timeWhen the form was submitted, as Facebook returns it: a date and time in UTC, for example 2026-11-25T08:30:00+0000 (not Unix time, unlike createdTime in the webhook event)
form_idThe ID of the Lead Ads form
is_organictrue - the lead came from organic reach. false - it came from an ad
field_dataThe answers: one name and values for each question. name is the question's key as Facebook sends it (for example full_name, email, phone_number, or the key of your own question). values is a list of texts: a multiple-choice question can have several

Other fields — ad_id, adset_id and campaign_id — are returned only when Meta provides them.

reason:

ValueInformation
1Not FAIL. The status is OK
2Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error
3Wrong apiKey (the apiKey header is missing or wrong)
4leadgenId is missing (or is not a valid lead ID)
6Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook Pages endpoint)
7The connection is not active (it was disabled)
10You must do the onboarding again, the connection has expired
11A permission is missing: the connection does not have Meta's permission for this action (reading leads)
12Rate limit error. Too many requests. Please wait a few minutes and try again
13The leadgenId is invalid or wrong: the lead was not found, or you have no access to it
15Meta rejected the request: an invalid parameter, or a policy violation
18General error, try again

Remarks:

  • Lead answers are personal data of the person who filled in the form. Store and protect them on your side accordingly.

Request​

Responses​

The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.