Saltar al contenido
Esc
↑↓navegar↵abrir⌘Jvista previa

Update a segment

PATCH/segments/{id}
Autorización
AuthorizationToken Bearer · headerobligatorio

A BillionSend API key (bs_…).

Parámetros de ruta
idstring<uuid>obligatorio
Cuerpo de la solicitud
application/json
namestring
longitud mín. 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
Mostrar propiedades
matchstringobligatorio
Valores permitidos:allany
conditionsobject[]obligatorio
máx. 50 elementos
Mostrar propiedades
Array de object
fieldstringobligatorio
opstringobligatorio
valuestring | nullobligatorio
longitud máx. 500
Respuestas
200

Segment updated

objectstringobligatorio
Valores permitidos:segment
idstring<uuid>obligatorio
namestringobligatorio
domain_idstring<uuid> | nullobligatorio

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

filterSegmentFilter | nullobligatorio
Mostrar propiedades
matchstringobligatorio
Valores permitidos:allany
conditionsobject[]obligatorio
máx. 50 elementos
Mostrar propiedades
Array de object
fieldstringobligatorio
opstringobligatorio
valuestring | nullobligatorio
longitud máx. 500
created_atstringobligatorio
401

Missing, malformed, unknown or revoked API key

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
403

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

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
404

Not found

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
422

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

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
429

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

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
Pruébalo
Servidor
Autorización
Parámetros
Cuerpoapplication/json
Solicitud
curl -X PATCH 'https://api.billionsend.com/segments/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -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"
      }
    ]
  }
}'
Respuesta
{
  "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"
}

¿Te ha resultado útil esta página?