Skip to content
Shortcut: /, ⌘K or Ctrl+K

Templates

View as Markdown

The message template object

Attributes

  • idstringrequired

    Identifier for this resource.

  • namestringrequired

    Human-readable name for this resource.

  • languagestringrequired

    Language or locale code used for this content.

  • categorystringrequired

    Specifies category for this graph graph message template.

  • statusstringrequired

    Current status of this resource or operation.

  • componentsarray of anyrequirednullable items

    Structured components that make up this message or template.

  • quality_scoreobject

    Structured quality score values for this graph graph message template.

    Show 1 child field
  • rejected_reasonstringnullable

    Specifies rejected reason for this graph graph message template.

  • previous_categorystringnullable

    Specifies previous category for this graph graph message template.

The message template object
{
  "id": "string",
  "name": "string",
  "language": "string",
  "category": "string",
  "status": "string",
  "components": [
    null
  ],
  "quality_score": {
    "score": "string"
  },
  "rejected_reason": "string",
  "previous_category": "string"
}

Create message template

POST/graph/whatsapp/{version}/{wabaId}/message_templatesGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
messages:write

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • wabaIdstringrequired

    Identifier for the waba.

Headers

  • Idempotency-Keystringmin length1

    Optional key of 1 to 255 UTF-8 bytes, retained for 24 hours. Reuse it for the same request after an uncertain outcome; a completed request is not sent again.

Body

  • namestringrequired

    Human-readable name for this resource.

  • languagestringrequired

    Language or locale code used for this content.

  • categorystringrequired

    Specifies category for this graph graph create message template request.

    Allowed valuesUTILITYMARKETINGAUTHENTICATION
  • allow_category_changeboolean

    Whether allow category change.

  • componentsarray of anyrequiredmax items1000nullable items

    Structured components that make up this message or template.

Responses

  • 200Template submitted
    • idstringrequired

      Identifier for this resource.

    • statusstringrequired

      Current status of this resource or operation.

    • categorystringrequired

      Specifies category for this graph graph create message template response.

    Show 3 headers
  • 400Bad request
  • 401Unauthenticated
  • 403Permission error
  • 404Object does not exist
  • 409Idempotency key completed, in progress, has an unknown outcome, or was reused for a different request
  • 429Rate limited
  • 500Internal error
  • 502Provider response unavailable or malformed; the write outcome may be unknown
  • 503Provider unavailable or pre-dispatch reservation failed; use the stable error code to distinguish an unknown outcome from a proven no-attempt refusal
POST /graph/whatsapp/{version}/{wabaId}/message_templatescURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<wabaId>/message_templates" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "order_update",
  "language": "en_US",
  "category": "UTILITY",
  "components": [
    null
  ]
}'
Response
{
  "id": "string",
  "status": "string",
  "category": "string"
}

List message templates

GET/graph/whatsapp/{version}/{wabaId}/message_templatesGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
messages:write

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • wabaIdstringrequired

    Identifier for the waba.

Responses

GET /graph/whatsapp/{version}/{wabaId}/message_templatescURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<wabaId>/message_templates" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "language": "string",
      "category": "string",
      "status": "string",
      "components": [
        null
      ]
    }
  ],
  "paging": {
    "cursors": {
      "before": "string",
      "after": "string"
    }
  }
}

Delete message template

DELETE/graph/whatsapp/{version}/{wabaId}/message_templatesGraph APIMeta Cloud API
Base URL
https://api.polymorfa.com
Required permission
messages:write

A successful response confirms provider deletion. A later complete catalog read reconciles any stored template copies that could not be removed during the delete request.

Path parameters

  • versionstringrequired

    Specifies version for this path parameter.

  • wabaIdstringrequired

    Identifier for the waba.

Query parameters

  • namestring

    Human-readable name for this resource.

Headers

  • Idempotency-Keystringmin length1

    Optional key of 1 to 255 UTF-8 bytes, retained for 24 hours. Reuse it for the same request after an uncertain outcome; a completed request is not sent again.

Responses

DELETE /graph/whatsapp/{version}/{wabaId}/message_templatescURL

Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.

curl -X DELETE "https://api.polymorfa.com/graph/whatsapp/v26.0/<wabaId>/message_templates" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "success": true
}