agentlyleads docs
Suppressions API

API Reference

The reference below covers every endpoint in the Suppressions API. Code examples are generated automatically; the live playground is disabled to prevent accidental writes to production from the docs site.

GET/api/v1/suppressions

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Query Parameters

reason?string

Value in

  • "UNSUBSCRIBE"
  • "BOUNCE"
  • "COMPLAINT"
  • "MANUAL"
email?string

Look up one address. Case-insensitive.

since?string
Formatdate-time
limit?integer
Range1 <= value <= 1000
Default100
cursor?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/suppressions"
{  "suppressions": [    {      "id": "string",      "email": "string",      "reason": "UNSUBSCRIBE",      "removable": true,      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
{  "error": "products must not be empty."}
{  "error": "Invalid or missing API key."}
{  "error": "API key missing required scope: write:workflows."}
POST/api/v1/suppressions

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/suppressions" \  -H "Content-Type: application/json" \  -d '{    "email": "ann@example.com"  }'
{  "suppression": {    "id": "string",    "email": "string",    "reason": "UNSUBSCRIBE",    "removable": true,    "createdAt": "2019-08-24T14:15:22Z"  },  "created": false}
{  "suppression": {    "id": "string",    "email": "string",    "reason": "UNSUBSCRIBE",    "removable": true,    "createdAt": "2019-08-24T14:15:22Z"  },  "created": true}
{  "error": "products must not be empty."}
{  "error": "Invalid or missing API key."}
{  "error": "API key missing required scope: write:workflows."}
DELETE/api/v1/suppressions/{id}

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v1/suppressions/string"
{  "deleted": 1,  "id": "string",  "email": "string"}
{  "error": "Invalid or missing API key."}
{  "error": "API key missing required scope: write:workflows."}
{  "error": "Workflow not found."}
{  "error": "b@example.com is suppressed because of a hard bounce. That can only be removed by a person in Settings, Suppressions."}