Templates

Create a template

Create a new message template and submit it to Meta for review. The request body is components-only (mirrors Meta's message_templates create shape). For IMAGE/VIDEO/DOCUMENT headers, supply example.header_url with a public https:// URL — Kirimdev uploads the sample to Meta on your behalf — or a Meta asset handle in example.header_handle. On success the template is persisted with status: "pending"; Meta reviews asynchronously, so poll GET /{phone_number_id}/templates/{name} (or re-run POST .../templates/sync) for the eventual approved / rejected transition. A duplicate name+language pair returns 409 template_already_exists.

post/{phone_number_id}/templates

Request

  • Base URL: https://api.kirimdev.com/v1
  • URL: https://api.kirimdev.com/v1/{phone_number_id}/templates
  • Auth: HTTP bearer

Path parameters

phone_number_idstring required

Meta WhatsApp Business phone_number_id of the connected account that should send / own this resource. Discoverable via GET /v1/accounts (returned as phone_number_id on each row).

Example:106540352242922

Headers

Idempotency-Keystring

Optional retry key. Reusing the same key with the same method, path, and body within 24 hours returns the original response; reusing it for a different request returns 422.

Example:order-20260910-0001

Request body

namestring required
category'MARKETING' | 'UTILITY' | 'AUTHENTICATION' required
languagestring
variablesstring[]
messageSendTtlSecondsinteger

Example request

{
  "name": "order_confirmation",
  "category": "UTILITY",
  "language": "id"
}

Response

Template created (pending Meta review)

request_idstring required

Unique request identifier to include when contacting support.

Example response

{
  "data": {
    "id": "tmpl_01HXYZABCDEFGHJKMNPQRSTVWX",
    "category": "UTILITY",
    "whatsapp_account": {
      "phone_number_id": "106540352242922",
      "customer": {
        "id": "cus_01HXYZABCDEFGHJKMNPQRSTVWX"
      }
    }
  },
  "request_id": "req_01HXYZABCDEFGHJKMNPQRSTVWX"
}

Changes

No recorded changes to this operation across all 1 revision of this API.