POST /v1/contacts/import
const url = 'https://api.asap.cool/v1/contacts/import';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contacts":[{"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/import \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contacts": [ { "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/import — an array of contact rows, each
mirroring the create payload.
object
Rows to import (validated and deduplicated server-side).
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
{ "contacts": [ { "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 »Import summary (created / skipped / per-row errors).
Summary of a bulk import.
object
Number of contacts inserted.
Ids of the inserted contacts, in input order.
Rows that failed validation, in request order.
One row rejected by validation, identified by its index in the request.
object
Zero-based position of the offending row in contacts.
Human-readable reason (e.g. malformed email, no name nor company).
Number of rows skipped as email duplicates (org or intra-batch).
Example generated
{ "created": 1, "created_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "errors": [ { "index": 1, "reason": "example" } ], "skipped": 1}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"}Batch exceeds the per-request row cap.
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"}