Skip to content

List all templates for a specific name
GA

Request

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.

Security
BasicAuth and BearerAuth and OAuth2Production
Path
projectIdstringrequired

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

templateNamestringrequired

The unique name of the template.

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"
templateAnalyticsDateRangestring(WhatsappTemplateAnalyticsDateRangesEnum)

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

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

Responses

List of templates with the same name

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: