API Reference
Create a lead form
/v27.0/{page_id}/leadgen_formshttps://meta-ads.mimicr.dev · provider: https://graph.facebook.comCreates a lead form on the Page. Needs a Page access token with pages_manage_ads.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Path parameters
ID of the Page.
"100539998049709"Body
application/x-www-form-urlencodedName of the form.
Questions (JSON array).
Show child attributes
FULL_NAME, FIRST_NAME, LAST_NAME, EMAIL, PHONE, CUSTOM, DATE_TIME, ID_CPF, STORE_LOOKUP, CITY, STATE, ZIP, …
Field name in field_data.
Question text; required for CUSTOM.
Choices {value, key}.
{url, link_text}. Required in Mimicr.
Show child attributes
URL after submission.
Locale of the form (pt_BR).
32 values
AR_ARCS_CZDA_DKDE_DEEL_GREN_GBEN_USES_ESES_LAFI_FIFR_FRHE_ILHI_INHU_HUID_IDIT_ITJA_JPKO_KRNB_NONL_NLPL_PLPT_BRPT_PTRO_RORU_RUSV_SETH_THTR_TRVI_VNZH_CNZH_HKZH_TWStored.
Stored.
Stored.
Stored.
v27.0: NOT_ENABLED, OTP_REQUIRED or OTP_OPTIONAL.
NOT_ENABLEDOTP_REQUIREDOTP_OPTIONALResponses
200OK.
ID of the new object.
400Error in the Graph envelope: 210 a Page access token is required, 100 invalid question.
Show child attributes
Description of the error.
"(#100) The parameter special_ad_categories is required"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.
"OAuthException"Error code (100 invalid parameter, 190 invalid token, 200 permission, 2635 deprecated version, 613/17/80004 rate limits, …).
100Error subcode with more detail (1885272 budget too low, 463 token expired, …).
1885272Whether retrying the same request may succeed. Present on every Marketing API error; true for codes 1 and 2.
Title of the error, to show to people.
Message of the error, to show to people.
Extra data. blame_field_specs lists the params that caused a validation error.
Show child attributes
Internal support identifier of the request.
"AbCdEf12345"