Create a Custom Inbound Filter

ExperimentalThis API is under active development and may change.
POST /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/custom-inbound-filters/

Create a custom inbound filter for a project.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization the resource belongs to.

project_id_or_slug (string)
REQUIRED

The ID or slug of the project the resource belongs to. Project slugs are unique within each organization.

Body Parameters

id (string)
REQUIRED

The ID of the filter.

dataType (string)
REQUIRED

The data the filter matches against. all is the catch-all: it filters every data type Sentry ingests, including ones added later, and accepts only the conditions that every data type carries a field for.

  • all
  • error
  • log
  • metric
  • span
conditions (array(object))
REQUIRED

Conditions are combined with AND: an event must match every condition to be filtered out. There is no OR between conditions, so e.g. two release conditions can express a range (>2 AND <4). To broaden matching, widen a condition's values or add separate filters.

dateCreated (string)
REQUIRED

When the filter was created.

dateUpdated (string)
REQUIRED

When the filter was last changed.

name (string)

A human-readable label for the filter.

active (boolean)

Whether the filter drops matching data. An inactive filter is kept but ignored.

Scopes

<auth_token> requires one of the following scopes:
  • project:admin
  • project:write
Copied
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/custom-inbound-filters/ \
 -H 'Authorization: Bearer <auth_token>' \
 -H 'Content-Type: application/json' \
 -d '{}'
RESPONSESCHEMA
Copied
{ "id": "42", "name": "Drop TypeErrors from the 1.x releases", "active": true, "dataType": "error", "conditions": [ { "type": "error_type", "value": [ "TypeError" ] }, { "type": "release", "value": [ "1.*" ] } ], "dateCreated": "2024-07-23T17:52:53.981206Z", "dateUpdated": "2024-07-23T17:52:53.981206Z" }
Was this helpful?