Turn on WhatsApp
POST
/v1/tools/whatsapp
const url = 'https://api.orvoca.com/v1/tools/whatsapp';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"config":{"sender":"shared","phone_number_id":null,"booking_confirmations":true}}'};
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.orvoca.com/v1/tools/whatsapp \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "config": { "sender": "shared", "phone_number_id": null, "booking_confirmations": true } }'Lets agents use send_whatsapp (to the caller only) and sends booking confirmations. Sends from Orvoca’s shared number, or the business’s own once it is onboarded with our WhatsApp provider. One per workspace. Send a test (arguments.to) before publishing.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
config
object
sender
string
phone_number_id
string | null
booking_confirmations
boolean
Responses
Section titled “Responses”Turned on
Media typeapplication/json
object
id
required
string
kind
required
string
name
required
Function name the agent calls, e.g. check_order
string
description
required
string | null
config
secret_headers
required
Names of the stored headers; values are never returned
Array<string>
status
required
string
tested_at
required
string | null
created_at
required
string | null
updated_at
required
string | null
Example
{ "kind": "calendar", "status": "active"}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not signed in or bad API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not allowed
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Already on
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}