Saltar al contenido principal
POST
/
api
/
v1
/
contacts
Create or update contact
curl --request POST \
  --url https://app.flowella.io/api/v1/contacts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "+15551234567",
  "name": "Ada Lovelace",
  "email": "ada@example.com",
  "waId": "<string>"
}
'
{
  "id": "<string>",
  "phone": "<string>",
  "isOptedOut": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "waId": "<string>",
  "name": "<string>",
  "email": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://knowledge.flowella.io/llms.txt

Use this file to discover all available pages before exploring further.

Crea un nuevo contacto o actualiza un contacto existente identificado por su número de teléfono (upsert). Si ya existe un contacto con ese número, se actualizan los campos suministrados.

Autenticación

Todas las solicitudes requieren la cabecera Authorization: Bearer <api_key> con una clave que empieza por el prefijo flo_.

Cuerpo de la solicitud

phone
string
requerido
Número de teléfono en formato E.164 (entre 3 y 32 caracteres). Es la clave única para el upsert. Ejemplo: +34612345678.
name
string
Nombre del contacto (hasta 200 caracteres). Acepta null.
email
string
Dirección de correo del contacto. Acepta null.
waId
string
ID de WhatsApp del contacto (hasta 64 caracteres). Acepta null.

Respuesta

Devuelve el objeto ContactRow con los campos id, phone, waId, name, email, isOptedOut, createdAt y updatedAt.

Errores

CódigoSignificado
400Error de validación del cuerpo.
401Falta la clave de API o no es válida.
429Limitado por tasa.

Ejemplo

curl -X POST https://app.flowella.io/api/v1/contacts \
  -H "Authorization: Bearer flo_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+34612345678",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  }'

Autorizaciones

Authorization
string
header
requerido

Organization API key (flo_…). Send as Authorization: Bearer <key>.

Cuerpo

application/json
phone
string
requerido
Required string length: 3 - 32
Ejemplo:

"+15551234567"

name
string | null
Maximum string length: 200
Ejemplo:

"Ada Lovelace"

email
string<email> | null
Ejemplo:

"ada@example.com"

waId
string | null
Maximum string length: 64

Respuesta

Contact upserted

id
string
requerido
phone
string
requerido
isOptedOut
boolean
requerido
createdAt
string<date-time>
requerido
updatedAt
string<date-time>
requerido
waId
string | null
name
string | null
email
string | null