/v1/management/whatsapp-templates/{templateId}Behavior
Backend-only Management credential; no Origin header or caller-selected business/phone/WABA/token. Use the local id and returned ETag for changes. providerStatus is an explicit provider observation; null does not establish approval. Requires whatsapp-templates:read. Current connection and provider prerequisites are checked separately; a stored grant does not establish readiness. On successful reads, status and providerStatus reflect a fresh Meta observation, providerCheckedAt dates it, and submissionStatus preserves the stored submission state. When Meta has no matching resource, providerStatus is null and status is the stored state of a template that never reached Meta (LOCAL_PENDING, LOCAL_REJECTED, LOCAL_UNKNOWN), DELETED for a deleted one, or UNKNOWN for a stored Meta ID that Meta no longer lists; unavailable or incomplete provider reads return 503 PROVIDER_UNAVAILABLE. This observation neither reconciles operations nor certifies approval of an attempted local definition. Use the approved sending catalogue for current message content. List pagination stays scoped to this business; no client per-template refresh loop is needed.
Authentication
ManagementCredential
Credential rules
One server-only owner-issued wbm_ API key can carry both management and integration permissions. Additional permissions require an explicit owner-issued grant. GET /v1/management returns the management discovery view, which may be empty for a booking-only key. For credentials with appointments:read, this discovery view omits whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write to preserve calendar-client compatibility. Discover these grants through GET /v1/management/messaging-capabilities. Template/profile command authorization still uses the stored grants. Server-only owner-issued Management authority with explicit application permissions. Calling this API does not expand a credential's grants. contacts:read/write/block/sync/fields:read/fields:write are separate approvals for canonical business contacts; fields also require current typed owner grants. contacts:record remains contact recording/recovery only. These grants create no customer phone proof, booking authority, messaging consent or automatic synchronization. Hours/blocks retain their independent resource grants. booking-policy:read/write separately delegate whole-business booking settings, without schedule/provider grants; write requires read. They preserve existing appointments and create no duration-rewrite authority. Provider duration policy additionally requires explicit provider-booking-policy:read/write and exact current providerIds; booking-duration:rewrite is separately approved and does not itself grant policy read/write. Service catalogue requires explicit services:read/write, independent of provider/calendar/schedule resources; write requires read. These operations do not expand an existing credential's grants. Public presentation and reviewed service selection require explicit website-content:read/write; write requires read, independently from services:* and provider resources. Existing provider metadata/activity/assignment additionally requires providers:read/write and a nonempty explicit current providerIds grant; write requires read. This grants no provider creation, deletion, login, invitation or schedule authority. WhatsApp template/profile management requires separate whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write application scopes. Write requires its matching read scope. These grants require explicit owner approval; Meta OAuth permissions remain separate.
Required application permissions
whatsapp-templates:read
Request
templateIdpath · stringRequiredFormat and constraints
{ "type": "string", "format": "uuid" }
Successful responses
200 · WhatsappOwnedTemplateRead
Authorized template resource(s) with current provider status, observation time and separate stored submission status. No template mutation or operation reconciliation.
Cache-Control
{
"const": "no-store"
} ETag · Strong quoted resource version for If-Match.
{
"type": "string"
} application/json · WhatsappOwnedTemplateRead
-
idstring · uuidRequired -
namestringRequiredProvider name created as crad_<full tenant hex>_<requested name>.
minLength:1maxLength:512 -
languagestringRequiredAllowed values:
["ar","en_US","he"] -
categorystringRequiredAllowed values:
["UTILITY","MARKETING","AUTHENTICATION"] -
versionintegerRequiredminimum:1 -
providerIdstring | nullRequiredInformational provider identity; never accepted as an editable resource selector.
pattern:"^[0-9]{1,40}$" -
statusstringRequiredCurrent Meta status observed during this GET when the template exists at Meta. Otherwise the stored state of a template that never reached Meta (LOCAL_PENDING, LOCAL_REJECTED, LOCAL_UNKNOWN), DELETED, or UNKNOWN for a stored Meta ID that Meta no longer lists. It does not certify approval of the local definition or version.
pattern:"^[A-Z_]+$"maxLength:40 -
definitiononeOf (object | object)RequiredClosed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables.
Exactly one of these variants must match.
View nested fields
-
oneOf 1objectSchema branchView branch fields and rules
-
namestringRequired in this branchminLength:1pattern:"^[a-z][a-z0-9_]*$"maxLength:80 -
languagestringRequired in this branchAllowed values:
["ar","en_US","he"] -
categorystringRequired in this branchAllowed values:
["UTILITY","MARKETING"] -
bodystringRequired in this branchContiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.
minLength:1maxLength:1024 -
examplesarrayOptional in this branchExactly one sample per positional variable, in order.
maxItems:30View nested fields
-
[]stringArray itemminLength:1maxLength:256
-
-
headeroneOf (object | object)Optional in this branchExactly one of these variants must match.
View nested fields
-
oneOf 1 · type = "text"objectSchema branchView branch fields and rules
-
typestringRequired in this branchValue:
"text" -
textstringRequired in this branchFixed text; no placeholder delimiters.
minLength:1maxLength:60 -
additionalPropertiesno value allowedSchema rule
-
-
oneOf 2 · type = "image"objectSchema branchView branch fields and rules
-
typestringRequired in this branchValue:
"image" -
uploadIdstring · uuidRequired in this branch -
additionalPropertiesno value allowedSchema rule
-
-
-
footerstringOptional in this branchFixed text; no placeholder delimiters.
minLength:1maxLength:60 -
buttonsarrayOptional in this branchOrdered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads.
maxItems:3uniqueItems:trueView nested fields
-
[]stringArray itemminLength:1maxLength:25
-
-
additionalPropertiesno value allowedSchema rule
-
-
oneOf 2 · category = "AUTHENTICATION"objectSchema branchView branch fields and rules
-
namestringRequired in this branchminLength:1pattern:"^[a-z][a-z0-9_]*$"maxLength:80 -
languagestringRequired in this branchAllowed values:
["ar","en_US","he"] -
categorystringRequired in this branchValue:
"AUTHENTICATION" -
authenticationobjectRequired in this branchView nested fields
-
addSecurityRecommendationbooleanRequired in this branch -
codeExpirationMinutesintegerRequired in this branchminimum:1maximum:90 -
copyCodeTextstringRequired in this branchminLength:1maxLength:25 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
-
-
-
updatedAtstring · date-timeRequired -
providerStatusstring | nullRequiredCurrent Meta status, or null when a complete lookup found no matching resource. Provider errors or incomplete lookups return 503 instead of a stale result.
-
providerCheckedAtstring · date-timeRequiredTime of this provider observation; updatedAt remains the local submission update time.
-
submissionStatusstringRequiredStored submission result, retained independently of current provider approval. A rejected edit can retain an attempted definition while the earlier provider content remains APPROVED.
pattern:"^[A-Z_]+$"maxLength:40 -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"minLength": 1,
"description": "Provider name created as crad_<full tenant hex>_<requested name>.",
"maxLength": 512
},
"language": {
"enum": [
"ar",
"en_US",
"he"
]
},
"category": {
"enum": [
"UTILITY",
"MARKETING",
"AUTHENTICATION"
]
},
"version": {
"type": "integer",
"minimum": 1
},
"providerId": {
"type": [
"string",
"null"
],
"pattern": "^[0-9]{1,40}$",
"description": "Informational provider identity; never accepted as an editable resource selector."
},
"status": {
"type": "string",
"pattern": "^[A-Z_]+$",
"maxLength": 40,
"description": "Current Meta status observed during this GET when the template exists at Meta. Otherwise the stored state of a template that never reached Meta (LOCAL_PENDING, LOCAL_REJECTED, LOCAL_UNKNOWN), DELETED, or UNKNOWN for a stored Meta ID that Meta no longer lists. It does not certify approval of the local definition or version."
},
"definition": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_]*$",
"maxLength": 80
},
"language": {
"enum": [
"ar",
"en_US",
"he"
]
},
"category": {
"enum": [
"UTILITY",
"MARKETING"
]
},
"body": {
"type": "string",
"minLength": 1,
"description": "Contiguous positional variables {{1}} through {{N}}; no skipped positions or named variables. At most 30 positions.",
"maxLength": 1024
},
"examples": {
"type": "array",
"maxItems": 30,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"description": "Exactly one sample per positional variable, in order."
},
"header": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"const": "text"
},
"text": {
"type": "string",
"minLength": 1,
"description": "Fixed text; no placeholder delimiters.",
"maxLength": 60
}
},
"required": [
"type",
"text"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"const": "image"
},
"uploadId": {
"type": "string",
"format": "uuid"
}
},
"required": [
"type",
"uploadId"
]
}
]
},
"footer": {
"type": "string",
"minLength": 1,
"description": "Fixed text; no placeholder delimiters.",
"maxLength": 60
},
"buttons": {
"type": "array",
"maxItems": 3,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 25
},
"description": "Ordered distinct QUICK_REPLY labels. At send time supply exactly this many opaque payloads."
}
},
"required": [
"name",
"language",
"category",
"body"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z][a-z0-9_]*$",
"maxLength": 80
},
"language": {
"enum": [
"ar",
"en_US",
"he"
]
},
"category": {
"const": "AUTHENTICATION"
},
"authentication": {
"type": "object",
"additionalProperties": false,
"properties": {
"addSecurityRecommendation": {
"type": "boolean"
},
"codeExpirationMinutes": {
"type": "integer",
"minimum": 1,
"maximum": 90
},
"copyCodeText": {
"type": "string",
"minLength": 1,
"maxLength": 25
}
},
"required": [
"addSecurityRecommendation",
"codeExpirationMinutes",
"copyCodeText"
]
}
},
"required": [
"name",
"language",
"category",
"authentication"
]
}
],
"description": "Closed CRAD creation/editing contract. Meta review, eligibility and provider restrictions still apply. Authentication is standard COPY_CODE, without custom message text or header. The code-expiration footer does not create code generation, verification or expiry enforcement in CRAD. Examples default to [] when there are no body variables."
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"providerStatus": {
"type": [
"string",
"null"
],
"description": "Current Meta status, or null when a complete lookup found no matching resource. Provider errors or incomplete lookups return 503 instead of a stale result."
},
"providerCheckedAt": {
"type": "string",
"format": "date-time",
"description": "Time of this provider observation; updatedAt remains the local submission update time."
},
"submissionStatus": {
"type": "string",
"pattern": "^[A-Z_]+$",
"maxLength": 40,
"description": "Stored submission result, retained independently of current provider approval. A rejected edit can retain an attempted definition while the earlier provider content remains APPROVED."
}
},
"required": [
"id",
"name",
"language",
"category",
"version",
"providerId",
"status",
"definition",
"updatedAt",
"providerStatus",
"providerCheckedAt",
"submissionStatus"
]
} Errors and recovery
Error responses declared in the contract (8)
The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.
401 · Missing or invalid server credential.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 403 · Scope, credential, integration or business authority denied; browser Origin is refused.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 404 · Owned resource or usable same-purpose current-binding image not found.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 405 · Unsupported HTTP method.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 409 · Connection changed/blocked, conflicting operation UUID, unresolved write, expired claim or owner review required. No automatic provider redispatch.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 422 · Invalid/unknown field, unsupported selector/query, UUID, precondition or template shape.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 429 · Credential/request or local template rate limit; honor Retry-After when supplied.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
} 503 · Configuration, provider or persistence unavailable; retain original operation identity because outcome may be uncertain.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"requestId": {
"type": "string",
"format": "uuid"
},
"retryAfter": {
"type": "integer",
"minimum": 1
}
},
"required": [
"code",
"requestId"
]
}
},
"required": [
"error"
]
}