Suppressions API

Manage suppressed contacts. Suppressed contacts are excluded from all future sends. Contacts can be suppressed manually or automatically (bounces, complaints, unsubscribes).

GET /v1/suppressions

List all suppressed contacts with pagination and optional filtering by reason.

ParameterTypeDefaultDescription
limitinteger50Results per page (max 100)
offsetinteger0Offset for pagination
reasonstring-Filter by reason: bounce, complaint, manual
cURL
curl https://api.yoursend.dev/v1/suppressions?reason=bounce \
  -H "Authorization: Bearer ys_live_..."
Response
{
  "suppressions": [
    {
      "id": "con_abc123",
      "email": "bounced@example.com",
      "phone": null,
      "name": "Jane Doe",
      "reason": "bounce",
      "suppressed_at": "2026-03-19T12:00:00Z",
      "email_ok": false,
      "sms_ok": false,
      "tags": ["vip"],
      "created_at": "2026-01-01T00:00:00Z"
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}
SDK
const { suppressions, total } = await ys.suppressions.list();

GET /v1/suppressions/:id

Get detailed information about a suppressed contact.

cURL
curl https://api.yoursend.dev/v1/suppressions/con_abc123 \
  -H "Authorization: Bearer ys_live_..."
Response
{
  "id": "con_abc123",
  "email": "bounced@example.com",
  "phone": null,
  "name": "Jane Doe",
  "reason": "bounce",
  "suppressed_at": "2026-03-19T12:00:00Z",
  "email_ok": false,
  "sms_ok": false,
  "voice_ok": true,
  "whatsapp_ok": true,
  "tags": ["vip"],
  "metadata": { "plan": "pro" },
  "total_sent": 42,
  "created_at": "2026-01-01T00:00:00Z"
}

POST /v1/suppressions

Manually suppress a contact. Identify the contact by ID, email, or phone number. Suppressed contacts will be skipped on all future sends.

FieldTypeRequiredDescription
contact_idstring*Contact ID (* one of contact_id, email, or phone required)
emailstring*Contact email address
phonestring*Contact phone number
reasonstringNoReason for suppression (default: "manual")
cURL
curl -X POST https://api.yoursend.dev/v1/suppressions \
  -H "Authorization: Bearer ys_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "reason": "unsubscribed"
  }'
SDK
await ys.suppressions.create({
  email: 'user@example.com',
  reason: 'unsubscribed',
});

DELETE /v1/suppressions/:id

Remove a suppression, re-enabling the contact for future sends. Channel preferences (email_ok, sms_ok) are restored to true.

cURL
curl -X DELETE https://api.yoursend.dev/v1/suppressions/con_abc123 \
  -H "Authorization: Bearer ys_live_..."
SDK
await ys.suppressions.delete('con_abc123');

Suppression Object

FieldTypeDescription
idstringContact ID
emailstring | nullContact email
phonestring | nullContact phone
namestring | nullContact name
reasonstringSuppression reason (bounce, complaint, manual, unsubscribed)
suppressed_atstringWhen the contact was suppressed
email_okbooleanEmail channel allowed (false when suppressed)
sms_okbooleanSMS channel allowed (false when suppressed)