You can use the WhatsApp Template Management API to create a new managed WhatsApp template. You can use this API version if you authenticate requests with an Insider One API key.
All examples below use sample data and payloads for documentation purposes only. Before going live, replace all template names, languages, components, and media handles with values specific to your own integration.
For the V1 template API, authenticate requests with
x-ins-auth-key. Public examples below use the Gateway base URL so that your integration stays on a public entrypoint instead of calling internal services.
Endpoint and Headers
POST https://whatsapp.useinsider.com/api/v1/templates
Headers
Header | Sample Value | Description |
|---|---|---|
X-INS-AUTH-KEY | 1a2b3c4d5e6f | This key is required to authorize your request. Refer to Generate API Credentials for WhatsApp Template Management to generate your token. |
Content-Type | application/json | This header specifies the media type of the resource. |
Body Parameters
Column | Data Type | Required | Description |
|---|---|---|---|
name | String | Yes | The template name to create. |
language | String | Yes | The template locale, such as |
category | String | Yes | The Meta template category. |
components | Array[object] | Yes | At least one component is required. |
Sample Requests
Basic Marketing Template with Quick Reply Button
curl --location 'https://whatsapp.useinsider.com/api/v1/templates' \
--header 'Content-Type: application/json' \
--header 'x-ins-auth-key: your-api-key' \
--data '{
"name": "spring_campaign_template",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}, our new spring collection is live now. Tap below to explore best sellers picked for you."
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Show products"
}
]
}
]
}'Utility Template with Header, Body, Footer, and URL Button
curl --location 'https://whatsapp.useinsider.com/api/v1/templates' \
--header 'Content-Type: application/json' \
--header 'x-ins-auth-key: your-api-key' \
--data '{
"name": "order_delivery_update",
"language": "en_US",
"category": "UTILITY",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order update"
},
{
"type": "BODY",
"text": "Hi {{1}}, your order {{2}} is on the way and will arrive on {{3}}."
},
{
"type": "FOOTER",
"text": "Thank you for shopping with us."
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Track package",
"url": "https://tracking.example.com/orders/{{2}}"
}
]
}
]
}'Create an Authentication Template with Security Code
curl --location 'https://whatsapp.useinsider.com/api/v1/templates' \
--header 'Content-Type: application/json' \
--header 'x-ins-auth-key: your-api-key' \
--data '{
"name": "login_code_template",
"language": "en_US",
"category": "AUTHENTICATION",
"components": [
{
"type": "BODY",
"text": "*{{1}}* is your verification code. For your security, do not share this code."
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "OTP",
"otp_type": "COPY_CODE",
"text": "Copy code"
}
]
}
]
}'Upload an Image to the Header
If you want to create a media template,
Upload the file and keep the returned handle.
curl --location 'https://whatsapp.useinsider.com/api/v1/templates/file-upload' \
--header 'x-ins-auth-key: your-api-key' \
--form 'file=@"/path/to/spring-banner.png"'You will receive the sample response below to your upload request.
{
"id": "4::aW1hZ2UvcG5n:ARbExampleMediaHandle"
}You can use that file handle inside the image header component when creating the template.
curl --location 'https://whatsapp.useinsider.com/api/v1/templates' \
--header 'Content-Type: application/json' \
--header 'x-ins-auth-key: your-api-key' \
--data '{
"name": "spring_visual_campaign",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"example": {
"header_handle": [
"4::aW1hZ2UvcG5n:ARbExampleMediaHandle"
]
}
},
{
"type": "BODY",
"text": "Hi {{1}}, our spring collection is now live. Tap below to browse the new arrivals."
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Shop now",
"url": "https://www.example.com/spring"
}
]
}
]
}'Sample Responses
A successful request returns the following JSON response with the details of the newly created template
{
"id": 42,
"name": "spring_campaign_template",
"language": "en_US",
"quality": "PENDING",
"status": "IN-REVIEW"
}/snip