Create Contact
const url = 'https://api.aymaragents.com/public/v1/contacts';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"fullName":"example","phone":"example","email":"example","country":"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.aymaragents.com/public/v1/contacts \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "fullName": "example", "phone": "example", "email": "example", "country": "example" }'Create a contact, origin='api' always (SPEC_API_PUBLICA.md §2.2).
phone is the only required field, normalized to E.164. A phone/email already used
by a live (or soft-deleted) contact of this tenant -> 409 ALREADY_EXISTS.
Idempotency-Key (API-3, D-API-4) is optional: a repeat with the SAME header and SAME body
replays the original response without creating a second contact; the SAME header with a
DIFFERENT body -> 422 IDEMPOTENCY_KEY_REUSE_MISMATCH.
Permiso necesario: tenant:contacts.manage
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»POST /public/v1/contacts body.
origin is NEVER accepted – the route always stamps 'api' server-side
(SPEC_API_PUBLICA.md §2.2), not even a field on this model.
object
Examplegenerated
{ "fullName": "example", "phone": "example", "email": "example", "country": "example"}Responses
Sección titulada «Responses»Successful Response
A single contact, curated subset of the internal CustomerOut.
Drops signingEmail (INT-PANDADOC-1 internal-integration concern, meaningless to a third
party reading/writing contacts generically).
object
Examplegenerated
{ "id": "example", "fullName": "example", "phone": "example", "email": "example", "country": "example", "phoneVerifiedAt": "example", "emailVerifiedAt": "example", "marketingOptOut": true, "marketingOptOutAt": "example", "origin": "example", "createdAt": "example"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}