List all the available templates for a given Account.

GET /v2/Templates

List all the available templates for a given Account.

Query parameters

  • FriendlyName string

    String filter used to query templates with a given friendly name.

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • templates array[object]
      Hide templates attributes Show templates attributes object
      • sid string | null

        A 34 character string that uniquely identifies a Verification Template.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^HJ[0-9a-fA-F]{32}$.

      • account_sid string | null

        The unique SID identifier of the Account.

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • friendly_name string | null

        A descriptive string that you create to describe a Template. It can be up to 32 characters long.

      • channels array[string] | null

        A list of channels that support the Template. Can include: sms, voice.

      • translations

        An object that contains the different translations of the template. Every translation is identified by the language short name and contains its respective information as the approval status, text and created/modified date.

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v2/Templates
curl \
 --request GET 'https://verify.twilio.com/v2/Templates' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "templates",
    "url": "https://verify.twilio.com/v2/Templates?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://verify.twilio.com/v2/Templates?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "templates": [
    {
      "sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "channels": [
        "sms"
      ],
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "translations": {
        "en": {
          "text": "Your {{friendly_name}} verification code is: {{code}}. Do not share this code with anyone.",
          "locale": "en",
          "status": "approved",
          "date_created": "2021-07-29T20:38:28.165602325Z",
          "date_updated": "2021-07-29T20:38:28.759979905Z",
          "is_default_translation": true
        }
      },
      "friendly_name": "Base Verification Template 2 with do not share"
    },
    {
      "sid": "HJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
      "channels": [
        "sms",
        "voice"
      ],
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "translations": {
        "en": {
          "text": "Your verification code is: {{code}}. Do not share it.",
          "locale": "en",
          "status": "approved",
          "date_created": "2021-07-29T20:38:28.165602325Z",
          "date_updated": "2021-07-29T20:38:28.759979905Z",
          "is_default_translation": true
        }
      },
      "friendly_name": "Base Verification Template 3"
    }
  ]
}