Twilio Templates API

Manage dynamic email templates

Operations 7

GET /templates Twilio List Email Templates #
POST /templates Twilio Create an Email Template #
GET /templates/{template_id} Twilio Fetch a Template #
PATCH /templates/{template_id} Twilio Update a Template #
DELETE /templates/{template_id} Twilio Delete a Template #
POST /templates/{template_id}/versions Twilio Create a Template Version #
GET /v2/Templates #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/twilio-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

twilio-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Twilio Templates API
  termsOfService: https://www.twilio.com/legal/tos
  version: '1.0'
  description: 'Operations tagged Templates across 2 of this provider''s published API definitions: twilio-sendgrid-openapi.yml, verify-openapi-original.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.sendgrid.com/v3
  description: SendGrid API v3
- url: https://verify.twilio.com
tags:
- name: Templates
  description: Manage dynamic email templates
paths:
  /templates:
    get:
      operationId: listTemplates
      summary: Twilio List Email Templates
      description: Retrieve all transactional or dynamic templates.
      tags:
      - Templates
      parameters:
      - name: generations
        in: query
        description: Filter by template generation
        schema:
          type: string
          enum:
          - legacy
          - dynamic
      - name: page_size
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 200
      responses:
        '200':
          description: List of templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateList'
      security:
      - bearerAuth: []
    post:
      operationId: createTemplate
      summary: Twilio Create an Email Template
      tags:
      - Templates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                  description: Template name (max 100 characters)
                  maxLength: 100
                generation:
                  type: string
                  enum:
                  - legacy
                  - dynamic
                  default: dynamic
      responses:
        '201':
          description: Template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.sendgrid.com/v3
      description: SendGrid API v3
  /templates/{template_id}:
    get:
      operationId: fetchTemplate
      summary: Twilio Fetch a Template
      tags:
      - Templates
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Template details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
        '404':
          description: Template not found
      security:
      - bearerAuth: []
    patch:
      operationId: updateTemplate
      summary: Twilio Update a Template
      tags:
      - Templates
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 100
      responses:
        '200':
          description: Template updated
      security:
      - bearerAuth: []
    delete:
      operationId: deleteTemplate
      summary: Twilio Delete a Template
      tags:
      - Templates
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Template deleted
      security:
      - bearerAuth: []
    servers:
    - url: https://api.sendgrid.com/v3
      description: SendGrid API v3
  /templates/{template_id}/versions:
    post:
      operationId: createTemplateVersion
      summary: Twilio Create a Template Version
      tags:
      - Templates
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTemplateVersionRequest'
      responses:
        '201':
          description: Template version created
      security:
      - bearerAuth: []
    servers:
    - url: https://api.sendgrid.com/v3
      description: SendGrid API v3
  /v2/Templates:
    servers:
    - url: https://verify.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      pathType: list
    get:
      description: List all the available templates for a given Account.
      tags:
      - Templates
      parameters:
      - name: FriendlyName
        in: query
        description: String filter used to query templates with a given friendly name.
        schema:
          type: string
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is 50, and the maximum is 1000.
        schema:
          type: integer
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVerificationTemplateResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListVerificationTemplate
      x-maturity:
      - GA
components:
  schemas:
    TemplateVersion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        template_id:
          type: string
          format: uuid
        name:
          type: string
        subject:
          type: string
        html_content:
          type: string
        plain_content:
          type: string
        active:
          type: integer
          enum:
          - 0
          - 1
        editor:
          type: string
          enum:
          - code
          - design
        generate_plain_content:
          type: boolean
        updated_at:
          type: string
          format: date-time
    TemplateList:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/Template'
        _metadata:
          type: object
          properties:
            count:
              type: integer
    Template:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        generation:
          type: string
          enum:
          - legacy
          - dynamic
        updated_at:
          type: string
          format: date-time
        versions:
          type: array
          items:
            $ref: '#/components/schemas/TemplateVersion'
    CreateTemplateVersionRequest:
      type: object
      required:
      - name
      - subject
      properties:
        name:
          type: string
          maxLength: 100
        subject:
          type: string
        html_content:
          type: string
        plain_content:
          type: string
        active:
          type: integer
          enum:
          - 0
          - 1
        editor:
          type: string
          enum:
          - code
          - design
        generate_plain_content:
          type: boolean
          default: true
        test_data:
          type: string
          description: JSON test data for template preview
    ListVerificationTemplateResponse:
      type: object
      properties:
        templates:
          type: array
          items:
            $ref: '#/components/schemas/verify.v2.verification_template'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type:
              - string
              - 'null'
              format: uri
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type:
              - string
              - 'null'
              format: uri
            url:
              type: string
              format: uri
            key:
              type: string
    verify.v2.verification_template:
      type: object
      properties:
        sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^HJ[0-9a-fA-F]{32}$
          description: A 34 character string that uniquely identifies a Verification Template.
        account_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          description: The unique SID identifier of the Account.
        friendly_name:
          type:
          - string
          - 'null'
          description: A descriptive string that you create to describe a Template. It can be up to 32 characters long.
        channels:
          type:
          - array
          - 'null'
          items:
            type: string
          description: 'A list of channels that support the Template. Can include: sms, voice.'
        translations:
          description: 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.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use a SendGrid API key as the bearer token for authentication.
    accountSid_authToken:
      type: http
      scheme: basic
externalDocs:
  description: Twilio SendGrid API Documentation
  url: https://www.twilio.com/docs/sendgrid
x-refined-from:
- twilio-sendgrid-openapi.yml
- verify-openapi-original.yml
x-maturity:
- name: GA
  description: This product is Generally Available.
- name: Beta
  description: PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution.