{"files":{"SKILL.md":"---\nname: twilio-sendgrid-templates-api\ndescription: \"Twilio SendGrid Templates API skill. Use when working with Twilio SendGrid Templates for templates. Covers 11 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Twilio SendGrid Templates API\nAPI version: 1.0.0\n\n## Auth\nBearer bearer\n\n## Base URL\nhttps://api.sendgrid.com\n\n## Setup\n1. Set Authorization header with Bearer token\n2. GET /v3/templates -- retrieve paged transactional templates.\n3. POST /v3/templates -- create first template\n\n## Endpoints\n11 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Templates\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /v3/templates | Create a transactional template. |\n| GET | /v3/templates | Retrieve paged transactional templates. |\n| POST | /v3/templates/{template_id} | Duplicate a transactional template. |\n| GET | /v3/templates/{template_id} | Retrieve a single transactional template. |\n| PATCH | /v3/templates/{template_id} | Edit a transactional template. |\n| DELETE | /v3/templates/{template_id} | Delete a template. |\n| POST | /v3/templates/{template_id}/versions | Create a new transactional template version. |\n| GET | /v3/templates/{template_id}/versions/{version_id} | Retrieve a specific transactional template version. |\n| PATCH | /v3/templates/{template_id}/versions/{version_id} | Edit a transactional template version. |\n| DELETE | /v3/templates/{template_id}/versions/{version_id} | Delete a transactional template version. |\n| POST | /v3/templates/{template_id}/versions/{version_id}/activate | Activate a transactional template version. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a template?\" -> POST /v3/templates\n- \"List all templates?\" -> GET /v3/templates\n- \"Get template details?\" -> GET /v3/templates/{template_id}\n- \"Partially update a template?\" -> PATCH /v3/templates/{template_id}\n- \"Delete a template?\" -> DELETE /v3/templates/{template_id}\n- \"Create a version?\" -> POST /v3/templates/{template_id}/versions\n- \"Get version details?\" -> GET /v3/templates/{template_id}/versions/{version_id}\n- \"Partially update a version?\" -> PATCH /v3/templates/{template_id}/versions/{version_id}\n- \"Delete a version?\" -> DELETE /v3/templates/{template_id}/versions/{version_id}\n- \"Create a activate?\" -> POST /v3/templates/{template_id}/versions/{version_id}/activate\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Twilio SendGrid Templates API\n@base https://api.sendgrid.com\n@version 1.0.0\n@auth Bearer bearer\n@common_fields {on-behalf-of: str # The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.}\n@endpoints 11\n@toc templates(11)\n\n@endpoint POST /v3/templates\n@desc Create a transactional template.\n@required {name: str # The name for the new transactional template.}\n@optional {generation: str(legacy/dynamic)}\n@returns(201) {id: str(uuid), name: str, generation: str, updated_at: str, versions: [map], warning: map{message: str}}\n\n@endpoint GET /v3/templates\n@desc Retrieve paged transactional templates.\n@required {page_size: num # The number of templates to be returned in each page of results}\n@optional {generations: str=legacy # Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`., page_token: str # A token corresponding to a specific page of results, as provided by metadata}\n@returns(200) {result: [map], _metadata: map{prev: str(uri), self: str(uri), next: str(uri), count: int}}\n@errors {400}\n\n@endpoint POST /v3/templates/{template_id}\n@desc Duplicate a transactional template.\n@optional {name: str # The name for the new transactional template.}\n@returns(201) {id: str(uuid), name: str, generation: str, updated_at: str, versions: [map], warning: map{message: str}}\n\n@endpoint GET /v3/templates/{template_id}\n@desc Retrieve a single transactional template.\n@returns(200) {id: str(uuid), name: str, generation: str, updated_at: str, versions: [map], warning: map{message: str}}\n\n@endpoint PATCH /v3/templates/{template_id}\n@desc Edit a transactional template.\n@optional {name: str # The name of the transactional template.}\n@returns(200) {id: str(uuid), name: str, generation: str, updated_at: str, versions: [map], warning: map{message: str}}\n\n@endpoint DELETE /v3/templates/{template_id}\n@desc Delete a template.\n@returns(204)\n\n@endpoint POST /v3/templates/{template_id}/versions\n@desc Create a new transactional template version.\n@required {name: str # Name of the transactional template version., subject: str # Subject of the new transactional template version.}\n@optional {active: int(0/1), html_content: str # The HTML content of the version. Maximum of 1048576 bytes allowed., plain_content: str=<generated from html_content if left empty> # Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed., generate_plain_content: bool=true # If true, plain_content is always generated from html_content. If false, plain_content is not altered., editor: str(code/design), test_data: str # For dynamic templates only, the mock json data that will be used for template preview and test sends.}\n@returns(201) {warnings: [map], active: int, name: str, html_content: str, plain_content: str, generate_plain_content: bool, subject: str, editor: str, test_data: str, id: str(uuid), template_id: str, updated_at: str, thumbnail_url: str}\n\n@endpoint GET /v3/templates/{template_id}/versions/{version_id}\n@desc Retrieve a specific transactional template version.\n@returns(200) {warnings: [map], active: int, name: str, html_content: str, plain_content: str, generate_plain_content: bool, subject: str, editor: str, test_data: str, id: str(uuid), template_id: str, updated_at: str, thumbnail_url: str}\n\n@endpoint PATCH /v3/templates/{template_id}/versions/{version_id}\n@desc Edit a transactional template version.\n@required {name: str # Name of the transactional template version., subject: str # Subject of the new transactional template version.}\n@optional {active: int(0/1), html_content: str # The HTML content of the version. Maximum of 1048576 bytes allowed., plain_content: str=<generated from html_content if left empty> # Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed., generate_plain_content: bool=true # If true, plain_content is always generated from html_content. If false, plain_content is not altered., editor: str(code/design), test_data: str # For dynamic templates only, the mock json data that will be used for template preview and test sends.}\n@returns(200) {warnings: [map], active: int, name: str, html_content: str, plain_content: str, generate_plain_content: bool, subject: str, editor: str, test_data: str, id: str(uuid), template_id: str, updated_at: str, thumbnail_url: str}\n\n@endpoint DELETE /v3/templates/{template_id}/versions/{version_id}\n@desc Delete a transactional template version.\n@returns(204)\n\n@endpoint POST /v3/templates/{template_id}/versions/{version_id}/activate\n@desc Activate a transactional template version.\n@returns(200) {warnings: [map], active: int, name: str, html_content: str, plain_content: str, generate_plain_content: bool, subject: str, editor: str, test_data: str, id: str(uuid), template_id: str, updated_at: str, thumbnail_url: str}\n\n@end\n"}}