Skip to content

Create an embedded signup session

POST /api/embed/sessions

Returns a single-use URL to embed in an iframe. The token in clear text is shown only once. When the channel is connected, Neike notifies by webhook (channel.connected) and the result is available through GET of the session.

FieldTypeDescription
allowed_originsstring[]requiredOrigins allowed to embed the iframe. They feed the frame-ancestors of the CSP and the targetOrigin of the result postMessage. Example: ["https://app.tu-dominio.com"].
platformswhatsapp · instagram · facebook[]optionalChannels offered inside the iframe. Default: ["whatsapp"].
external_refstringoptionalBusiness id in the client’s system. It comes back unchanged in the webhook and in the result, to correlate the channel with its tenant. Example: "tenant_8842".
ttl_minutesnumberoptionalValidity of the session in minutes. Default: 30.
prefillobjectoptionalBusiness data the client already knows; they prefill Meta’s form (business.name, business.email, business.website, phone.displayName, phone.category). Example: {"business":{"name":"Café Central","email":"[email protected]"}}.
StatusDescriptionSchema
201——
Terminal window
curl -X POST https://api.neike.dev/api/embed/sessions \
-H "x-neike-api-key: whk_live_…" \
-H "Content-Type: application/json" \
-d '{
"allowed_origins": [
"https://app.tu-dominio.com"
]
}'