Add a customer (optionally with its first person)
const url = 'https://api.vocapable.com/v1/mobile/workspace/customers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","kind":"business","website":"example","industry":"example","timezone":"example","owner_user_id":"example","person":{"first_name":"example","last_name":"example","title":"example","email":"example","phone_e164":"example","timezone":"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.vocapable.com/v1/mobile/workspace/customers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "kind": "business", "website": "example", "industry": "example", "timezone": "example", "owner_user_id": "example", "person": { "first_name": "example", "last_name": "example", "title": "example", "email": "example", "phone_e164": "example", "timezone": "example" } }'The web’s create, unchanged: the owner is you unless you may reassign; a live
business of the same name answers 409 workspace_organization_exists and a person
whose number someone here already has 409 workspace_contact_phone_taken, each
naming the existing record when you can open it, and nothing is created. Adding a
customer never records consent to contact them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Add a customer. Adding a record never grants permission to call or message them.
object
Responses
Section titled “Responses”Successful Response
A relationship with its people, open work and source.
object
A teammate named on a record: the id the server holds and the name to show.
object
One person (a contacts row) inside a relationship.
object
A teammate named on a record: the id the server holds and the name to show.
object
object
The current contact-policy answer for the viewing person, on one channel.
object
object
object
A teammate named on a record: the id the server holds and the name to show.
object
object
A teammate named on a record: the id the server holds and the name to show.
object
Example
{ "kind": "business", "status": "active", "people": [ { "contact_points": [ { "kind": "phone" } ], "policy": { "channel": "voice", "holds": [ { "code": "do_not_contact" } ] } } ], "open_opportunities": [ { "stage": "new" } ], "open_tasks": [ { "kind": "follow_up", "subject_type": "handoff", "status": "open" } ]}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}