team-telnyx/ai/telnyx-email-suppressions-curl
Claude Code and agent skill by team-telnyx/ai
- community
Checking that the SKILL.md file is still in the repository.
Manage email suppressions (blocks), import and export suppression lists, and manage unsubscribe groups. Use for deliverability compliance and bounce handling.
Install
npx vskill@latest install team-telnyx/ai/telnyx-email-suppressions-curlSKILL.md
The same SKILL.md was published earlier as team-telnyx/ai/telnyx-email-suppressions-curl.
Telnyx Email Suppressions - curl
Installation
Setup
All examples below use $TELNYX_API_KEY for authentication and the API base URL https://api.telnyx.com/v2.
Error Handling
All API calls can fail with network errors, authentication errors (401), or framework errors (406). List-query validation failures return 400, resource lookups can return 404, and JSON body validation failures normally return 422. Inspect the HTTP status and the top-level .errors array before continuing:
Common statuses are 400 malformed query or import, 401 invalid API key, 404 resource not found, 409 group still has active suppressions, 413 import too large, and 422 invalid request attributes. A successful delete may return 204 No Content; do not attempt to parse that response as JSON.
Important Notes
- Account isolation: Every lookup is scoped to the authenticated account. A malformed UUID or a UUID owned by another account is reported as 404.
- Normalized addresses: Recipient addresses are trimmed and lower-cased. The
fromaddress on a manual block is also normalized. - Pagination: Most list operations use
page[number]andpage[size](maximum 100). The main block list also supports opaque cursors. Do not combine offset and cursor modes. - URL encoding: Percent-encode an email address placed in a URL path. For example, use
alice%40example.com, not an untrusted raw string. - Idempotency: Creating a block or adding a group suppression returns 200 when the matching suppression already exists and 201 when a row is created.
Operational Caveats
POST /v2/email_blocksalways createsreason: manual_blockwithsource: manual. Customers cannot use this endpoint to createhard_bounce,spam_complaint, orinvalidsuppressions; caller-suppliedreasonandsourceare ignored.- Scope is server-derived as
account,domain, oraddress, never customer-set: nodomain_idand nofromgivesaccount;domain_idwithoutfromgivesdomain; afromaddress givesaddressscope. unsubscribeandmanual_blockare overridable at send time withignore_suppression: true.hard_bounce,spam_complaint, andinvalidare not overridable. Bypassing an overridable suppression should be deliberate and auditable.- Import is asynchronous.
POST /v2/email_blocks/importreturns 202 and a job ID; pollGET /v2/email_blocks/import/{id}untilcompletedorfailed. Import behavior for scoped suppressions may vary. Check the import result for the actual scope assigned. - Export is synchronous and streams CSV directly. It does not create a job.
- Deleting a block is a soft delete: the row remains as a tombstone with
status: removed. Recreating the same removed suppression reactivates it. - The
expires_atfield is available for setting an expiration timestamp on suppressions. - Check both
error_countandskipped_countin the import response for rejected entries. - A group suppression prevents sending to that address for every campaign that uses the unsubscribe group. It is not an account-wide unsubscribe for campaigns that do not use that group.
Reference Use Rules
Do not invent Telnyx parameters, enums, response fields, import counters, or CSV columns.
- Read references/api-details.md before building pagination, bulk migration, or delete automation.
- Before deciding whether a send may bypass a block, read suppression semantics.
- Before importing an exported list, read CSV export and import and verify the scope assigned by the import result.
- For exhaustive request fields, response fields, status codes, and operation IDs, use the operation catalog and response schemas.
Core Tasks
List suppressions
Use offset pagination for page-oriented tools or cursor pagination for sequential traversal without page-number offsets.
GET /v2/email_blocks
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
page[number] | integer | No | Offset page, default 1. Do not combine with a cursor. | |
page[size] | integer | No | 1-100, default 25. | |
page[after] | string | No | Opaque next-page cursor. Exclusive with page[number] and page[before]. | |
page[before] | string | No | Opaque previous-page cursor. Exclusive with page[number] and page[after]. | |
sort | enum | No | created_at or -created_at (default). | |
filter[reason] | enum | No | Exact reason match. | |
filter[domain_id] | UUID | No | Exact domain ID match. | |
filter[created_after] | date-time | No | Match created_at > value. | |
filter[created_before] | date-time | No | Match created_at < value. |
Offset responses expose .meta.total_pages; cursor responses expose .meta.has_next and, when another page exists, .meta.next_cursor. Pass the returned cursor unchanged.
Create a manual suppression
POST /v2/email_blocks
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
to | string | Yes | Recipient address; trimmed and lower-cased by the server. | |
domain_id | UUID or null | No | Domain context; omit/null for account scope. | |
from | string or null | No | Sender context; a value produces address scope. | |
expires_at | date-time or null | No | Expiration timestamp for the suppression. |
The response is .data with forced reason: manual_block, source: manual, a server-derived scope, and status: active. Do not send scope, group_id, bounce_category, dsn_code, or meta to this public operation.
Export suppressions as CSV
GET /v2/email_blocks/export
The 200 response is the CSV stream itself. Filters supported by the list endpoint affect export. Although sort and page[*] are parsed and invalid values can return 400, valid values are ignored; export always streams every matching row ordered by created_at ASC, id ASC.
Start an asynchronous CSV import
POST /v2/email_blocks/import
A valid request returns 202 with .data.id and .data.status equal to pending. CSV content may not exceed 25 MiB or 250,000 rows. Provider format is auto-detected as sendgrid, mailgun, ses, or generic. block_ttl_days applies only to imported manual_block rows.
Poll an import job
GET /v2/email_blocks/import/{id}
Completion counters are omitted until status is completed; failure_reason is only present on failure. Check both error_count and skipped_count in the import response for rejected entries, and inspect errors when present.
Retrieve a suppression
GET /v2/email_blocks/{id}
Primary response fields are .data.id, .data.to, .data.from, .data.domain_id, .data.group_id, .data.reason, .data.source, .data.scope, .data.status, .data.expires_at, .data.created_at, and .data.updated_at.
Soft-delete a suppression
DELETE /v2/email_blocks/{id}
This returns 200 with the tombstone in .data; verify .data.status == "removed". Repeating the delete is idempotent and does not append another audit event.
List a suppression's audit events
GET /v2/email_blocks/{id}/events
Events are newest first and can be created, removed, expired, or override_used. This endpoint has offset pagination only and a default page size of 50; it has no filters, sort, or cursor parameters.
List unsubscribe groups
GET /v2/email_unsubscribe_groups
Groups use offset pagination only and fixed newest-first ordering.
Create an unsubscribe group
POST /v2/email_unsubscribe_groups
name is required, non-empty, and at most 255 characters. A successful create returns 201 and the group in .data.
Retrieve an unsubscribe group
GET /v2/email_unsubscribe_groups/{id}
Update an unsubscribe group
Only name and description are mutable. This is a partial update; PUT is not routed.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/telnyx-email-suppressions-curl/SKILL.md
Popularity
- Repository stars
- 219
- Repository forks
- 21
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/team-telnyx/ai/telnyx-email-suppressions-curl)