Twilio SendGrid Templates API
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as "active" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active.
This API provides operations to create and manage your templates as well as their versions.
Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts.
Endpoints 11
Templates
- GETRetrieve paged transactional templates.
/v3/templates?generations=legacy&page_size=1.0&page_token=stringThis endpoint allows you to retrieve all transactional templates. - POSTCreate a transactional template.
/v3/templatesThis endpoint allows you to create a transactional template. - GETRetrieve a single transactional template.
/v3/templates/:template_idThis endpoint allows you to retrieve a single transactional template. - POSTDuplicate a transactional template.
/v3/templates/:template_idThis endpoint allows you to duplicate a transactional template. - DELETEDelete a template.
/v3/templates/:template_idThis endpoint allows you to delete a transactional template. - PATCHEdit a transactional template.
/v3/templates/:template_idThis endpoint allows you to edit the name of a transactional template. To edit the template itself, create a new transactional template version.
Templates Versions
- POSTCreate a new transactional template version.
/v3/templates/:template_id/versionsThis endpoint allows you to create a new version of a template. - GETRetrieve a specific transactional template version.
/v3/templates/:template_id/versions/:version_idThis endpoint allows you to retrieve a specific version of a template. - DELETEDelete a transactional template version.
/v3/templates/:template_id/versions/:version_idThis endpoint allows you to delete a transactional template version. - PATCHEdit a transactional template version.
/v3/templates/:template_id/versions/:version_idThis endpoint allows you to edit the content of your template version. - POSTActivate a transactional template version.
/v3/templates/:template_id/versions/:version_id/activateThis endpoint allows you to activate a version of one of your templates.
API details
- Base URL
https://api.sendgrid.comhttps://api.eu.sendgrid.com- Authentication
- A bearer token in the Authorization header
- Operations
- 11 operations on 5 pathsPOST 4GET 3PATCH 2DELETE 2
- Main resources
- Templates 6Templates Versions 5
- Response formats
application/json- Description format
- OpenAPI 3.1.0, API version
1.0.0 - Links
- Documentation · OpenAPI document · Terms of service · Support
How to test the Twilio SendGrid Templates API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Twilio SendGrid Templates API collection, without the publisher's secrets.
- Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Retrieve paged transactional templates.” (GET /v3/templates?generations=legacy&page_size=1.0&page_token=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Twilio SendGrid Templates API?
The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will… It is listed under Communication and has 11 endpoints.
Who publishes the Twilio SendGrid Templates API?
It is listed from SendGrid's public API description (an OpenAPI document), not published by SendGrid on Swastik Codes. Anyone who controls sendgrid.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Twilio SendGrid Templates API?
Its description lists 2 base URLs: https://api.sendgrid.com, https://api.eu.sendgrid.com. The first is the usual one; the others are typically sandbox or regional servers.
How do I authenticate with the Twilio SendGrid Templates API?
With A bearer token in the Authorization header.
How many endpoints does the Twilio SendGrid Templates API have?
11 operations on 5 paths (4 POST, 3 GET, 2 PATCH, 2 DELETE). The largest groups are Templates, Templates Versions.
Is forking the Twilio SendGrid Templates API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.