zumpo/docs
Dashboard
Skip to content
whatsapp / API reference
POSTcreateWhatsAppTemplate

Create a WhatsApp message template

Creates one bounded custom template or imports one pre-approved UTILITY template from Meta Template Library on the credential WABA. The request is dispatched once and is never retried automatically; an ambiguous result must be reconciled by exact name and language. Custom mode and library mode are mutually exclusive. Supported text and authentication copy-code components accept canonical Meta uppercase values and Zernio lowercase aliases. Media headers, carousel/LTO, custom URL or phone buttons, named parameters, and one-tap OTP remain deliberately unsupported.

Authentication

The following security requirement applies to this operation.

  1. bearerhttp

    scheme
    bearer
    bearerFormat
    zumpo-api-key
Read the authentication guide

Parameters

This operation declares no path, query, header or cookie parameters.

Request body

Required body
application/json
Bodyobjectrequired
#/components/schemas/WhatsAppTemplateCreateRequestDto
additionalProperties
false
required
[ "accountId", "name", "category", "language" ]
accountIdstringrequired

Connected Zumpo WhatsApp account id.

pattern
^[0-9a-f]{24}$
minLength
24
maxLength
24
namestringrequired
pattern
^[a-z][a-z0-9_]{0,511}$
minLength
1
maxLength
512
categorystringrequired
enum
[ "AUTHENTICATION", "MARKETING", "UTILITY" ]
languagestringrequired
enum
[ "af", "sq", "ar", "ar_EG", "ar_AE", "ar_LB", "ar_MA", "ar_QA", "az", "be_BY", "bn", "bn_IN", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "prs_AF", "nl", "nl_BE", "en", "en_GB", "en_US", "en_AE", "en_AU", "en_CA", "en_GH", "en_IE", "en_IN", "en_JM", "en_MY", "en_NZ", "en_QA", "en_SG", "en_UG", "en_ZA", "et", "fil", "fi", "fr", "fr_BE", "fr_CA", "fr_CH", "fr_CI", "fr_MA", "ka", "de", "de_AT", "de_CH", "el", "gu", "ha", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "rw_RW", "ko", "ky_KG", "lo", "lv", "lt", "mk", "ms", "ml", "mr", "nb", "ps_AF", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "si_LK", "sk", "sl", "es", "es_AR", "es_CL", "es_CO", "es_CR", "es_DO", "es_EC", "es_HN", "es_MX", "es_PA", "es_PE", "es_ES", "es_UY", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi", "zu" ]
componentsarray

Required only for custom templates. Canonical ordered custom-text components or the bounded authentication copy-code preset; omit when library_template_name is present.

minItems
1
maxItems
4
Array itemoneOf
oneOf / 1object
#/components/schemas/WhatsAppTemplateCreateTextHeaderDto
additionalProperties
false
required
[ "type", "format", "text" ]
typestringrequired
enum
[ "HEADER" ]
formatstringrequired
enum
[ "TEXT" ]
textstringrequired
minLength
1
maxLength
60
exampleobject
#/components/schemas/WhatsAppTemplateCreateHeaderExampleDto
additionalProperties
false
required
[ "header_text" ]
header_textarrayrequired
minItems
1
maxItems
1
Array itemstring
minLength
1
maxLength
128
oneOf / 2object
#/components/schemas/WhatsAppTemplateCreateTextBodyDto
additionalProperties
false
required
[ "type", "text" ]
typestringrequired
enum
[ "BODY" ]
textstringrequired
minLength
1
maxLength
1024
exampleobject
#/components/schemas/WhatsAppTemplateCreateBodyExampleDto
additionalProperties
false
required
[ "body_text" ]
body_textarrayrequired

One ordered example row whose values match the contiguous positional variables.

minItems
1
maxItems
1
Array itemarray
minItems
1
maxItems
32
Array itemstring
minLength
1
maxLength
128
oneOf / 3object
#/components/schemas/WhatsAppTemplateCreateTextFooterDto
additionalProperties
false
required
[ "type", "text" ]
typestringrequired
enum
[ "FOOTER" ]
textstringrequired
minLength
1
maxLength
60
oneOf / 4object
#/components/schemas/WhatsAppTemplateCreateTextButtonsDto
additionalProperties
false
required
[ "type", "buttons" ]
typestringrequired
enum
[ "BUTTONS" ]
buttonsarrayrequired
minItems
1
maxItems
10
Array itemobject
#/components/schemas/WhatsAppTemplateCreateQuickReplyButtonDto
additionalProperties
false
required
[ "type", "text" ]
typestringrequired
enum
[ "QUICK_REPLY" ]
textstringrequired
minLength
1
maxLength
25
oneOf / 5object
#/components/schemas/WhatsAppTemplateCreateAuthenticationBodyDto
additionalProperties
false
required
[ "type" ]
typestringrequired
enum
[ "BODY" ]
add_security_recommendationboolean
oneOf / 6object
#/components/schemas/WhatsAppTemplateCreateAuthenticationFooterDto
additionalProperties
false
required
[ "type", "code_expiration_minutes" ]
typestringrequired
enum
[ "FOOTER" ]
code_expiration_minutesnumberrequired
minimum
1
maximum
90
oneOf / 7object
#/components/schemas/WhatsAppTemplateCreateAuthenticationButtonsDto
additionalProperties
false
required
[ "type", "buttons" ]
typestringrequired
enum
[ "BUTTONS" ]
buttonsarrayrequired
minItems
1
maxItems
1
Array itemobject
#/components/schemas/WhatsAppTemplateCreateAuthenticationOtpButtonDto
additionalProperties
false
required
[ "type", "otp_type" ]
typestringrequired
enum
[ "OTP" ]
otp_typestringrequired
enum
[ "COPY_CODE" ]
textstring
minLength
1
maxLength
25
library_template_namestring

Exact Meta Template Library name. Selects library mode and is mutually exclusive with components; library imports require category UTILITY.

pattern
^[a-z0-9_]{1,512}$
minLength
1
maxLength
512
library_template_body_inputsobject
#/components/schemas/WhatsAppTemplateLibraryBodyInputsDto
additionalProperties
false
add_contact_numberboolean
add_learn_more_linkboolean
add_security_recommendationboolean
add_track_package_linkboolean
code_expiration_minutesnumber
minimum
1
maximum
90
library_template_button_inputsarray

Ordered URL, phone-number, or quick-reply inputs required by the selected library template.

minItems
1
maxItems
10
Array itemoneOf
oneOf / 1object
#/components/schemas/WhatsAppTemplateLibraryUrlButtonInputDto
additionalProperties
false
required
[ "type", "url" ]
typestringrequired
enum
[ "URL", "url" ]
urlobjectrequired
#/components/schemas/WhatsAppTemplateLibraryUrlDto
additionalProperties
false
required
[ "base_url" ]
base_urlstringrequired
format
uri
minLength
1
maxLength
2048
url_suffix_examplestring

Full example URL or provider URL-suffix example.

minLength
1
maxLength
2048
oneOf / 2object
#/components/schemas/WhatsAppTemplateLibraryPhoneButtonInputDto
additionalProperties
false
required
[ "type", "phone_number" ]
typestringrequired
enum
[ "PHONE_NUMBER", "phone_number" ]
phone_numberstringrequired
pattern
^\+[1-9][0-9]{1,14}$
minLength
3
maxLength
16
oneOf / 3object
#/components/schemas/WhatsAppTemplateLibraryQuickReplyButtonInputDto
additionalProperties
false
required
[ "type" ]
typestringrequired
enum
[ "QUICK_REPLY", "quick_reply" ]
Original schema
{
  "$ref": "#/components/schemas/WhatsAppTemplateCreateRequestDto"
}

Responses

Status codes and shapes declared for this operation. Read each description for the meaning of that response.

200Response schema
application/json
Response 200object
#/components/schemas/WhatsAppTemplateCreateResultDto
additionalProperties
false
required
[ "success", "template" ]
successbooleanrequired
enum
[ true ]
templateobjectrequired
#/components/schemas/WhatsAppTemplateCreatedDto
additionalProperties
false
required
[ "id", "name", "category", "language", "status", "providerReview" ]
idstringrequired
pattern
^[1-9][0-9]{0,19}$
maxLength
20
namestringrequired
pattern
^[a-z][a-z0-9_]{0,511}$
maxLength
512
categorystringrequired
enum
[ "AUTHENTICATION", "MARKETING", "UTILITY" ]
languagestringrequired
enum
[ "af", "sq", "ar", "ar_EG", "ar_AE", "ar_LB", "ar_MA", "ar_QA", "az", "be_BY", "bn", "bn_IN", "bg", "ca", "zh_CN", "zh_HK", "zh_TW", "hr", "cs", "da", "prs_AF", "nl", "nl_BE", "en", "en_GB", "en_US", "en_AE", "en_AU", "en_CA", "en_GH", "en_IE", "en_IN", "en_JM", "en_MY", "en_NZ", "en_QA", "en_SG", "en_UG", "en_ZA", "et", "fil", "fi", "fr", "fr_BE", "fr_CA", "fr_CH", "fr_CI", "fr_MA", "ka", "de", "de_AT", "de_CH", "el", "gu", "ha", "he", "hi", "hu", "id", "ga", "it", "ja", "kn", "kk", "rw_RW", "ko", "ky_KG", "lo", "lv", "lt", "mk", "ms", "ml", "mr", "nb", "ps_AF", "fa", "pl", "pt_BR", "pt_PT", "pa", "ro", "ru", "sr", "si_LK", "sk", "sl", "es", "es_AR", "es_CL", "es_CO", "es_CR", "es_DO", "es_EC", "es_HN", "es_MX", "es_PA", "es_PE", "es_ES", "es_UY", "sw", "sv", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi", "zu" ]
statusstringrequired
enum
[ "PENDING", "APPROVED" ]
providerReviewstringrequired
enum
[ "pending", "preapproved" ]
Original schema
{
  "$ref": "#/components/schemas/WhatsAppTemplateCreateResultDto"
}
400Response schema
application/json
Response 400object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
401Authentication failed

Authentication failed

application/json
Response 401object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
403Response schema
application/json
Response 403object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
404Response schema
application/json
Response 404object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
409Response schema
application/json
Response 409object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
422Response schema
application/json
Response 422object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
429Response schema
application/json
Response 429object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}

Response headers

X-RateLimit-Limit

Request ceiling that applied to this request. Authenticated requests use the team tier ceiling; unauthenticated identity endpoints use a per-IP ceiling. Usage is measured continuously against a trailing period rather than tallied and cleared at a boundary, so the full ceiling never becomes available again in one step.

X-RateLimit-Limitinteger
minimum
1
Original schema
{
  "type": "integer",
  "minimum": 1
}

X-RateLimit-Remaining

Requests still allowed against that ceiling; never negative. On a 429 produced by the request throttler this is 0. Such a refused request is not counted, so retrying too early costs you no capacity and does not push your recovery further away.

X-RateLimit-Remaininginteger
minimum
0
Original schema
{
  "type": "integer",
  "minimum": 0
}

X-RateLimit-Reset

Absolute Unix epoch time, in SECONDS, at which the current counting period turns over. This is NOT the number of seconds left: subtract the current time to obtain that. It is also NOT the moment your capacity returns: earlier usage keeps weighing on the ceiling across the turnover, so after a 429 wait for Retry-After instead, which is usually later than this value.

X-RateLimit-Resetinteger
format
int64
minimum
0
Original schema
{
  "type": "integer",
  "format": "int64",
  "minimum": 0
}

Retry-After

Seconds to wait before retrying. Always a positive integer delta (never an HTTP-date), at least 1. On a 429 from the request throttler it is the wait until your usage actually drops back under the ceiling; prefer it over any delay you compute from X-RateLimit-Reset.

Retry-Afterinteger
minimum
1
maximum
86400
Original schema
{
  "type": "integer",
  "minimum": 1,
  "maximum": 86400
}
500Server error

Server error

application/json
Response 500object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
502Response schema
application/json
Response 502object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
503Response schema
application/json
Response 503object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}
504Response schema
application/json
Response 504object
#/components/schemas/ZumpoErrorDto
required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequired

Human-readable message. UNSTABLE — do not branch on it.

example
WhatsApp session window expired; use a template message.
typestringrequired

Stable error category (does not change across versions).

enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]
example
invalid_request_error
codestringrequired

Stable machine-readable code.

example
whatsapp_window_expired
paramstring

Offending parameter, present only when relevant.

example
body
docUrlstringrequired

https://docs.zumpo.io/errors/{code}

example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequired

Support correlation id: req_ + 16 hex.

example
req_7f3a9c2e1b8d4056
detailsobject

Additional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.

additionalProperties
true
example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
  "$ref": "#/components/schemas/ZumpoErrorDto"
}

Referenced schemas

Original local definitions used by this operation. Recursive and deeply nested references can be inspected here without expanding them repeatedly.

WhatsAppTemplateCreateRequestDto

#/components/schemas/WhatsAppTemplateCreateRequestDto

{
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string",
      "pattern": "^[0-9a-f]{24}$",
      "minLength": 24,
      "maxLength": 24,
      "description": "Connected Zumpo WhatsApp account id."
    },
    "name": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,511}$",
      "minLength": 1,
      "maxLength": 512
    },
    "category": {
      "type": "string",
      "enum": [
        "AUTHENTICATION",
        "MARKETING",
        "UTILITY"
      ]
    },
    "language": {
      "type": "string",
      "enum": [
        "af",
        "sq",
        "ar",
        "ar_EG",
        "ar_AE",
        "ar_LB",
        "ar_MA",
        "ar_QA",
        "az",
        "be_BY",
        "bn",
        "bn_IN",
        "bg",
        "ca",
        "zh_CN",
        "zh_HK",
        "zh_TW",
        "hr",
        "cs",
        "da",
        "prs_AF",
        "nl",
        "nl_BE",
        "en",
        "en_GB",
        "en_US",
        "en_AE",
        "en_AU",
        "en_CA",
        "en_GH",
        "en_IE",
        "en_IN",
        "en_JM",
        "en_MY",
        "en_NZ",
        "en_QA",
        "en_SG",
        "en_UG",
        "en_ZA",
        "et",
        "fil",
        "fi",
        "fr",
        "fr_BE",
        "fr_CA",
        "fr_CH",
        "fr_CI",
        "fr_MA",
        "ka",
        "de",
        "de_AT",
        "de_CH",
        "el",
        "gu",
        "ha",
        "he",
        "hi",
        "hu",
        "id",
        "ga",
        "it",
        "ja",
        "kn",
        "kk",
        "rw_RW",
        "ko",
        "ky_KG",
        "lo",
        "lv",
        "lt",
        "mk",
        "ms",
        "ml",
        "mr",
        "nb",
        "ps_AF",
        "fa",
        "pl",
        "pt_BR",
        "pt_PT",
        "pa",
        "ro",
        "ru",
        "sr",
        "si_LK",
        "sk",
        "sl",
        "es",
        "es_AR",
        "es_CL",
        "es_CO",
        "es_CR",
        "es_DO",
        "es_EC",
        "es_HN",
        "es_MX",
        "es_PA",
        "es_PE",
        "es_ES",
        "es_UY",
        "sw",
        "sv",
        "ta",
        "te",
        "th",
        "tr",
        "uk",
        "ur",
        "uz",
        "vi",
        "zu"
      ]
    },
    "components": {
      "type": "array",
      "minItems": 1,
      "maxItems": 4,
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WhatsAppTemplateCreateTextHeaderDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateCreateTextBodyDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateCreateTextFooterDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateCreateTextButtonsDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateCreateAuthenticationBodyDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateCreateAuthenticationFooterDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateCreateAuthenticationButtonsDto"
          }
        ]
      },
      "description": "Required only for custom templates. Canonical ordered custom-text components or the bounded authentication copy-code preset; omit when library_template_name is present."
    },
    "library_template_name": {
      "type": "string",
      "pattern": "^[a-z0-9_]{1,512}$",
      "minLength": 1,
      "maxLength": 512,
      "description": "Exact Meta Template Library name. Selects library mode and is mutually exclusive with components; library imports require category UTILITY."
    },
    "library_template_body_inputs": {
      "$ref": "#/components/schemas/WhatsAppTemplateLibraryBodyInputsDto"
    },
    "library_template_button_inputs": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10,
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WhatsAppTemplateLibraryUrlButtonInputDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateLibraryPhoneButtonInputDto"
          },
          {
            "$ref": "#/components/schemas/WhatsAppTemplateLibraryQuickReplyButtonInputDto"
          }
        ]
      },
      "description": "Ordered URL, phone-number, or quick-reply inputs required by the selected library template."
    }
  },
  "additionalProperties": false,
  "required": [
    "accountId",
    "name",
    "category",
    "language"
  ]
}
WhatsAppTemplateCreateTextHeaderDto

#/components/schemas/WhatsAppTemplateCreateTextHeaderDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "HEADER"
      ]
    },
    "format": {
      "type": "string",
      "enum": [
        "TEXT"
      ]
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "example": {
      "$ref": "#/components/schemas/WhatsAppTemplateCreateHeaderExampleDto"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "format",
    "text"
  ]
}
WhatsAppTemplateCreateHeaderExampleDto

#/components/schemas/WhatsAppTemplateCreateHeaderExampleDto

{
  "type": "object",
  "properties": {
    "header_text": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "header_text"
  ]
}
WhatsAppTemplateCreateTextBodyDto

#/components/schemas/WhatsAppTemplateCreateTextBodyDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "BODY"
      ]
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "example": {
      "$ref": "#/components/schemas/WhatsAppTemplateCreateBodyExampleDto"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "text"
  ]
}
WhatsAppTemplateCreateBodyExampleDto

#/components/schemas/WhatsAppTemplateCreateBodyExampleDto

{
  "type": "object",
  "properties": {
    "body_text": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1,
      "items": {
        "type": "array",
        "minItems": 1,
        "maxItems": 32,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "description": "One ordered example row whose values match the contiguous positional variables."
    }
  },
  "additionalProperties": false,
  "required": [
    "body_text"
  ]
}
WhatsAppTemplateCreateTextFooterDto

#/components/schemas/WhatsAppTemplateCreateTextFooterDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "FOOTER"
      ]
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "text"
  ]
}
WhatsAppTemplateCreateTextButtonsDto

#/components/schemas/WhatsAppTemplateCreateTextButtonsDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "BUTTONS"
      ]
    },
    "buttons": {
      "minItems": 1,
      "maxItems": 10,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WhatsAppTemplateCreateQuickReplyButtonDto"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "buttons"
  ]
}
WhatsAppTemplateCreateQuickReplyButtonDto

#/components/schemas/WhatsAppTemplateCreateQuickReplyButtonDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "QUICK_REPLY"
      ]
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 25
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "text"
  ]
}
WhatsAppTemplateCreateAuthenticationBodyDto

#/components/schemas/WhatsAppTemplateCreateAuthenticationBodyDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "BODY"
      ]
    },
    "add_security_recommendation": {
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}
WhatsAppTemplateCreateAuthenticationFooterDto

#/components/schemas/WhatsAppTemplateCreateAuthenticationFooterDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "FOOTER"
      ]
    },
    "code_expiration_minutes": {
      "type": "number",
      "minimum": 1,
      "maximum": 90
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "code_expiration_minutes"
  ]
}
WhatsAppTemplateCreateAuthenticationButtonsDto

#/components/schemas/WhatsAppTemplateCreateAuthenticationButtonsDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "BUTTONS"
      ]
    },
    "buttons": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/WhatsAppTemplateCreateAuthenticationOtpButtonDto"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "buttons"
  ]
}
WhatsAppTemplateCreateAuthenticationOtpButtonDto

#/components/schemas/WhatsAppTemplateCreateAuthenticationOtpButtonDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "OTP"
      ]
    },
    "otp_type": {
      "type": "string",
      "enum": [
        "COPY_CODE"
      ]
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 25
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "otp_type"
  ]
}
WhatsAppTemplateLibraryBodyInputsDto

#/components/schemas/WhatsAppTemplateLibraryBodyInputsDto

{
  "type": "object",
  "properties": {
    "add_contact_number": {
      "type": "boolean"
    },
    "add_learn_more_link": {
      "type": "boolean"
    },
    "add_security_recommendation": {
      "type": "boolean"
    },
    "add_track_package_link": {
      "type": "boolean"
    },
    "code_expiration_minutes": {
      "type": "number",
      "minimum": 1,
      "maximum": 90
    }
  },
  "additionalProperties": false
}
WhatsAppTemplateLibraryUrlButtonInputDto

#/components/schemas/WhatsAppTemplateLibraryUrlButtonInputDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "URL",
        "url"
      ]
    },
    "url": {
      "$ref": "#/components/schemas/WhatsAppTemplateLibraryUrlDto"
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "url"
  ]
}
WhatsAppTemplateLibraryUrlDto

#/components/schemas/WhatsAppTemplateLibraryUrlDto

{
  "type": "object",
  "properties": {
    "base_url": {
      "type": "string",
      "format": "uri",
      "minLength": 1,
      "maxLength": 2048
    },
    "url_suffix_example": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "description": "Full example URL or provider URL-suffix example."
    }
  },
  "additionalProperties": false,
  "required": [
    "base_url"
  ]
}
WhatsAppTemplateLibraryPhoneButtonInputDto

#/components/schemas/WhatsAppTemplateLibraryPhoneButtonInputDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "PHONE_NUMBER",
        "phone_number"
      ]
    },
    "phone_number": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{1,14}$",
      "minLength": 3,
      "maxLength": 16
    }
  },
  "additionalProperties": false,
  "required": [
    "type",
    "phone_number"
  ]
}
WhatsAppTemplateLibraryQuickReplyButtonInputDto

#/components/schemas/WhatsAppTemplateLibraryQuickReplyButtonInputDto

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "QUICK_REPLY",
        "quick_reply"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "type"
  ]
}
WhatsAppTemplateCreateResultDto

#/components/schemas/WhatsAppTemplateCreateResultDto

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "template": {
      "$ref": "#/components/schemas/WhatsAppTemplateCreatedDto"
    }
  },
  "additionalProperties": false,
  "required": [
    "success",
    "template"
  ]
}
WhatsAppTemplateCreatedDto

#/components/schemas/WhatsAppTemplateCreatedDto

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[1-9][0-9]{0,19}$",
      "maxLength": 20
    },
    "name": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,511}$",
      "maxLength": 512
    },
    "category": {
      "type": "string",
      "enum": [
        "AUTHENTICATION",
        "MARKETING",
        "UTILITY"
      ]
    },
    "language": {
      "type": "string",
      "enum": [
        "af",
        "sq",
        "ar",
        "ar_EG",
        "ar_AE",
        "ar_LB",
        "ar_MA",
        "ar_QA",
        "az",
        "be_BY",
        "bn",
        "bn_IN",
        "bg",
        "ca",
        "zh_CN",
        "zh_HK",
        "zh_TW",
        "hr",
        "cs",
        "da",
        "prs_AF",
        "nl",
        "nl_BE",
        "en",
        "en_GB",
        "en_US",
        "en_AE",
        "en_AU",
        "en_CA",
        "en_GH",
        "en_IE",
        "en_IN",
        "en_JM",
        "en_MY",
        "en_NZ",
        "en_QA",
        "en_SG",
        "en_UG",
        "en_ZA",
        "et",
        "fil",
        "fi",
        "fr",
        "fr_BE",
        "fr_CA",
        "fr_CH",
        "fr_CI",
        "fr_MA",
        "ka",
        "de",
        "de_AT",
        "de_CH",
        "el",
        "gu",
        "ha",
        "he",
        "hi",
        "hu",
        "id",
        "ga",
        "it",
        "ja",
        "kn",
        "kk",
        "rw_RW",
        "ko",
        "ky_KG",
        "lo",
        "lv",
        "lt",
        "mk",
        "ms",
        "ml",
        "mr",
        "nb",
        "ps_AF",
        "fa",
        "pl",
        "pt_BR",
        "pt_PT",
        "pa",
        "ro",
        "ru",
        "sr",
        "si_LK",
        "sk",
        "sl",
        "es",
        "es_AR",
        "es_CL",
        "es_CO",
        "es_CR",
        "es_DO",
        "es_EC",
        "es_HN",
        "es_MX",
        "es_PA",
        "es_PE",
        "es_ES",
        "es_UY",
        "sw",
        "sv",
        "ta",
        "te",
        "th",
        "tr",
        "uk",
        "ur",
        "uz",
        "vi",
        "zu"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "APPROVED"
      ]
    },
    "providerReview": {
      "type": "string",
      "enum": [
        "pending",
        "preapproved"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "category",
    "language",
    "status",
    "providerReview"
  ]
}
ZumpoErrorDto

#/components/schemas/ZumpoErrorDto

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Human-readable message. UNSTABLE — do not branch on it.",
      "example": "WhatsApp session window expired; use a template message."
    },
    "type": {
      "type": "string",
      "description": "Stable error category (does not change across versions).",
      "enum": [
        "invalid_request_error",
        "authentication_error",
        "permission_error",
        "not_found",
        "conflict",
        "rate_limit_error",
        "platform_error",
        "platform_rejected",
        "account_disconnected",
        "media_error",
        "api_error"
      ],
      "example": "invalid_request_error"
    },
    "code": {
      "type": "string",
      "description": "Stable machine-readable code.",
      "example": "whatsapp_window_expired"
    },
    "param": {
      "type": "string",
      "description": "Offending parameter, present only when relevant.",
      "example": "body"
    },
    "docUrl": {
      "type": "string",
      "description": "https://docs.zumpo.io/errors/{code}",
      "example": "https://docs.zumpo.io/errors/whatsapp_window_expired"
    },
    "requestId": {
      "type": "string",
      "description": "Support correlation id: req_ + 16 hex.",
      "example": "req_7f3a9c2e1b8d4056"
    },
    "details": {
      "type": "object",
      "additionalProperties": true,
      "description": "Additional structured context, present only when an error has more to say than a single `param` can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.",
      "example": {
        "created": [
          {
            "kind": "campaign",
            "platformId": "120210000000000001"
          },
          {
            "kind": "adSet",
            "platformId": "120210000000000002"
          }
        ]
      }
    }
  },
  "required": [
    "error",
    "type",
    "code",
    "docUrl",
    "requestId"
  ]
}