Skip to main content
POST
/
api
/
public
/
suppression-lists
Create a suppression list
curl --request POST \
  --url https://astrasend-mocha.vercel.app/api/public/suppression-lists \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "definition": {
    "match": "all",
    "base_lead_list_id": "<string>",
    "conditions": [
      {
        "field": "<string>",
        "op": "<string>",
        "value": "<unknown>"
      }
    ],
    "groups": [
      {
        "conditions": [
          {
            "field": "<string>",
            "op": "<string>",
            "value": "<unknown>"
          }
        ]
      }
    ],
    "created_from": "2023-11-07T05:31:56Z",
    "created_to": "2023-11-07T05:31:56Z"
  }
}
'
{
  "ok": true
}

Authorizations

Authorization
string
header
required

Your API key (as_live_…), created under Settings → API keys.

Body

application/json
name
string
required
definition
object

A rule that defines a dynamic audience. Combine conditions directly, or in nested groups.

Response

200 - application/json

Success

ok
boolean
Example:

true