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

Create a contact

POST/contacts
Autorización
AuthorizationToken Bearer · headerobligatorio

A BillionSend API key (bs_…).

Cuerpo de la solicitud
obligatorioapplication/json
emailstring<email>obligatorio

Bare email address (no display name); unique per team

first_namestring

First name

last_namestring

Last name

unsubscribedboolean

Global opt-out from all marketing sends

propertiesobject

Flat map of custom properties (string or number values)

segmentsobject[]

Segments to add the contact to on creation

Mostrar propiedades
Array de object
idstring<uuid>obligatorio
topicsobject[]

Initial per-topic subscription choices

Mostrar propiedades
Array de object
idstring<uuid>obligatorio
subscriptionstringobligatorio
Valores permitidos:opt_inopt_out
Respuestas
200

Contact created

objectstringobligatorio
Valores permitidos:contact
idstring<uuid>obligatorio
401

Missing, malformed, unknown or revoked API key

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
403

Plan limit reached

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
404

Unknown segment or topic

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
409

Contact already exists

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
422

Validation error

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
429

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

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
Pruébalo
Servidor
Autorización
Cuerpoapplication/json
Solicitud
curl -X POST 'https://api.billionsend.com/contacts' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "user@example.com",
  "first_name": "string",
  "last_name": "string",
  "unsubscribed": true,
  "properties": {
    "property1": null,
    "property2": null
  },
  "segments": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    }
  ],
  "topics": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "subscription": "opt_in"
    }
  ]
}'
Respuesta
{
  "object": "contact",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

¿Te ha resultado útil esta página?