Messaging

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

POST
POST
GET

Create messaging suppressions add suppression

Manually suppress an email address so no workflow sends to it.

Required API key scopes

hog_flow:write

Request parameters

  • identifier
    string

Response


Example request

POST /api/projects/:project_id/messaging_suppressions/add_suppression
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/messaging_suppressions/add_suppression/\
-d identifier="string"

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"identifier": "string",
"source": "BOUNCE",
"reason": "string",
"transient_bounce_count": 0,
"last_bounce_at": "2019-08-24T14:15:22Z",
"last_bounce_diagnostic": "string",
"suppressed": true,
"suppressed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Create messaging suppressions remove suppression

Remove an address from the suppression list so it can receive messages again.

Required API key scopes

hog_flow:write

Request parameters

  • identifier
    string

Example request

POST /api/projects/:project_id/messaging_suppressions/remove_suppression
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/messaging_suppressions/remove_suppression/\
-d identifier="string"

Example response

Status 204 No response body

Retrieve messaging suppressions suppressions

List suppressed recipients for the team, most recently updated first.

Required API key scopes

hog_flow:readperson:read

Query parameters

  • page
    integer
  • page_size
    integer

Response


Example request

GET /api/projects/:project_id/messaging_suppressions/suppressions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/messaging_suppressions/suppressions/

Example response

Status 200
RESPONSE
{
"count": 0,
"next": "http://example.com",
"previous": "http://example.com",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"identifier": "string",
"source": "BOUNCE",
"reason": "string",
"transient_bounce_count": 0,
"last_bounce_at": "2019-08-24T14:15:22Z",
"last_bounce_diagnostic": "string",
"suppressed": true,
"suppressed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}