[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76S3KRT5GSF2QTF9MMCGS0M":3,"skill-same:01M76S3KRT5GSF2QTF9MMCGS0M":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":13,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M76S3KRT5GSF2QTF9MMCGS0M","sendgrid",null,"SendGrid API integration with managed OAuth. Send emails, manage contacts, templates, suppressions, and view email statistics.\nUse this skill when users want to send transactional or marketing emails, manage email lists, handle bounces\u002Funsubscribes, or analyze email performance.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","meghal86\u002Fstacksignal","meghal86","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37388715?v=4","01M6CS2EW8SK89GH52R2ZEN8QQ","01M728J5CGY456EETEFG6HJBTM",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsendgrid\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsendgrid\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: sendgrid\ndescription: |\n  SendGrid API integration with managed OAuth. Send emails, manage contacts, templates, suppressions, and view email statistics.\n  Use this skill when users want to send transactional or marketing emails, manage email lists, handle bounces\u002Funsubscribes, or analyze email performance.\n  For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\n  Requires network access and valid Maton API key.\nmetadata:\n  author: maton\n  version: \"1.0\"\n  clawdbot:\n    emoji: 🧠\n    requires:\n      env:\n        - MATON_API_KEY\n---\n\n# SendGrid\n\nAccess the SendGrid API with managed OAuth authentication. Send transactional and marketing emails, manage contacts, templates, suppressions, and analyze email performance.\n\n## Quick Start\n\n```bash\n# Get user profile\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002F{native-api-path}\n```\n\nReplace `{native-api-path}` with the actual SendGrid API endpoint path. The gateway proxies requests to `api.sendgrid.com` and automatically injects your OAuth token.\n\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n## Connection Management\n\nManage your SendGrid OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?app=sendgrid&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'sendgrid'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"connection\": {\n    \"connection_id\": \"943c6cd5-9a56-4f5b-8adf-ecd4a140049f\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-11T10:53:41.817938Z\",\n    \"last_updated_time\": \"2026-02-11T10:54:05.554084Z\",\n    \"url\": \"https:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"sendgrid\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Specifying Connection\n\nIf you have multiple SendGrid connections, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '943c6cd5-9a56-4f5b-8adf-ecd4a140049f')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\n## API Reference\n\nAll SendGrid API endpoints follow this pattern:\n\n```\n\u002Fsendgrid\u002Fv3\u002F{resource}\n```\n\n---\n\n## Mail Send\n\n### Send Email\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend\nContent-Type: application\u002Fjson\n\n{\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"recipient@example.com\", \"name\": \"Recipient\"}],\n      \"subject\": \"Hello from SendGrid\"\n    }\n  ],\n  \"from\": {\"email\": \"sender@example.com\", \"name\": \"Sender\"},\n  \"content\": [\n    {\n      \"type\": \"text\u002Fplain\",\n      \"value\": \"This is a test email.\"\n    }\n  ]\n}\n```\n\n**With HTML content:**\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend\nContent-Type: application\u002Fjson\n\n{\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"recipient@example.com\"}],\n      \"subject\": \"HTML Email\"\n    }\n  ],\n  \"from\": {\"email\": \"sender@example.com\"},\n  \"content\": [\n    {\n      \"type\": \"text\u002Fhtml\",\n      \"value\": \"\u003Ch1>Hello\u003C\u002Fh1>\u003Cp>This is an HTML email.\u003C\u002Fp>\"\n    }\n  ]\n}\n```\n\n**With template:**\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend\nContent-Type: application\u002Fjson\n\n{\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"recipient@example.com\"}],\n      \"dynamic_template_data\": {\n        \"first_name\": \"John\",\n        \"order_id\": \"12345\"\n      }\n    }\n  ],\n  \"from\": {\"email\": \"sender@example.com\"},\n  \"template_id\": \"d-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n}\n```\n\n---\n\n## User Profile\n\n### Get User Profile\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile\n```\n\n**Response:**\n```json\n{\n  \"type\": \"user\",\n  \"userid\": 59796657\n}\n```\n\n### Get Account Details\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fuser\u002Faccount\n```\n\n---\n\n## Marketing Contacts\n\n### List Contacts\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\n```\n\n**Response:**\n```json\n{\n  \"result\": [],\n  \"contact_count\": 0,\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Fcontacts\"\n  }\n}\n```\n\n### Search Contacts\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002Fsearch\nContent-Type: application\u002Fjson\n\n{\n  \"query\": \"email LIKE '%@example.com%'\"\n}\n```\n\n### Add\u002FUpdate Contacts\n\n```bash\nPUT \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\nContent-Type: application\u002Fjson\n\n{\n  \"contacts\": [\n    {\n      \"email\": \"contact@example.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\"\n    }\n  ]\n}\n```\n\n**Response:**\n```json\n{\n  \"job_id\": \"2387e363-4104-4225-8960-4a5758492351\"\n}\n```\n\n**Note:** Contact operations are asynchronous. Use the job status endpoint to check progress.\n\n### Get Import Job Status\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002Fimports\u002F{job_id}\n```\n\n**Response:**\n```json\n{\n  \"id\": \"2387e363-4104-4225-8960-4a5758492351\",\n  \"status\": \"pending\",\n  \"job_type\": \"upsert_contacts\",\n  \"results\": {\n    \"requested_count\": 1,\n    \"created_count\": 1\n  },\n  \"started_at\": \"2026-02-11T11:00:14Z\"\n}\n```\n\n### Delete Contacts\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts?ids=contact_id_1,contact_id_2\n```\n\n### Get Contact by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002F{contact_id}\n```\n\n### Get Contact by Email\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002Fsearch\u002Femails\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"contact@example.com\"]\n}\n```\n\n---\n\n## Marketing Lists\n\n### List All Lists\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\n```\n\n**Response:**\n```json\n{\n  \"result\": [],\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token=\"\n  }\n}\n```\n\n### Create List\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"My Contact List\"\n}\n```\n\n**Response:**\n```json\n{\n  \"name\": \"My Contact List\",\n  \"id\": \"b050f139-4231-47c8-bf32-94ad76376d3b\",\n  \"contact_count\": 0,\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists\u002Fb050f139-4231-47c8-bf32-94ad76376d3b\"\n  }\n}\n```\n\n### Get List by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\u002F{list_id}\n```\n\n### Update List\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\u002F{list_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated List Name\"\n}\n```\n\n### Delete List\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\u002F{list_id}\n```\n\n### Add Contacts to List\n\n```bash\nPUT \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\nContent-Type: application\u002Fjson\n\n{\n  \"list_ids\": [\"list_id\"],\n  \"contacts\": [\n    {\"email\": \"contact@example.com\"}\n  ]\n}\n```\n\n---\n\n## Segments\n\n### List Segments\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\n```\n\n### Create Segment\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Active Users\",\n  \"query_dsl\": \"email_clicks > 0\"\n}\n```\n\n### Get Segment by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\u002F{segment_id}\n```\n\n### Delete Segment\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\u002F{segment_id}\n```\n\n---\n\n## Templates\n\n### List Templates\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Ftemplates\n```\n\n**With generation filter:**\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Ftemplates?generations=dynamic\n```\n\n### Create Template\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Ftemplates\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"My Template\",\n  \"generation\": \"dynamic\"\n}\n```\n\n**Response:**\n```json\n{\n  \"id\": \"d-ffcdb43ed8a04beba48a702e1717ddb5\",\n  \"name\": \"My Template\",\n  \"generation\": \"dynamic\",\n  \"updated_at\": \"2026-02-11 11:00:20\",\n  \"versions\": []\n}\n```\n\n### Get Template by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\n```\n\n### Update Template\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated Template Name\"\n}\n```\n\n### Delete Template\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\n```\n\n### Create Template Version\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\u002Fversions\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Version 1\",\n  \"subject\": \"{{subject}}\",\n  \"html_content\": \"\u003Chtml>\u003Cbody>\u003Ch1>Hello {{name}}\u003C\u002Fh1>\u003C\u002Fbody>\u003C\u002Fhtml>\",\n  \"active\": 1\n}\n```\n\n**Response:**\n```json\n{\n  \"id\": \"54230a99-1e89-4edf-821d-d4925b40c64b\",\n  \"template_id\": \"d-ffcdb43ed8a04beba48a702e1717ddb5\",\n  \"active\": 1,\n  \"name\": \"Version 1\",\n  \"html_content\": \"\u003Chtml>\u003Cbody>\u003Ch1>Hello {{name}}\u003C\u002Fh1>\u003C\u002Fbody>\u003C\u002Fhtml>\",\n  \"plain_content\": \"Hello {{name}}\",\n  \"generate_plain_content\": true,\n  \"subject\": \"{{subject}}\",\n  \"editor\": \"code\",\n  \"thumbnail_url\": \"\u002F\u002F...\"\n}\n```\n\n---\n\n## Senders\n\n### List Senders\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fsenders\n```\n\n### Create Sender\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fsenders\nContent-Type: application\u002Fjson\n\n{\n  \"nickname\": \"My Sender\",\n  \"from\": {\"email\": \"sender@example.com\", \"name\": \"Sender Name\"},\n  \"reply_to\": {\"email\": \"reply@example.com\", \"name\": \"Reply To\"},\n  \"address\": \"123 Main St\",\n  \"city\": \"San Francisco\",\n  \"country\": \"USA\"\n}\n```\n\n**Response:**\n```json\n{\n  \"id\": 8513177,\n  \"nickname\": \"My Sender\",\n  \"from\": {\"email\": \"sender@example.com\", \"name\": \"Sender Name\"},\n  \"reply_to\": {\"email\": \"reply@example.com\", \"name\": \"Reply To\"},\n  \"address\": \"123 Main St\",\n  \"city\": \"San Francisco\",\n  \"country\": \"USA\",\n  \"verified\": {\"status\": false, \"reason\": null},\n  \"updated_at\": 1770786031,\n  \"created_at\": 1770786031,\n  \"locked\": false\n}\n```\n\n**Note:** Sender verification is required before use. Check `verified.status`.\n\n### Get Sender by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fsenders\u002F{sender_id}\n```\n\n### Update Sender\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fsenders\u002F{sender_id}\nContent-Type: application\u002Fjson\n\n{\n  \"nickname\": \"Updated Sender Name\"\n}\n```\n\n### Delete Sender\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fsenders\u002F{sender_id}\n```\n\n---\n\n## Suppressions\n\n### Bounces\n\n```bash\n# List bounces\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces\n\n# Get bounce by email\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces\u002F{email}\n\n# Delete bounces\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"bounce@example.com\"]\n}\n```\n\n### Blocks\n\n```bash\n# List blocks\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fblocks\n\n# Get block by email\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fblocks\u002F{email}\n\n# Delete blocks\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fblocks\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"blocked@example.com\"]\n}\n```\n\n### Invalid Emails\n\n```bash\n# List invalid emails\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Finvalid_emails\n\n# Delete invalid emails\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Finvalid_emails\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"invalid@example.com\"]\n}\n```\n\n### Spam Reports\n\n```bash\n# List spam reports\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fspam_reports\n\n# Delete spam reports\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fspam_reports\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"spam@example.com\"]\n}\n```\n\n### Global Unsubscribes\n\n```bash\n# List global unsubscribes\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Funsubscribes\n\n# Add to global unsubscribes\nPOST \u002Fsendgrid\u002Fv3\u002Fasm\u002Fsuppressions\u002Fglobal\nContent-Type: application\u002Fjson\n\n{\n  \"recipient_emails\": [\"unsubscribe@example.com\"]\n}\n```\n\n---\n\n## Unsubscribe Groups (ASM)\n\n### List Groups\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\n```\n\n### Create Group\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Weekly Newsletter\",\n  \"description\": \"Weekly newsletter updates\"\n}\n```\n\n**Response:**\n```json\n{\n  \"name\": \"Weekly Newsletter\",\n  \"id\": 122741,\n  \"description\": \"Weekly newsletter updates\",\n  \"is_default\": false\n}\n```\n\n### Get Group by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\n```\n\n### Update Group\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated Group Name\"\n}\n```\n\n### Delete Group\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\n```\n\n### Add Suppressions to Group\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\u002Fsuppressions\nContent-Type: application\u002Fjson\n\n{\n  \"recipient_emails\": [\"user@example.com\"]\n}\n```\n\n### List Suppressions in Group\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\u002Fsuppressions\n```\n\n---\n\n## Statistics\n\n### Get Global Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fstats?start_date=2026-02-01\n```\n\n**With end date:**\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fstats?start_date=2026-02-01&end_date=2026-02-28\n```\n\n**Response:**\n```json\n[\n  {\n    \"date\": \"2026-02-01\",\n    \"stats\": [\n      {\n        \"metrics\": {\n          \"blocks\": 0,\n          \"bounce_drops\": 0,\n          \"bounces\": 0,\n          \"clicks\": 0,\n          \"deferred\": 0,\n          \"delivered\": 0,\n          \"invalid_emails\": 0,\n          \"opens\": 0,\n          \"processed\": 0,\n          \"requests\": 0,\n          \"spam_report_drops\": 0,\n          \"spam_reports\": 0,\n          \"unique_clicks\": 0,\n          \"unique_opens\": 0,\n          \"unsubscribe_drops\": 0,\n          \"unsubscribes\": 0\n        }\n      }\n    ]\n  }\n]\n```\n\n### Category Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fcategories\u002Fstats?start_date=2026-02-01&categories=category1,category2\n```\n\n### Mailbox Provider Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmailbox_providers\u002Fstats?start_date=2026-02-01\n```\n\n### Browser Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fbrowsers\u002Fstats?start_date=2026-02-01\n```\n\n---\n\n## API Keys\n\n### List API Keys\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fapi_keys\n```\n\n**Response:**\n```json\n{\n  \"result\": [\n    {\n      \"name\": \"MatonTest\",\n      \"api_key_id\": \"WJBgv5EKR8y0nn2F8Qfk5w\"\n    }\n  ]\n}\n```\n\n### Create API Key\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fapi_keys\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"New API Key\",\n  \"scopes\": [\"mail.send\", \"alerts.read\"]\n}\n```\n\n### Get API Key by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fapi_keys\u002F{api_key_id}\n```\n\n### Update API Key\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fapi_keys\u002F{api_key_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated Key Name\"\n}\n```\n\n### Delete API Key\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fapi_keys\u002F{api_key_id}\n```\n\n---\n\n## Pagination\n\nSendGrid uses token-based pagination for marketing endpoints:\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token={token}\n```\n\n**Response includes:**\n```json\n{\n  \"result\": [...],\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token=\",\n    \"next\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token=abc123\"\n  }\n}\n```\n\nFor suppression endpoints, use `limit` and `offset`:\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces?limit=100&offset=0\n```\n\n## Code Examples\n\n### JavaScript\n\n```javascript\n\u002F\u002F Send an email\nconst response = await fetch(\n  'https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend',\n  {\n    method: 'POST',\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n      'Content-Type': 'application\u002Fjson'\n    },\n    body: JSON.stringify({\n      personalizations: [{\n        to: [{email: 'recipient@example.com'}],\n        subject: 'Hello'\n      }],\n      from: {email: 'sender@example.com'},\n      content: [{type: 'text\u002Fplain', value: 'Hello World'}]\n    })\n  }\n);\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\n# Get email stats\nresponse = requests.get(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fstats',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'start_date': '2026-02-01'}\n)\ndata = response.json()\nfor day in data:\n    metrics = day['stats'][0]['metrics']\n    print(f\"{day['date']}: {metrics['delivered']} delivered, {metrics['opens']} opens\")\n```\n\n## Notes\n\n- All requests use JSON content type\n- Dates are in YYYY-MM-DD format\n- Template IDs for dynamic templates start with `d-`\n- Mail send returns 202 Accepted on success (not 200)\n- Marketing contact operations are asynchronous - use job status endpoints\n- Suppression endpoints support date filtering with `start_time` and `end_time` (Unix timestamps)\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets to disable glob parsing\n- IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Bad request or validation error |\n| 401 | Invalid or missing Maton API key |\n| 403 | Insufficient permissions |\n| 404 | Resource not found |\n| 429 | Rate limited |\n| 500 | Internal server error |\n\n### Troubleshooting: API Key Issues\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Troubleshooting: Invalid App Name\n\n1. Ensure your URL path starts with `sendgrid`. For example:\n\n- Correct: `https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile`\n- Incorrect: `https:\u002F\u002Fgateway.maton.ai\u002Fv3\u002Fuser\u002Fprofile`\n\n## Resources\n\n- [SendGrid API Documentation](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference)\n- [Mail Send API](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference\u002Fmail-send)\n- [Marketing Campaigns API](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference\u002Fcontacts)\n- [Suppressions Overview](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference\u002Fsuppressions)\n- [Maton Community](https:\u002F\u002Fdiscord.com\u002Finvite\u002FdBfFAcefs2)\n- [Maton Support](mailto:support@maton.ai)\n","# SendGrid\n\nAccess the SendGrid API with managed OAuth authentication. Send transactional and marketing emails, manage contacts, templates, suppressions, and analyze email performance.\n\n## Quick Start\n\n```bash\n# Get user profile\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002F{native-api-path}\n```\n\nReplace `{native-api-path}` with the actual SendGrid API endpoint path. The gateway proxies requests to `api.sendgrid.com` and automatically injects your OAuth token.\n\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n## Connection Management\n\nManage your SendGrid OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?app=sendgrid&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'sendgrid'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n**Response:**\n```json\n{\n  \"connection\": {\n    \"connection_id\": \"943c6cd5-9a56-4f5b-8adf-ecd4a140049f\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2026-02-11T10:53:41.817938Z\",\n    \"last_updated_time\": \"2026-02-11T10:54:05.554084Z\",\n    \"url\": \"https:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"sendgrid\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Specifying Connection\n\nIf you have multiple SendGrid connections, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '943c6cd5-9a56-4f5b-8adf-ecd4a140049f')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\n## API Reference\n\nAll SendGrid API endpoints follow this pattern:\n\n```\n\u002Fsendgrid\u002Fv3\u002F{resource}\n```\n\n---\n\n## Mail Send\n\n### Send Email\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend\nContent-Type: application\u002Fjson\n\n{\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"recipient@example.com\", \"name\": \"Recipient\"}],\n      \"subject\": \"Hello from SendGrid\"\n    }\n  ],\n  \"from\": {\"email\": \"sender@example.com\", \"name\": \"Sender\"},\n  \"content\": [\n    {\n      \"type\": \"text\u002Fplain\",\n      \"value\": \"This is a test email.\"\n    }\n  ]\n}\n```\n\n**With HTML content:**\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend\nContent-Type: application\u002Fjson\n\n{\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"recipient@example.com\"}],\n      \"subject\": \"HTML Email\"\n    }\n  ],\n  \"from\": {\"email\": \"sender@example.com\"},\n  \"content\": [\n    {\n      \"type\": \"text\u002Fhtml\",\n      \"value\": \"\u003Ch1>Hello\u003C\u002Fh1>\u003Cp>This is an HTML email.\u003C\u002Fp>\"\n    }\n  ]\n}\n```\n\n**With template:**\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend\nContent-Type: application\u002Fjson\n\n{\n  \"personalizations\": [\n    {\n      \"to\": [{\"email\": \"recipient@example.com\"}],\n      \"dynamic_template_data\": {\n        \"first_name\": \"John\",\n        \"order_id\": \"12345\"\n      }\n    }\n  ],\n  \"from\": {\"email\": \"sender@example.com\"},\n  \"template_id\": \"d-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n}\n```\n\n---\n\n## User Profile\n\n### Get User Profile\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile\n```\n\n**Response:**\n```json\n{\n  \"type\": \"user\",\n  \"userid\": 59796657\n}\n```\n\n### Get Account Details\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fuser\u002Faccount\n```\n\n---\n\n## Marketing Contacts\n\n### List Contacts\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\n```\n\n**Response:**\n```json\n{\n  \"result\": [],\n  \"contact_count\": 0,\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Fcontacts\"\n  }\n}\n```\n\n### Search Contacts\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002Fsearch\nContent-Type: application\u002Fjson\n\n{\n  \"query\": \"email LIKE '%@example.com%'\"\n}\n```\n\n### Add\u002FUpdate Contacts\n\n```bash\nPUT \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\nContent-Type: application\u002Fjson\n\n{\n  \"contacts\": [\n    {\n      \"email\": \"contact@example.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\"\n    }\n  ]\n}\n```\n\n**Response:**\n```json\n{\n  \"job_id\": \"2387e363-4104-4225-8960-4a5758492351\"\n}\n```\n\n**Note:** Contact operations are asynchronous. Use the job status endpoint to check progress.\n\n### Get Import Job Status\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002Fimports\u002F{job_id}\n```\n\n**Response:**\n```json\n{\n  \"id\": \"2387e363-4104-4225-8960-4a5758492351\",\n  \"status\": \"pending\",\n  \"job_type\": \"upsert_contacts\",\n  \"results\": {\n    \"requested_count\": 1,\n    \"created_count\": 1\n  },\n  \"started_at\": \"2026-02-11T11:00:14Z\"\n}\n```\n\n### Delete Contacts\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts?ids=contact_id_1,contact_id_2\n```\n\n### Get Contact by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002F{contact_id}\n```\n\n### Get Contact by Email\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\u002Fsearch\u002Femails\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"contact@example.com\"]\n}\n```\n\n---\n\n## Marketing Lists\n\n### List All Lists\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\n```\n\n**Response:**\n```json\n{\n  \"result\": [],\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token=\"\n  }\n}\n```\n\n### Create List\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"My Contact List\"\n}\n```\n\n**Response:**\n```json\n{\n  \"name\": \"My Contact List\",\n  \"id\": \"b050f139-4231-47c8-bf32-94ad76376d3b\",\n  \"contact_count\": 0,\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists\u002Fb050f139-4231-47c8-bf32-94ad76376d3b\"\n  }\n}\n```\n\n### Get List by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\u002F{list_id}\n```\n\n### Update List\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\u002F{list_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated List Name\"\n}\n```\n\n### Delete List\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists\u002F{list_id}\n```\n\n### Add Contacts to List\n\n```bash\nPUT \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fcontacts\nContent-Type: application\u002Fjson\n\n{\n  \"list_ids\": [\"list_id\"],\n  \"contacts\": [\n    {\"email\": \"contact@example.com\"}\n  ]\n}\n```\n\n---\n\n## Segments\n\n### List Segments\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\n```\n\n### Create Segment\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Active Users\",\n  \"query_dsl\": \"email_clicks > 0\"\n}\n```\n\n### Get Segment by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\u002F{segment_id}\n```\n\n### Delete Segment\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Fsegments\u002F{segment_id}\n```\n\n---\n\n## Templates\n\n### List Templates\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Ftemplates\n```\n\n**With generation filter:**\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Ftemplates?generations=dynamic\n```\n\n### Create Template\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Ftemplates\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"My Template\",\n  \"generation\": \"dynamic\"\n}\n```\n\n**Response:**\n```json\n{\n  \"id\": \"d-ffcdb43ed8a04beba48a702e1717ddb5\",\n  \"name\": \"My Template\",\n  \"generation\": \"dynamic\",\n  \"updated_at\": \"2026-02-11 11:00:20\",\n  \"versions\": []\n}\n```\n\n### Get Template by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\n```\n\n### Update Template\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated Template Name\"\n}\n```\n\n### Delete Template\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\n```\n\n### Create Template Version\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Ftemplates\u002F{template_id}\u002Fversions\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Version 1\",\n  \"subject\": \"{{subject}}\",\n  \"html_content\": \"\u003Chtml>\u003Cbody>\u003Ch1>Hello {{name}}\u003C\u002Fh1>\u003C\u002Fbody>\u003C\u002Fhtml>\",\n  \"active\": 1\n}\n```\n\n**Response:**\n```json\n{\n  \"id\": \"54230a99-1e89-4edf-821d-d4925b40c64b\",\n  \"template_id\": \"d-ffcdb43ed8a04beba48a702e1717ddb5\",\n  \"active\": 1,\n  \"name\": \"Version 1\",\n  \"html_content\": \"\u003Chtml>\u003Cbody>\u003Ch1>Hello {{name}}\u003C\u002Fh1>\u003C\u002Fbody>\u003C\u002Fhtml>\",\n  \"plain_content\": \"Hello {{name}}\",\n  \"generate_plain_content\": true,\n  \"subject\": \"{{subject}}\",\n  \"editor\": \"code\",\n  \"thumbnail_url\": \"\u002F\u002F...\"\n}\n```\n\n---\n\n## Senders\n\n### List Senders\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fsenders\n```\n\n### Create Sender\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fsenders\nContent-Type: application\u002Fjson\n\n{\n  \"nickname\": \"My Sender\",\n  \"from\": {\"email\": \"sender@example.com\", \"name\": \"Sender Name\"},\n  \"reply_to\": {\"email\": \"reply@example.com\", \"name\": \"Reply To\"},\n  \"address\": \"123 Main St\",\n  \"city\": \"San Francisco\",\n  \"country\": \"USA\"\n}\n```\n\n**Response:**\n```json\n{\n  \"id\": 8513177,\n  \"nickname\": \"My Sender\",\n  \"from\": {\"email\": \"sender@example.com\", \"name\": \"Sender Name\"},\n  \"reply_to\": {\"email\": \"reply@example.com\", \"name\": \"Reply To\"},\n  \"address\": \"123 Main St\",\n  \"city\": \"San Francisco\",\n  \"country\": \"USA\",\n  \"verified\": {\"status\": false, \"reason\": null},\n  \"updated_at\": 1770786031,\n  \"created_at\": 1770786031,\n  \"locked\": false\n}\n```\n\n**Note:** Sender verification is required before use. Check `verified.status`.\n\n### Get Sender by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fsenders\u002F{sender_id}\n```\n\n### Update Sender\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fsenders\u002F{sender_id}\nContent-Type: application\u002Fjson\n\n{\n  \"nickname\": \"Updated Sender Name\"\n}\n```\n\n### Delete Sender\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fsenders\u002F{sender_id}\n```\n\n---\n\n## Suppressions\n\n### Bounces\n\n```bash\n# List bounces\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces\n\n# Get bounce by email\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces\u002F{email}\n\n# Delete bounces\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"bounce@example.com\"]\n}\n```\n\n### Blocks\n\n```bash\n# List blocks\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fblocks\n\n# Get block by email\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fblocks\u002F{email}\n\n# Delete blocks\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fblocks\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"blocked@example.com\"]\n}\n```\n\n### Invalid Emails\n\n```bash\n# List invalid emails\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Finvalid_emails\n\n# Delete invalid emails\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Finvalid_emails\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"invalid@example.com\"]\n}\n```\n\n### Spam Reports\n\n```bash\n# List spam reports\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fspam_reports\n\n# Delete spam reports\nDELETE \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fspam_reports\nContent-Type: application\u002Fjson\n\n{\n  \"emails\": [\"spam@example.com\"]\n}\n```\n\n### Global Unsubscribes\n\n```bash\n# List global unsubscribes\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Funsubscribes\n\n# Add to global unsubscribes\nPOST \u002Fsendgrid\u002Fv3\u002Fasm\u002Fsuppressions\u002Fglobal\nContent-Type: application\u002Fjson\n\n{\n  \"recipient_emails\": [\"unsubscribe@example.com\"]\n}\n```\n\n---\n\n## Unsubscribe Groups (ASM)\n\n### List Groups\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\n```\n\n### Create Group\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Weekly Newsletter\",\n  \"description\": \"Weekly newsletter updates\"\n}\n```\n\n**Response:**\n```json\n{\n  \"name\": \"Weekly Newsletter\",\n  \"id\": 122741,\n  \"description\": \"Weekly newsletter updates\",\n  \"is_default\": false\n}\n```\n\n### Get Group by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\n```\n\n### Update Group\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated Group Name\"\n}\n```\n\n### Delete Group\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\n```\n\n### Add Suppressions to Group\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\u002Fsuppressions\nContent-Type: application\u002Fjson\n\n{\n  \"recipient_emails\": [\"user@example.com\"]\n}\n```\n\n### List Suppressions in Group\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fasm\u002Fgroups\u002F{group_id}\u002Fsuppressions\n```\n\n---\n\n## Statistics\n\n### Get Global Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fstats?start_date=2026-02-01\n```\n\n**With end date:**\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fstats?start_date=2026-02-01&end_date=2026-02-28\n```\n\n**Response:**\n```json\n[\n  {\n    \"date\": \"2026-02-01\",\n    \"stats\": [\n      {\n        \"metrics\": {\n          \"blocks\": 0,\n          \"bounce_drops\": 0,\n          \"bounces\": 0,\n          \"clicks\": 0,\n          \"deferred\": 0,\n          \"delivered\": 0,\n          \"invalid_emails\": 0,\n          \"opens\": 0,\n          \"processed\": 0,\n          \"requests\": 0,\n          \"spam_report_drops\": 0,\n          \"spam_reports\": 0,\n          \"unique_clicks\": 0,\n          \"unique_opens\": 0,\n          \"unsubscribe_drops\": 0,\n          \"unsubscribes\": 0\n        }\n      }\n    ]\n  }\n]\n```\n\n### Category Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fcategories\u002Fstats?start_date=2026-02-01&categories=category1,category2\n```\n\n### Mailbox Provider Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmailbox_providers\u002Fstats?start_date=2026-02-01\n```\n\n### Browser Stats\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fbrowsers\u002Fstats?start_date=2026-02-01\n```\n\n---\n\n## API Keys\n\n### List API Keys\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fapi_keys\n```\n\n**Response:**\n```json\n{\n  \"result\": [\n    {\n      \"name\": \"MatonTest\",\n      \"api_key_id\": \"WJBgv5EKR8y0nn2F8Qfk5w\"\n    }\n  ]\n}\n```\n\n### Create API Key\n\n```bash\nPOST \u002Fsendgrid\u002Fv3\u002Fapi_keys\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"New API Key\",\n  \"scopes\": [\"mail.send\", \"alerts.read\"]\n}\n```\n\n### Get API Key by ID\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fapi_keys\u002F{api_key_id}\n```\n\n### Update API Key\n\n```bash\nPATCH \u002Fsendgrid\u002Fv3\u002Fapi_keys\u002F{api_key_id}\nContent-Type: application\u002Fjson\n\n{\n  \"name\": \"Updated Key Name\"\n}\n```\n\n### Delete API Key\n\n```bash\nDELETE \u002Fsendgrid\u002Fv3\u002Fapi_keys\u002F{api_key_id}\n```\n\n---\n\n## Pagination\n\nSendGrid uses token-based pagination for marketing endpoints:\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token={token}\n```\n\n**Response includes:**\n```json\n{\n  \"result\": [...],\n  \"_metadata\": {\n    \"self\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token=\",\n    \"next\": \"https:\u002F\u002Fapi.sendgrid.com\u002Fv3\u002Fmarketing\u002Flists?page_size=100&page_token=abc123\"\n  }\n}\n```\n\nFor suppression endpoints, use `limit` and `offset`:\n\n```bash\nGET \u002Fsendgrid\u002Fv3\u002Fsuppression\u002Fbounces?limit=100&offset=0\n```\n\n## Code Examples\n\n### JavaScript\n\n```javascript\n\u002F\u002F Send an email\nconst response = await fetch(\n  'https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fmail\u002Fsend',\n  {\n    method: 'POST',\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`,\n      'Content-Type': 'application\u002Fjson'\n    },\n    body: JSON.stringify({\n      personalizations: [{\n        to: [{email: 'recipient@example.com'}],\n        subject: 'Hello'\n      }],\n      from: {email: 'sender@example.com'},\n      content: [{type: 'text\u002Fplain', value: 'Hello World'}]\n    })\n  }\n);\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\n# Get email stats\nresponse = requests.get(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fstats',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'start_date': '2026-02-01'}\n)\ndata = response.json()\nfor day in data:\n    metrics = day['stats'][0]['metrics']\n    print(f\"{day['date']}: {metrics['delivered']} delivered, {metrics['opens']} opens\")\n```\n\n## Notes\n\n- All requests use JSON content type\n- Dates are in YYYY-MM-DD format\n- Template IDs for dynamic templates start with `d-`\n- Mail send returns 202 Accepted on success (not 200)\n- Marketing contact operations are asynchronous - use job status endpoints\n- Suppression endpoints support date filtering with `start_time` and `end_time` (Unix timestamps)\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets to disable glob parsing\n- IMPORTANT: When piping curl output to `jq` or other commands, environment variables like `$MATON_API_KEY` may not expand correctly in some shell environments\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Bad request or validation error |\n| 401 | Invalid or missing Maton API key |\n| 403 | Insufficient permissions |\n| 404 | Resource not found |\n| 429 | Rate limited |\n| 500 | Internal server error |\n\n### Troubleshooting: API Key Issues\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Troubleshooting: Invalid App Name\n\n1. Ensure your URL path starts with `sendgrid`. For example:\n\n- Correct: `https:\u002F\u002Fgateway.maton.ai\u002Fsendgrid\u002Fv3\u002Fuser\u002Fprofile`\n- Incorrect: `https:\u002F\u002Fgateway.maton.ai\u002Fv3\u002Fuser\u002Fprofile`\n\n## Resources\n\n- [SendGrid API Documentation](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference)\n- [Mail Send API](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference\u002Fmail-send)\n- [Marketing Campaigns API](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference\u002Fcontacts)\n- [Suppressions Overview](https:\u002F\u002Fwww.twilio.com\u002Fdocs\u002Fsendgrid\u002Fapi-reference\u002Fsuppressions)\n- [Maton Community](https:\u002F\u002Fdiscord.com\u002Finvite\u002FdBfFAcefs2)\n- [Maton Support](mailto:support@maton.ai)\n",{"name":5,"metadata":24,"description":32},{"author":25,"version":26,"clawdbot":27},"maton","1.0",{"emoji":28,"requires":29},"🧠",{"env":30},[31],"MATON_API_KEY","SendGrid API integration with managed OAuth. Send emails, manage contacts, templates, suppressions, and view email statistics.\nUse this skill when users want to send transactional or marketing emails, manage email lists, handle bounces\u002Funsubscribes, or analyze email performance.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.\n","main","54afe4b75ed2eb8f0feabb2f5b57dfa4bcbb3c44",".agents\u002Fskills\u002Fsendgrid","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal","https:\u002F\u002Fgithub.com\u002Fmeghal86","2026-05-17 14:11:28",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add meghal86\u002Fstacksignal --skill sendgrid",{"tool":45,"command":46},"bunx","bunx skills add meghal86\u002Fstacksignal --skill sendgrid",{"tool":48,"command":49},"pnpm","pnpm dlx skills add meghal86\u002Fstacksignal --skill sendgrid","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsendgrid\u002FSKILL.md",true,[53,59],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"_meta.json","REFERENCE","参考文档",270,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsendgrid\u002F_meta.json",{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":15},"LICENSE.txt","LICENSE","许可证",1072,[65,74,82,90,98,105],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":69,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":73},"01M78XH0FRP65NYEDHF2BT7NB1","zvukogram","Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":73},"01M78XEND5ASXYB6MN8AQQGJAF","zohomail","Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels.\nUse this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":73},"01M78XEBBV3C6DRZFAJXP6RDKS","zoho-recruit","Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows.\nUse this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":73},"01M78XE5CQG75DZWYSKGXFR99T","zoho-people","Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave.\nUse this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":73},"01M78XDZKMZAJYFJJFT7MR5ZN2","zoho-mail","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":73},"01M78XDST8JK0WVDA1F3VPNWXD","zoho-inventory","Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments.\nUse this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FSKILL.md",[],[]]