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 with x-hub-signature-256 when WEBHOOK_SECRET is 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.

HeaderOnWhat it does
X-Mock-FromPOST /{phone}/messages, /callsThe call comes from the user's phone: a message, a receipt, a call
X-Mock-Contact-NamesameThe profile name your webhook sees
X-Mock-Message-Statusa receipt with X-Mock-Fromdelivered, read or failed
X-Mock-Template-Reviewtemplate create and editAPPROVED (default), REJECTED, PAUSED, DISABLED, PENDING
X-Mock-Template-Review-ReasonsameThe reason in the status webhook
X-Mock-Template-Review-DelaysameHow long the review takes, in ms (up to 10 minutes)
X-Mock-Skip-Callback-Verificationwebhook overrideAccept 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.