POST
/
sources
/
{source_id}
/
filter_segments
curl --request POST \
  --url https://app.getcensus.com/api/v1/sources/{source_id}/filter_segments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "molecules": [
    {
      "attribute": "last_seen_at",
      "attribute_type": "property",
      "operator": "isnotnull",
      "value": "id"
    }
  ],
  "name": "priority accounts",
  "business_object_id": 123
}'
{
  "data": {
    "id": 9
  },
  "filter_segment_source_url": "https://app.getcensus.com/api/v1/sources/12/filter_segments/9/source_status",
  "status": "created"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

source_id
integer
required

ID of the source

Body

application/json
molecules
object[]
required

A list of Atomic Molecules, Related Segment Molecules, Relationship Molecules, Molecule Groups and at most one Operation Molecule.

  • Option 1

  • Option 2

  • Option 3

name
string
required

The name of this segment.

business_object_id
integer
required

The id of the entity on which this segment is based.

Response

201 - application/json
data
object
filter_segment_source_url
string

Some subproperties of the filter_segment are created asynchronously. You can query this url to fetch the status of the creation (true or false). When status is true, it will return all properties returned in GET /sources/{source_id}/filter_segments/{segment_id}.

status
enum<string>

Outcome of the operation.

Available options:
success,
updated,
created,
not_found,
error