API Reference
Facebook LoginGETLogin dialog
Lead Ads

Get a lead

GET/v27.0/{lead_id}
Base URL: https://meta-ads.mimicr.dev · provider: https://graph.facebook.com

Reads a lead. Default fields: created_time, id, ad_id, form_id, field_data. Requires leads_retrieval plus pages_manage_ads or ads_management (Page or user token).

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

lead_idstringrequired

ID of the lead.

Example: "100539998049737"

Query parameters

fieldsstring

Comma-separated fields to return, with Graph field expansion: a,b{c,d},e.limit(5). Without it, only id (and a few default fields on some nodes) is returned. An unknown field returns (#100) Tried accessing nonexisting field.

Responses

200OK.
idstring

ID of the object.

created_timestring<date-time>

Time the lead was submitted, ISO 8601 in UTC (+0000).

form_idstring

ID of the form the lead submitted.

field_dataobject[]

Answers of the form: [{name, values}].

ad_idstring

ID of the ad.

ad_namestring

Name of the ad.

adset_idstring

ID of the ad set.

adset_namestring

Name of the ad set.

campaign_idstring

ID of the campaign.

campaign_namestring

Name of the campaign.

is_organicboolean

Whether the lead came organically (no ad). Test leads are organic.

platformstring

Where the lead came from: fb or ig.

custom_disclaimer_responsesobject[]

Answers to custom disclaimer checkboxes.

partner_namestring

Name of the CRM partner, if any.

400Error in the Graph envelope.
errorobjectrequired
Show child attributes
messagestringrequired

Description of the error.

Example: "(#100) The parameter special_ad_categories is required"
typestringrequired

OAuthException for most codes (the Marketing API uses it for validation too), GraphMethodException for unknown objects, FacebookApiException for transient errors. In Mimicr, routes outside the integration core answer MimicrNotSimulated with HTTP 501.

Example: "OAuthException"
codeintegerrequired

Error code (100 invalid parameter, 190 invalid token, 200 permission, 2635 deprecated version, 613/17/80004 rate limits, …).

Example: 100
error_subcodeinteger

Error subcode with more detail (1885272 budget too low, 463 token expired, …).

Example: 1885272
is_transientboolean

Whether retrying the same request may succeed. Present on every Marketing API error; true for codes 1 and 2.

error_user_titlestring

Title of the error, to show to people.

error_user_msgstring

Message of the error, to show to people.

error_dataobject

Extra data. blame_field_specs lists the params that caused a validation error.

Show child attributes
blame_field_specsstring[][]
fbtrace_idstringrequired

Internal support identifier of the request.

Example: "AbCdEf12345"