Block or allow a caller's number
POST
/v1/workspace/phone-screening/rules
const url = 'https://api.vocapable.com/v1/workspace/phone-screening/rules';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"action":"block","phone_e164":"example","from_decision_id":"example","reason":"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/workspace/phone-screening/rules \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "action": "block", "phone_e164": "example", "from_decision_id": "example", "reason": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
InboundNumberRule
object
id
required
Id
string
action
required
Action
string
number_display
required
Number Display
string
created_by
required
Any of:
WorkspacePersonRef
A teammate named on a record: the id the server holds and the name to show.
object
user_id
required
User Id
string
name
required
Name
string
null
created_at
required
Created At
string format: date-time
Example
{ "action": "block"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}