Skip to content

List all templates in project
GA

Request

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.

Security
BasicAuth and BearerAuth and OAuth2Production
Path
projectIdstringrequired

The unique ID of the project. You can find this on the Sinch Dashboard.

Query
pageTokenstring

The page token if retrieving the next page from a previous query.

pageSizenumber, [ 1 .. 1000 ]

The page size requested.

fieldMaskArray of strings(WhatsappTemplateDtoFieldMaskPathsEnum)

Field masks are a way for API callers to list the fields that a request should return.

Items Enum:"whatsappId""state""name""language""category""rejectionCode""qualityScore""changes""changes.status""changes.allowCategoryChange"
filterStatesArray of strings(WhatsappTemplateStatesEnum)

Optionally query for sender by states.

Items Enum:"APPROVED""DISABLED""PAUSED""REJECTED"
filterStatusesArray of strings(WhatsappTemplateStatusesEnum)

Optionally query for sender by statuses.

Items Enum:"DRAFT""IN_PROGRESS""REJECTED"
templateAnalyticsDateRangestring(WhatsappTemplateAnalyticsDateRangesEnum)

The date range to retrieve template analytics for. Fallback to DAY if none is set.

Enum:"DAY""MONTH""QUARTER""WEEK"
templateNamestring

Optionally query for template by name. Will return all templates with names that begin with the query string.

curl -i -X GET \
  -u '<username>:<password>' \
  'https://provisioning.api.sinch.com/v1/projects/{projectId}/whatsapp/templates?pageToken=string&pageSize=1&fieldMask=whatsappId&filterStates=APPROVED&filterStatuses=DRAFT&templateAnalyticsDateRange=DAY&templateName=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List of templates

Bodyapplication/json
One of:
totalSizenumberrequired

Total size of the entries matching the search query.

pageSizenumberrequired

Requested size of the page.

templatesArray of objects(WhatsappTemplateDto)required
previousPageTokenstring

Encoded token to use in list request to fetch previous batch of entries.

nextPageTokenstring

Encoded token to use in list request to fetch next batch of entries.

Response
{ "totalSize": 0, "pageSize": 0, "previousPageToken": "string", "nextPageToken": "string", "templates": [ { … } ] }
We'd love to hear from you!
Rate this content: