API reference
Every operation of Meta's v23.0 specification is routed and validated. Real behavior means the mock simulates it with state; the others answer with Meta's own example, valid against the response schema.
Conventions
- Base URL:
http://localhost:3010/v23.0, the same path Meta uses. - Authentication:
Authorization: Bearer <any token>. A call without one is refused, as Meta does. - Errors: Meta's envelope,
{"error":{"message","type":"OAuthException","code","error_data","fbtrace_id"}}, with Meta's codes. - Webhooks: Meta's
entry[].changes[]body, signed withx-hub-signature-256whenWEBHOOK_SECRETis set. - Versions: each Graph version is its own vendored spec; a new one is a new
spec/<version>folder.
The panel's API tab carries the same operations with a ready curl for each.
The v23.0 operations
Open an operation for its parameters, the request examples of Meta's specification and every response with its example, errors included.
Test headers
What only a test needs travels in optional headers, never in the body, so the body stays what the Cloud API expects.
| Header | On | What it does |
|---|---|---|
X-Mock-From | POST /{phone}/messages, /calls | The call comes from the user's phone: a message, a receipt, a call |
X-Mock-Contact-Name | same | The profile name your webhook sees |
X-Mock-Message-Status | a receipt with X-Mock-From | delivered, read or failed |
X-Mock-Template-Review | template create and edit | APPROVED (default), REJECTED, PAUSED, DISABLED, PENDING |
X-Mock-Template-Review-Reason | same | The reason in the status webhook |
X-Mock-Template-Review-Delay | same | How long the review takes, in ms (up to 10 minutes) |
X-Mock-Skip-Callback-Verification | webhook override | Accept the URL without the hub.challenge check |
The /settings routes
Only for what Meta has no endpoint for: the mock's own knobs (delivery mode, webhook delay), the event log, every conversation, the account tree with the code a number waits for, and the calls. Open a route for what it takes and what it answers: every answer below, errors included, was captured from a run of the image.