OORQO API
Contacts

Create or update a contact

Contacts are matched like everywhere else in ORQO: by `phone_e164`, or by `email` when no phone is given. A new contact is `201`; an existing one (or a deleted one with that number, which is restored) is updated and returned with `200`. `custom_fields` keys must be contact fields defined in Settings. Send an `Idempotency-Key` header to retry safely.

POST
/v1/contacts

Contacts are matched like everywhere else in ORQO: by phone_e164, or by email when no phone is given. A new contact is 201; an existing one (or a deleted one with that number, which is restored) is updated and returned with 200. custom_fields keys must be contact fields defined in Settings. Send an Idempotency-Key header to retry safely.

Authorization

http
headerAuthorizationBearer <token>

Header Parameters

Idempotency-Key?string

Any unique string up to 255 characters, such as a UUID. Retrying with the same key returns the first response (with Idempotent-Replayed: true) instead of acting twice.

Request Body

application/json
  1. body
phone_e164?|

E.164 phone number, e.g. +201001234567.

Match^\+[1-9]\d{6,14}$
email?|
Formatemail
Lengthlength <= 255
first_name?|
Lengthlength <= 100
last_name?|
Lengthlength <= 100
country?|

ISO 3166-1 alpha-2 country code.

Length2 <= length <= 2
language?|
Lengthlength <= 10
opt_in_whatsapp?boolean|null
custom_fields?array<string>|

Values keyed by contact field key (Settings → Contact fields).

Itemsitems <= 50
source?|

Defaults to api.

Lengthlength <= 100

Response Body

An existing contact with this phone or email was updated.

application/json
  1. response
data*
Example Request
curl -X POST 'https://app.orqo.site/api/v1/contacts' \  -H 'Idempotency-Key: 9f1c2a7e-4b8d-4e57-a3f0-6c1d2e3f4a5b' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "id": 0,    "uuid": "string",    "phone_e164": "string",    "email": "string",    "first_name": "string",    "last_name": "string",    "full_name": "string",    "country": "string",    "language": "string",    "opt_in_whatsapp": true,    "custom_fields": {      "property1": "string",      "property2": "string"    },    "tags": [      "string"    ],    "avatar_url": "string",    "source": "string",    "last_seen_at": "string",    "created_at": "string",    "updated_at": "string"  }}