Aller au contenu

POST /v1/contacts/{id}/erase

POST
/v1/contacts/{id}/erase
curl --request POST \
--url https://api.asap.cool/v1/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/erase \
--header 'Authorization: Bearer <token>'
id
required
string format: uuid

Contact identifier.

The anonymised contact.

Media type application/json

Public projection of a [Contact] (omits unsubscribe_token).

object
address

Street address.

string | null
archived_at

RFC3339 archival timestamp, or null when the contact is active.

string | null
city

City.

string | null
company

Company / legal name (business).

string | null
consent_at

RFC3339 instant consent was last granted, or null.

string | null
consent_source

Provenance of the recorded consent, or null.

string | null
country
required

ISO 3166-1 alpha-2 country code.

string
created_at
required

RFC3339 creation timestamp.

string
default_discount_terms

Per-contact default early-payment discount terms pre-filling a new quote/invoice, or null to fall back to the org default.

string | null
default_payment_terms

Per-contact default payment terms pre-filling a new quote/invoice, or null to fall back to the org default.

string | null
email

Contact email.

string | null
erased_at

RFC3339 RGPD-erasure timestamp, or null when not erased.

string | null
first_name

Given name (individual).

string | null
id
required

Stable identifier.

string format: uuid
last_interaction_at

RFC3339 timestamp of the last recorded interaction (chat reply, email, …), or null when none.

string | null
last_name

Family name (individual).

string | null
lead_score

Lead score in [0..=100], or null for a non-lead.

integer | null format: int32
lead_status

Lead pipeline stage, or null for a non-lead.

string | null
legal_basis

RGPD lawful basis (consent/contract/legitimate_interest/ legal_obligation), or null.

string | null
marketing_consent
required

Current marketing-consent state.

boolean
merged_into

Surviving contact this row was merged into (null for a live contact).

string | null format: uuid
notes

Free-form notes.

string | null
phone

Phone number.

string | null
postal_code

Postal / ZIP code.

string | null
preferred_language

Preferred language (fr or en) for outbound emails and documents, or null when no explicit preference.

string | null
reminder_opt_out
required

Whether the contact opted out of reminder emails.

boolean
siret

French business registration number (14 digits).

string | null
source
required

Acquisition source (manual/chat/import/api).

string
tags
required

Assigned tags (empty when none).

Array<string>
type
required

particulier or professionnel.

string
updated_at
required

RFC3339 last-update timestamp.

string
vat_intra

Intra-EU VAT number (e.g. FR12345678901).

string | null
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.

Media type application/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Missing contacts:write scope.

Media type application/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Not found or cross-org.

Media type application/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}