Decline a call ringing for you
POST
/v1/workspace/shared-phone/offers/{offer_id}/decline
const url = 'https://api.vocapable.com/v1/workspace/shared-phone/offers/example/decline';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"generation":1}'};
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/shared-phone/offers/example/decline \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "generation": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”offer_id
required
Offer Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
SharedPhoneOfferDecision
object
generation
required
Generation
integer
Examplegenerated
{ "generation": 1}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
SharedPhoneOfferStatus
One ringing offer as its recipient sees it. The app reads this after its ring is reported (CallKit / the incoming-call screen) and after Answer, so “Connected” is shown only once the server says the custody is this person’s.
state:
ringing- still offered to you; nobody has answered.connecting- you answered and the server gave you the caller; the bridge is being confirmed at the carrier.connected- the carrier confirmed you and the caller are in the same call.answered_elsewhere- a teammate (or your other device) answered first.declined- you declined it.missed- the ring ended unanswered (the caller stays in the queue for the next person or device).ended- the caller left, or the call you had has finished.
object
offer_id
required
Offer Id
string
ticket_id
required
Ticket Id
string
generation
required
Generation
integer
kind
required
Kind
string
state
required
State
string
yours
required
Yours
boolean
caller_display
required
Caller Display
string
line_name
required
Line Name
string
business_number
required
Business Number
string
observed_at
required
Observed At
string format: date-time
Example
{ "kind": "browser", "state": "ringing"}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": {} } ]}