POST /v1/contacts
const url = 'https://api.asap.cool/v1/contacts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"address":"example","city":"example","company":"example","consent_source":"example","country":"example","default_discount_terms":"example","default_payment_terms":"example","email":"example","first_name":"example","last_name":"example","lead_score":1,"lead_status":"example","legal_basis":"example","marketing_consent":true,"notes":"example","phone":"example","postal_code":"example","preferred_language":"example","reminder_opt_out":true,"siret":"example","tags":["example"],"type":"example","vat_intra":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.asap.cool/v1/contacts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "address": "example", "city": "example", "company": "example", "consent_source": "example", "country": "example", "default_discount_terms": "example", "default_payment_terms": "example", "email": "example", "first_name": "example", "last_name": "example", "lead_score": 1, "lead_status": "example", "legal_basis": "example", "marketing_consent": true, "notes": "example", "phone": "example", "postal_code": "example", "preferred_language": "example", "reminder_opt_out": true, "siret": "example", "tags": [ "example" ], "type": "example", "vat_intra": "example" }'Authorizations
Section intitulée « Authorizations »Request Body required
Section intitulée « Request Body required »Body of POST /v1/contacts. org_id is never accepted here — it is
resolved from the authenticated caller.
object
Street address.
City.
Company / legal name (business).
Provenance of the consent.
ISO 3166-1 alpha-2 country code (defaults to FR).
Per-contact default early-payment discount terms (free text).
Per-contact default payment terms (free text) pre-filling new documents.
Contact email.
Given name (individual).
Family name (individual).
Lead score in [0..=100].
Lead pipeline stage (new/qualified/contacted/won/lost).
RGPD lawful basis.
Initial marketing-consent state.
Free-form notes.
Phone number.
Postal / ZIP code.
Preferred language (fr or en) for outbound communication.
Whether the contact opts out of reminder emails.
French business registration number (14 digits).
Tags assigned at creation (empty when omitted).
particulier or professionnel (defaults to professionnel).
Intra-EU VAT number (e.g. FR12345678901).
Example generated
{ "address": "example", "city": "example", "company": "example", "consent_source": "example", "country": "example", "default_discount_terms": "example", "default_payment_terms": "example", "email": "example", "first_name": "example", "last_name": "example", "lead_score": 1, "lead_status": "example", "legal_basis": "example", "marketing_consent": true, "notes": "example", "phone": "example", "postal_code": "example", "preferred_language": "example", "reminder_opt_out": true, "siret": "example", "tags": [ "example" ], "type": "example", "vat_intra": "example"}Responses
Section intitulée « Responses »Contact created.
Public projection of a [Contact] (omits unsubscribe_token).
object
Street address.
RFC3339 archival timestamp, or null when the contact is active.
City.
Company / legal name (business).
RFC3339 instant consent was last granted, or null.
Provenance of the recorded consent, or null.
ISO 3166-1 alpha-2 country code.
RFC3339 creation timestamp.
Per-contact default early-payment discount terms pre-filling a new
quote/invoice, or null to fall back to the org default.
Per-contact default payment terms pre-filling a new quote/invoice,
or null to fall back to the org default.
Contact email.
RFC3339 RGPD-erasure timestamp, or null when not erased.
Given name (individual).
Stable identifier.
RFC3339 timestamp of the last recorded interaction (chat reply,
email, …), or null when none.
Family name (individual).
Lead score in [0..=100], or null for a non-lead.
Lead pipeline stage, or null for a non-lead.
RGPD lawful basis (consent/contract/legitimate_interest/
legal_obligation), or null.
Current marketing-consent state.
Surviving contact this row was merged into (null for a live contact).
Free-form notes.
Phone number.
Postal / ZIP code.
Preferred language (fr or en) for outbound emails and documents,
or null when no explicit preference.
Whether the contact opted out of reminder emails.
French business registration number (14 digits).
Acquisition source (manual/chat/import/api).
Assigned tags (empty when none).
particulier or professionnel.
RFC3339 last-update timestamp.
Intra-EU VAT number (e.g. FR12345678901).
Example generated
{ "address": "example", "archived_at": "example", "city": "example", "company": "example", "consent_at": "example", "consent_source": "example", "country": "example", "created_at": "example", "default_discount_terms": "example", "default_payment_terms": "example", "email": "example", "erased_at": "example", "first_name": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "last_interaction_at": "example", "last_name": "example", "lead_score": 1, "lead_status": "example", "legal_basis": "example", "marketing_consent": true, "merged_into": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "notes": "example", "phone": "example", "postal_code": "example", "preferred_language": "example", "reminder_opt_out": true, "siret": "example", "source": "example", "tags": [ "example" ], "type": "example", "updated_at": "example", "vat_intra": "example"}No active org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Missing contacts:write scope.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Invalid contact payload.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}