Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Shortcut: /, ⌘K or Ctrl+K

API versioning

Pin the Messaging and Platform API contract date and handle version warnings and errors.

View as Markdown

Messaging and Platform API requests accept a date version in the Polymorfa-Version header:

HTTP
Polymorfa-Version: 2026-09-22

The current and minimum version is 2026-09-22. When the header is omitted, the API uses the current version. The resolved value is echoed in the response as Polymorfa-Version.

This revision uses whatsapp_ids for native message provider references in responses and events. Read linked_devices, official_api, or both from that object; use the stable Polymorfa id for message actions. Native message responses and webhooks also carry the earlier whatsapp_id field during the migration window. New integrations should read whatsapp_ids; existing integrations can migrate without losing their provider reference.

Connection contract#

The Connection contract uses connections for account resources, scopes and events. Update API paths, fields and event filters together. A Connection has type: "whatsapp" and one scalar method: linked_device, cloud_api or hybrid. Hybrid is one Connection and is billed once. There is no public methods[] collection on a Connection.

Keep the public connectionId as opaque text. It is separate from the phone's phoneNumberId and its actual phone number. Preserve existing identifier values. Use QuickLink to create Connections; direct account creation is retired.

This terminology change does not advance Polymorfa-Version. There are no old account aliases, redirects or compatibility period. Match your client to the API contract available in your environment before updating an integration.

Current request#

Shell
curl "https://api.polymorfa.com/platform/connections" \
  -H "Authorization: Bearer $POLYMORFA_KEY" \
  -H "Polymorfa-Version: 2026-09-22"

Versions below the minimum#

A version earlier than the configured minimum returns 400 before the route handler runs. This includes the retired 2026-03-20; remove the header or send 2026-09-22. The response includes a Link header with rel="deprecation" that points to the migration guidance:

HTTP
Link: <migration URL>; rel="deprecation"

When a version has a recorded deprecation time, the response also includes a Deprecation header carrying that time as Unix seconds, as defined in RFC 9745, for example Deprecation: @1767225600. Without a recorded time, the response has no Deprecation header.

JSON
{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_parameter",
    "message": "API version 2025-01-01 is no longer supported. Minimum: 2026-09-22",
    "param": "Polymorfa-Version"
  },
  "data": null,
  "docs": "https://docs.polymorfa.com/api/errors#invalid-parameter"
}

The Link header points to version guidance. The docs field links to the error's recovery steps.

Malformed dates, including impossible calendar dates, return 400 with error.code: invalid_parameter and error.param: Polymorfa-Version.

Versions newer than the current contract#

A date later than 2026-09-22 returns 400 with error.code: invalid_parameter and error.param: Polymorfa-Version before the request runs. Remove the header or send 2026-09-22.

Older supported versions#

When a configured version is older than the current version but still meets the minimum, the request continues and can include:

  • Sunset when a sunset date is configured;
  • Polymorfa-Deprecation-Warning; and
  • a Link with rel="sunset".

Graph API versions#

Graph requires a Meta-style version segment in the URL:

Text
https://api.polymorfa.com/graph/whatsapp/v26.0

The segment must match vNN.0; the examples use v26.0. Polymorfa forwards the URL version for operations it sends to Meta, so use a version Meta still supports there. The Graph API version picker in the API reference lists those versions and rewrites the samples on the page. Changing the version does not change the behavior of Polymorfa's media, phone-number, or business-profile methods, or Linked Device operations. Polymorfa-Version does not apply to Graph requests, for either connection method.

On Graph reference pages, use the version picker in the sidebar to change the version in the displayed cURL URLs. A non-default choice is kept in the page's ?version= parameter and in your browser, so a shared page link keeps the choice. The picker changes examples, not the requests your application sends: set the version explicitly in those request URLs.

Graph reference pages show cURL samples, without the SDK language selector or Test key control. See Authentication for the credential your request needs.

API paths#

APIBase pathVersion selector
Messaging/messaging/Polymorfa-Version
Platform/platform/Polymorfa-Version
Graph/graph/whatsapp/vNN.0/Version in the URL