Menu

Reference

Suppressions

Suppressions: 3 operations (suppressions.list, suppressions.add, suppressions.remove).

MethodPathOperation
GET/v1/suppressionssuppressions.list
POST/v1/suppressionssuppressions.add
DELETE/v1/suppressions/{ig_handle}suppressions.remove

suppressions.list

GET/v1/suppressions

Leads marked not_interested: outreach never contacts them.

Operation idsuppressions.list
Scopesleads:read
Rate class`read`
IdempotencyNot applicable
KeysDeveloper keys

Query parameters

NameTypeRequiredDescription
limitintegerno1 to 200, default 50
cursorstringno1 to 2048 characters

Response 200

FieldTypeRequiredDescription
dataobject[]yes
has_morebooleanyes
next_cursorstring | nullyes

Errors

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
curl "https://api.dmhero.ai/v1/suppressions" \
  -H "Authorization: Bearer $DMHERO_API_KEY"
JSON Schema
Response 200
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "lead_id": {
            "type": "string"
          },
          "ig_handle": {
            "type": [
              "string",
              "null"
            ]
          },
          "since": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
            "description": "The lead's last update, which is when it was suppressed unless it changed since."
          }
        },
        "required": [
          "lead_id",
          "ig_handle",
          "since"
        ],
        "additionalProperties": false
      }
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "has_more",
    "next_cursor"
  ],
  "additionalProperties": false
}

suppressions.add

POST/v1/suppressions

Suppress Instagram handles: every lead with the handle becomes not_interested, and an unknown handle becomes a suppressed lead.

Operation idsuppressions.add
Scopesleads:write
Rate class`write`, plus leads_created_day
Idempotency`Idempotency-Key` accepted
KeysDeveloper keys

Request body

FieldTypeRequiredDescription
ig_handlesstring[]yes1 to 100 items

Response 200

JSON of type object.

Errors

StatusCodeWhen
429`LEADS_DAILY_LIMIT_429`The organization reached its daily limit of leads created through the API.

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
curl -X POST "https://api.dmhero.ai/v1/suppressions" \
  -H "Authorization: Bearer $DMHERO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "ig_handles": [
    "string"
  ]
}'
JSON Schema
Request body
{
  "type": "object",
  "properties": {
    "ig_handles": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "ig_handles"
  ]
}
Response 200
{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "ig_handle": {
                "type": "string"
              },
              "lead_id": {
                "type": "string"
              },
              "result": {
                "type": "string",
                "enum": [
                  "suppressed",
                  "already_suppressed",
                  "created_suppressed"
                ]
              }
            },
            "required": [
              "ig_handle",
              "lead_id",
              "result"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "results"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "replayed": {
          "type": "boolean",
          "const": true
        },
        "status": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "ids": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "replayed",
        "status",
        "ids"
      ],
      "additionalProperties": false
    }
  ]
}

suppressions.remove

DELETE/v1/suppressions/{ig_handle}

Lift a suppression: the handle's not_interested leads go back to new.

Operation idsuppressions.remove
Scopesleads:write
Rate class`write`
IdempotencyNot applicable
KeysDeveloper keys

Path parameters

NameTypeRequiredDescription
ig_handlestringyes1 to 100 characters

Response 200

FieldTypeRequiredDescription
lead_idstringyes
status"new"yes

Errors

StatusCodeWhen
404`SUPPRESSION_NOT_FOUND_404`No suppressed lead with this handle in this workspace.

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
curl -X DELETE "https://api.dmhero.ai/v1/suppressions/string" \
  -H "Authorization: Bearer $DMHERO_API_KEY"
JSON Schema
Response 200
{
  "type": "object",
  "properties": {
    "lead_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "const": "new"
    }
  },
  "required": [
    "lead_id",
    "status"
  ],
  "additionalProperties": false
}
Suppressions | DM Hero Developers