WhatsMCP Templates API
The Templates API from WhatsMCP — 2 operation(s) for templates.
The Templates API from WhatsMCP — 2 operation(s) for templates.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/whatsmcp-com:whatsmcp-com-templates-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: Send and read WhatsApp messages from your own accounts. The same capabilities as the WhatsMCP MCP server, over plain HTTP.
title: WhatsMCP Templates API
version: 0.1.195
servers:
- url: https://api.whatsmcp.com
security:
- bearerAuth: []
- apiKey: []
tags:
- name: Templates
paths:
/v1/accounts/{account_id}/templates:
get:
description: Every template with its review status (APPROVED, PENDING, REJECTED). Send an APPROVED one with send-message's template/template_language, supplying `variables` template_variables in order.
operationId: list-templates
parameters:
- in: path
name: account_id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListTemplatesOutput'
description: OK
'400':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Bad Request
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Conflict
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'429':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Too Many Requests
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: List a Business number's message templates
tags:
- Templates
post:
description: 'Meta reviews it (usually minutes); it can be sent only once list-templates shows it APPROVED. Categories: MARKETING or UTILITY. Number body variables {{1}}, {{2}}, … in order and give one body_examples value per variable.'
operationId: create-template
parameters:
- in: path
name: account_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTemplateBody'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTemplateOutput'
description: Created
headers:
Location:
schema:
type: string
'400':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Bad Request
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Conflict
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'429':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Too Many Requests
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Submit a message template for review
tags:
- Templates
/v1/accounts/{account_id}/templates/{name}:
delete:
description: One language, or every language of the name when language is omitted. Meta blocks reusing a deleted template's name for a while.
operationId: delete-template
parameters:
- in: path
name: account_id
required: true
schema:
type: string
- description: the template name
in: path
name: name
required: true
schema:
description: the template name
type: string
- description: delete only this language, e.g. pt_BR; omit to delete every language of the name
explode: false
in: query
name: language
schema:
description: delete only this language, e.g. pt_BR; omit to delete every language of the name
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTemplateOutput'
description: OK
'400':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Bad Request
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Conflict
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'429':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Too Many Requests
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Delete a message template
tags:
- Templates
components:
schemas:
AccountCandidate:
additionalProperties: false
properties:
account_id:
description: the id to retry with as account_id
type: string
name:
description: the account's WhatsApp display name
type: string
phone:
description: the account's phone number, E.164
type: string
status:
description: whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it
type: string
required:
- account_id
type: object
CreatedTemplateInfo:
additionalProperties: false
properties:
category:
description: the category Meta assigned, which may differ from the one asked for
type: string
id:
description: Meta's template id
type: string
status:
description: the review status, usually PENDING; poll wa_list_templates until APPROVED before sending it
type: string
required:
- id
- status
- category
type: object
CreateTemplateBody:
additionalProperties: false
properties:
account_id:
description: ignored; the path account_id is used
type: string
body:
type: string
body_examples:
items:
type: string
type:
- array
- 'null'
buttons:
items:
$ref: '#/components/schemas/TemplateButtonInput'
type:
- array
- 'null'
call_permission:
type: boolean
category:
type: string
footer:
type: string
header:
type: string
header_example:
type: string
language:
type: string
name:
type: string
required:
- name
- category
- body
type: object
DeleteTemplateOutput:
additionalProperties: false
properties:
deleted:
description: true when Meta deleted it
type: boolean
refusal:
$ref: '#/components/schemas/Refusal'
description: present only when the call was declined
type: object
ErrorModel:
additionalProperties: false
properties:
detail:
description: A human-readable explanation specific to this occurrence of the problem.
examples:
- Property foo is required but is missing.
type: string
errors:
description: Optional list of individual error details
items:
$ref: '#/components/schemas/ErrorDetail'
type:
- array
- 'null'
instance:
description: A URI reference that identifies the specific occurrence of the problem.
examples:
- https://example.com/error-log/abc123
format: uri
type: string
status:
description: HTTP status code
examples:
- 400
format: int64
type: integer
title:
description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
examples:
- Bad Request
type: string
type:
default: about:blank
description: A URI reference to human-readable documentation for the error.
examples:
- https://example.com/errors/example
format: uri
type: string
type: object
TemplateInfo:
additionalProperties: false
properties:
body:
description: the template's body text as Meta holds it, with its {{n}} variables
type: string
buttons:
description: 'one line per button, e.g. ''Quick reply: Yes'' or ''Link: Shop → https://…'''
items:
type: string
type:
- array
- 'null'
call_permission:
description: true when the template asks the customer to allow the business to call them (WhatsApp's call permission request)
type: boolean
category:
description: MARKETING, UTILITY or AUTHENTICATION
type: string
footer:
description: the template's footer, if any
type: string
header:
description: the template's text header, if any
type: string
language:
description: the template's language/locale code, e.g. en_US — pass it as template_language
type: string
name:
description: the template name — pass it as wa_send_message's template
type: string
rejected_reason:
description: for a REJECTED template, Meta's reason code (e.g. INVALID_FORMAT, TAG_CONTENT_MISMATCH); fix the template and create it again under a new name
type: string
status:
description: APPROVED, PENDING or REJECTED; only APPROVED templates can be sent
type: string
variables:
description: how many positional {{1}}…{{n}} values the body needs — supply that many template_variables to wa_send_message, in order
format: int64
type: integer
required:
- name
- language
- status
- category
- variables
type: object
CreateTemplateOutput:
additionalProperties: false
properties:
refusal:
$ref: '#/components/schemas/Refusal'
description: present only when the call was declined
template:
$ref: '#/components/schemas/CreatedTemplateInfo'
description: the submitted template
type: object
TemplateButtonInput:
additionalProperties: false
properties:
phone_number:
type: string
text:
type: string
type:
type: string
url:
type: string
required:
- type
- text
type: object
Refusal:
additionalProperties: false
properties:
account_status:
description: 'when the number is not working: its status — starting, not_running, whatsapp_down (telegram_down for a Telegram account), suspended, pairing, unlinked or locked'
type: string
account_status_reason:
description: the detail of account_status, e.g. no_egress, stopped, no_plan
type: string
candidates:
description: 'on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id'
items:
$ref: '#/components/schemas/AccountCandidate'
type:
- array
- 'null'
message:
description: a human-readable explanation
type: string
reason:
description: why the call was declined
type: string
refused:
description: true when the call was declined rather than performed
type: boolean
retry_after_seconds:
description: seconds to wait before retrying; absent or 0 means retrying will not help
format: int64
type: integer
since:
description: when the number stopped working, RFC3339, when known
type: string
required:
- refused
- reason
- message
type: object
ListTemplatesOutput:
additionalProperties: false
properties:
refusal:
$ref: '#/components/schemas/Refusal'
description: present only when the call was declined
templates:
description: every message template with its review status; only APPROVED ones can be sent, with the name/language/variables to pass to wa_send_message
items:
$ref: '#/components/schemas/TemplateInfo'
type:
- array
- 'null'
type: object
ErrorDetail:
additionalProperties: false
properties:
location:
description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
type: string
message:
description: Error message text
type: string
value:
description: The value at the given location
type: object
securitySchemes:
apiKey:
description: An API key from the console.
in: header
name: X-API-Key
type: apiKey
bearerAuth:
description: 'An API key from the console (API keys page), as Authorization: Bearer wamcp_live_…. OAuth access tokens are not accepted here; they are for /mcp.'
scheme: bearer
type: http