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.
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.
httpAuthorizationBearer <token>Idempotency-Key?stringAny 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.
application/json- body
phone_e164?|E.164 phone number, e.g. +201001234567.
^\+[1-9]\d{6,14}$email?|emaillength <= 255first_name?|length <= 100last_name?|length <= 100country?|ISO 3166-1 alpha-2 country code.
2 <= length <= 2language?|length <= 10opt_in_whatsapp?boolean|nullcustom_fields?array<string>|Values keyed by contact field key (Settings → Contact fields).
items <= 50source?|Defaults to api.
length <= 100An existing contact with this phone or email was updated.
application/json- response
data*curl -X POST 'https://app.orqo.site/api/v1/contacts' \ -H 'Idempotency-Key: 9f1c2a7e-4b8d-4e57-a3f0-6c1d2e3f4a5b' \ -H 'Content-Type: application/json' \ -d '{}'{ "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" }}