Zum Inhalt springen
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Create a segment

POST/segments
Autorisierung
AuthorizationBearer-Token · headererforderlich

A BillionSend API key (bs_…).

Request-Body
erforderlichapplication/json
namestringerforderlich
min. Länge 1
domain_idstring<uuid> | null

BillionSend extension: id of one of your domains. A broadcast to this segment must then be sent from that domain (422 otherwise), so an audience is never mailed under another brand or against another brand's opt-outs. null or omitted: a segment of the whole team, sendable from any domain. On update, null makes the segment a team-wide one again.

filterSegmentFilter | null
Eigenschaften anzeigen
matchstringerforderlich
Erlaubt:allany
conditionsobject[]erforderlich
max. 50 Elemente
Eigenschaften anzeigen
Array von object
fieldstringerforderlich
opstringerforderlich
valuestring | nullerforderlich
max. Länge 500
Antworten
200

Segment created

objectstringerforderlich
Erlaubt:segment
idstring<uuid>erforderlich
namestringerforderlich
domain_idstring<uuid> | nullerforderlich

BillionSend extension: the domain the segment is bound to; null for a team-wide segment

filterSegmentFilter | nullerforderlich
Eigenschaften anzeigen
matchstringerforderlich
Erlaubt:allany
conditionsobject[]erforderlich
max. 50 Elemente
Eigenschaften anzeigen
Array von object
fieldstringerforderlich
opstringerforderlich
valuestring | nullerforderlich
max. Länge 500
created_atstringerforderlich
401

Missing, malformed, unknown or revoked API key

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
403

A key held to one domain bound this to another domain, or unbound it

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
422

Validation error, or a domain_id that is not one of your domains

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
Ausprobieren
Server
Autorisierung
Bodyapplication/json
Anfrage
curl -X POST 'https://api.billionsend.com/segments' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "domain_id": "b2f7354f-b74d-4332-ab10-1a5e3c56466c",
  "filter": {
    "match": "all",
    "conditions": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ]
  }
}'
Antwort
{
  "object": "segment",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "domain_id": "b2f7354f-b74d-4332-ab10-1a5e3c56466c",
  "filter": {
    "match": "all",
    "conditions": [
      {
        "field": "string",
        "op": "string",
        "value": "string"
      }
    ]
  },
  "created_at": "string"
}

War diese Seite hilfreich?