# WhatsApp Templates

The WhatsApp template endpoint offers a way for you to manage your WhatsApp templates that can be used with the Conversation API. The WhatsApp templates are a requirement to send the initial outbound messages in the WhatsApp API.

## List all templates in project

 - [GET /v1/projects/{projectId}/whatsapp/templates](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_listtemplates_v1.md): Returns a paginated list of templates for the specified project. If no page token is supplied then the first 50 templates are returned in alphabetical order.

## Create a template in project

 - [POST /v1/projects/{projectId}/whatsapp/templates](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_createtemplate_v1.md): Creates a new template with the request data. If the status field is set to submit the template will be created immediately, otherwise it will be saved as a draft.

## List all templates for a specific name

 - [GET /v1/projects/{projectId}/whatsapp/templates/{templateName}](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_listtemplatesbyname_v1.md): Returns a paginated list of templates for the specified project and name. If no page token is supplied then the first 50 templates are returned in alphabetical order.

## Delete template by name

 - [DELETE /v1/projects/{projectId}/whatsapp/templates/{templateName}](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_deletetemplatesbyname_v1.md): Delete template that matches the name.

      If message templates with the same name exists in multiple languages, all those templates will also be deleted.      
      Once deleted the name can not be used for new message templates for 30 days. Use a different name to create future templates during that time period.
      Messages that have been sent with the deleted template, but not yet delivered, will be attempted to be deliver for 30 days from the time of the message.

## Get template in project

 - [GET /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_gettemplate_v1.md): Returns a template for a project, with the specified name and language.

## Delete template by name and language

 - [DELETE /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_deletetemplatebynameandlanguage_v1.md): Delete a template by name and language.
      
      Please note that by default only draft is removed. Use query parameter deleteSubmitted=true to also remove the submitted template.
      Once an approved template is deleted, the template cannot be recreated again with this name and language for 30 days. Consequently, be aware that you must use a different name to create template for this language within this 30 days long period.
      If you need the template in this language soon, update the submitted template for a specific language instead of trying to delete and recreate it again.

## Update a template in project

 - [PATCH /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_updatetemplate_v1.md): Updates a template DRAFT.
    
    Note that it is not possible to update all fields for a template,
    if you want to update a field that is not supported you will need to delete the draft and create a new one.

    Update a template REJECTED / APPROVED / PAUSED / DISABLED

    It is possible to update templates that have been rejected, approved, paused or disabled, we will automatically set the status to draft when update a rejected template.

## Lists activities on project template

 - [GET /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}/activities](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_listactivities_v1.md): Paginated list of activities for a template. Ordered from the most recent one to the oldest one.

## Creates a comment for a template

 - [POST /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}/comments](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_createcomment_v1.md): Creates a comment for a template.

## Compare two templates

 - [POST /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}/compare](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_comparetemplates_v1.md): Compare two templates.

## Synchronize templates for project

 - [POST /v1/projects/{projectId}/whatsapp/templates/sync](https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1/whatsapp-templates/templatescontroller_synctemplates_v1.md): Synchronize templates for project

