Create a contact
Add one contact by phone number, with an optional name, tags and field values. A number that is already a contact is refused as contact_exists; use update_contact. A number that has called one of the workspace's agents is refused as consent_required unless consentConfirmed is true: you confirm the person agreed to be kept as a contact. Callers are never added automatically. Tags are stored lower case, without commas, at most 40 characters each and 50 a contact.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Path Parameters
Workspace slug (GET /me lists yours).
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/workspaces/string/contacts" \ -H "Content-Type: application/json" \ -d '{ "phone": "string" }'{
"contact": {
"id": "string",
"phoneNumber": "string",
"tags": [
"string"
],
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Update a campaign PATCH
Change a campaign's settings, under the campaign page's rules. A DRAFT can change anything. A SCHEDULED, RUNNING or PAUSED campaign can change only name, fromNumber, numberPool, maxConcurrency, maxCallsPerHour, spendCapCents, autoEnroll and routeReturnCalls (others are refused as draft_only, and the numbers never to none, number_pool_empty), and in its sequence only wording, voicemails, delays, retry gaps, double dial and converted outcomes (others are refused as sequence_locked). A COMPLETED or CANCELLED campaign can change only convertedOutcomes and routeReturnCalls. Pass only what changes; null clears brief, greetingOverride, fromNumber (with the pool, on a draft), callingWindow, smsWindow, voicemail, spendCapCents and maxCallsPerHour. Raise spendCapCents here before resuming a campaign its cap paused.
Delete a custom contact field DELETE
Delete a contact field and clear its value from every contact. This can't be undone.