Find or create a contact
Returns an existing contact matching the given identifiers, or creates a new one when none exists.
Returns an existing contact matching the given identifiers, or creates a new one when none exists.
Authorization
apiKey x-api-key<token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
email?string|null
phone?string|null
externalId?string|null
name?string|null
displayName?string|null|null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/contacts/find-or-create" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "organizationId": "string", "type": "human", "name": "string", "displayName": "string", "avatar": "string", "identities": [ { "channel": "email", "identifier": "string", "verified": true } ], "humanProfile": { "firstName": "string", "lastName": "string", "email": "string", "phone": "string", "company": "string", "jobTitle": "string", "location": { "country": "string", "state": "string", "city": "string", "timezone": "string" }, "customFields": {}, "source": "api", "sourceDetails": {} }, "capabilities": [ "string" ], "tags": [ "string" ], "accessLevel": "public", "accessConfig": { "paymentRequired": { "amount": 1, "currency": "string", "validityHours": 1, "message": "string" }, "rateLimit": { "messagesPerHour": 1, "messagesPerDay": 1, "cooldownMinutes": 1 }, "allowedContacts": [ "string" ], "blockedContacts": [ "string" ], "availability": { "timezone": "string", "schedule": [ { "days": [ 0 ], "startTime": "string", "endTime": "string" } ], "outOfOfficeMessage": "string" } }, "preferences": { "preferredChannels": [ "email" ], "language": "string", "timezone": "string", "notifications": { "email": true, "quiet_hours": { "start": "string", "end": "string" } }, "messageFormats": { "preferMarkdown": true, "preferPlainText": true, "maxMessageLength": 1 } }, "status": "active", "statusReason": "string", "externalId": "string", "metadata": {}, "createdAt": "string", "updatedAt": "string", "createdBy": "string", "lastModifiedBy": "string"}