Worker Reservation Resource
Worker Reservations represent the current and past reservations for a Worker. Current Reservations can be accepted using the Reservation instance resource.
WorkerReservation properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the WorkerReservation resource. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
reservation_status
|
The current status of the reservation. Can be: |
sid
|
The unique string that we created to identify the WorkerReservation resource. |
task_sid
|
The SID of the reserved Task resource. |
worker_name
|
The |
worker_sid
|
The SID of the reserved Worker resource. |
workspace_sid
|
The SID of the Workspace that this worker is contained within. |
url
|
The absolute URL of the WorkerReservation resource. |
links
|
The URLs of related resources. |
Fetch a WorkerReservation resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the WorkerReservation resource to fetch. |
worker_sid
Path
|
The SID of the reserved Worker resource with the WorkerReservation resource to fetch. |
sid
Path
|
The SID of the WorkerReservation resource to fetch. |
Example 1
Read multiple WorkerReservation resources
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the WorkerReservation resources to read. |
worker_sid
Path
|
The SID of the reserved Worker resource with the WorkerReservation resources to read. |
reservation_status
Optional
|
Returns the list of reservations for a worker with a specified ReservationStatus. Can be: |
Example 1
Update a WorkerReservation resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}
To indicate that a Worker has accepted or rejected a Reservation, you make an HTTP POST request to a Reservation instance resource URI.
You can issue a simple Accept or Reject request. You can also issue an Instruction, like Dequeueing or Calling, similar to Responding to an Assignment Callback.
Tasks are automatically canceled after 10 rejections.
See Manually accepting or rejecting a reservation for more information.
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the WorkerReservation resources to update. |
worker_sid
Path
|
The SID of the reserved Worker resource with the WorkerReservation resources to update. |
sid
Path
|
The SID of the WorkerReservation resource to update. |
reservation_status
Optional
|
The new status of the reservation. Can be: |
worker_activity_sid
Optional
|
The new worker activity SID if rejecting a reservation. |
instruction
Optional
|
The assignment instruction for the reservation. |
dequeue_post_work_activity_sid
Optional
|
The SID of the Activity resource to start after executing a Dequeue instruction. |
dequeue_from
Optional
|
The caller ID of the call to the worker when executing a Dequeue instruction. |
dequeue_record
Optional
|
Whether to record both legs of a call when executing a Dequeue instruction or which leg to record. |
dequeue_timeout
Optional
|
The timeout for call when executing a Dequeue instruction. |
dequeue_to
Optional
|
The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the E.164 formatted phone number, depending on the destination. |
dequeue_status_callback_url
Optional
|
The callback URL for completed call event when executing a Dequeue instruction. |
call_from
Optional
|
The Caller ID of the outbound call when executing a Call instruction. |
call_record
Optional
|
Whether to record both legs of a call when executing a Call instruction. |
call_timeout
Optional
|
The timeout for a call when executing a Call instruction. |
call_to
Optional
|
The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the E.164 formatted phone number, depending on the destination. |
call_url
Optional
|
TwiML URI executed on answering the worker's leg as a result of the Call instruction. |
call_status_callback_url
Optional
|
The URL to call for the completed call event when executing a Call instruction. |
call_accept
Optional
|
Whether to accept a reservation when executing a Call instruction. |
redirect_call_sid
Optional
|
The Call SID of the call parked in the queue when executing a Redirect instruction. |
redirect_accept
Optional
|
Whether the reservation should be accepted when executing a Redirect instruction. |
redirect_url
Optional
|
TwiML URI to redirect the call to when executing the Redirect instruction. |
to
Optional
|
The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the E.164 formatted phone number, depending on the destination. |
from
Optional
|
The caller ID of the call to the worker when executing a Conference instruction. |
status_callback
Optional
|
The URL we should call using the |
status_callback_method
Optional
|
The HTTP method we should use to call |
status_callback_event
Optional
|
The call progress events that we will send to |
timeout
Optional
|
The timeout for a call when executing a Conference instruction. |
record
Optional
|
Whether to record the participant and their conferences, including the time between conferences. Can be |
muted
Optional
|
Whether the agent is muted in the conference. Defaults to |
beep
Optional
|
Whether to play a notification beep when the participant joins or when to play a beep. Can be: |
start_conference_on_enter
Optional
|
Whether to start the conference when the participant joins, if it has not already started. Can be: |
end_conference_on_exit
Optional
|
Whether to end the conference when the agent leaves. |
wait_url
Optional
|
The URL we should call using the |
wait_method
Optional
|
The HTTP method we should use to call |
early_media
Optional
|
Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is |
max_participants
Optional
|
The maximum number of participants allowed in the conference. Can be a positive integer from |
conference_status_callback
Optional
|
The URL we should call using the |
conference_status_callback_method
Optional
|
The HTTP method we should use to call |
conference_status_callback_event
Optional
|
The conference status events that we will send to |
conference_record
Optional
|
Whether to record the conference the participant is joining or when to record the conference. Can be: |
conference_trim
Optional
|
Whether to trim leading and trailing silence from your recorded conference audio files. Can be: |
recording_channels
Optional
|
The recording channels for the final recording. Can be: |
recording_status_callback
Optional
|
The URL that we should call using the |
recording_status_callback_method
Optional
|
The HTTP method we should use when we call |
conference_recording_status_callback
Optional
|
The URL we should call using the |
conference_recording_status_callback_method
Optional
|
The HTTP method we should use to call |
region
Optional
|
The region where we should mix the recorded audio. Can be: |
sip_auth_username
Optional
|
The SIP username used for authentication. |
sip_auth_password
Optional
|
The SIP password for authentication. |
dequeue_status_callback_event
Optional
|
The call progress events sent via webhooks as a result of a Dequeue instruction. |
post_work_activity_sid
Optional
|
The new worker activity SID after executing a Conference instruction. |
end_conference_on_customer_exit
Optional
|
Whether to end the conference when the customer leaves. |
beep_on_customer_entrance
Optional
|
Whether to play a notification beep when the customer joins. |
if_match
Header
|
The If-Match HTTP request header |
Example 1
Example 2
Example 3
Example 4
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.