Update worker reservation

POST /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}

Current and past reservations for a worker

Headers

  • If-Match string

    The If-Match HTTP request header

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the WorkerReservation resources to update.

  • WorkerSid string Required

    The SID of the reserved Worker resource with the WorkerReservation resources to update.

  • Sid string Required

    The SID of the WorkerReservation resource to update.

Body

  • Beep string

    Whether to play a notification beep when the participant joins or when to play a beep. Can be: true, false, onEnter, or onExit. The default value is true.

  • Whether to play a notification beep when the customer joins.

  • CallAccept boolean

    Whether to accept a reservation when executing a Call instruction.

  • CallFrom string

    The Caller ID of the outbound call when executing a Call instruction.

  • Whether to record both legs of a call when executing a Call instruction.

  • The URL to call for the completed call event when executing a Call instruction.

  • The timeout for a call when executing a Call instruction.

  • CallTo string

    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.

  • CallUrl string(uri)

    TwiML URI executed on answering the worker's leg as a result of the Call instruction.

  • Whether to record the conference the participant is joining or when to record the conference. Can be: true, false, record-from-start, and do-not-record. The default value is false.

  • The URL we should call using the conference_recording_status_callback_method when the conference recording is available.

  • The HTTP method we should use to call conference_recording_status_callback. Can be: GET or POST and defaults to POST.

    Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

  • The URL we should call using the conference_status_callback_method when the conference events in conference_status_callback_event occur. Only the value set by the first participant to join the conference is used. Subsequent conference_status_callback values are ignored.

  • The conference status events that we will send to conference_status_callback. Can be: start, end, join, leave, mute, hold, speaker.

    Values are start, end, join, leave, mute, hold, or speaker.

  • The HTTP method we should use to call conference_status_callback. Can be: GET or POST and defaults to POST.

    Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

  • Whether to trim leading and trailing silence from your recorded conference audio files. Can be: trim-silence or do-not-trim and defaults to trim-silence.

  • The caller ID of the call to the worker when executing a Dequeue instruction.

  • The SID of the Activity resource to start after executing a Dequeue instruction.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WA[0-9a-fA-F]{32}$.

  • Whether to record both legs of a call when executing a Dequeue instruction or which leg to record.

  • The call progress events sent via webhooks as a result of a Dequeue instruction.

  • The callback URL for completed call event when executing a Dequeue instruction.

  • The timeout for call when executing a Dequeue instruction.

  • 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.

  • EarlyMedia boolean

    Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is true.

  • Whether to end the conference when the customer leaves.

  • Whether to end the conference when the agent leaves.

  • From string

    The caller ID of the call to the worker when executing a Conference instruction.

  • The assignment instruction for the reservation.

  • The maximum number of participants allowed in the conference. Can be a positive integer from 2 to 250. The default value is 250.

  • Muted boolean

    Whether the agent is muted in the conference. Defaults to false.

  • The new worker activity SID after executing a Conference instruction.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WA[0-9a-fA-F]{32}$.

  • Record boolean

    Whether to record the participant and their conferences, including the time between conferences. Can be true or false and the default is false.

  • The recording channels for the final recording. Can be: mono or dual and the default is mono.

  • The URL that we should call using the recording_status_callback_method when the recording status changes.

  • The HTTP method we should use when we call recording_status_callback. Can be: GET or POST and defaults to POST.

    Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

  • Whether the reservation should be accepted when executing a Redirect instruction.

  • The Call SID of the call parked in the queue when executing a Redirect instruction.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

  • RedirectUrl string(uri)

    TwiML URI to redirect the call to when executing the Redirect instruction.

  • Region string

    The region where we should mix the recorded audio. Can be:us1, ie1, de1, sg1, br1, au1, or jp1.

  • The new status of the reservation. Can be: pending, accepted, rejected, timeout, canceled, or rescinded.

    Values are pending, accepted, rejected, timeout, canceled, rescinded, wrapping, or completed.

  • The SIP password for authentication.

  • The SIP username used for authentication.

  • Whether to start the conference when the participant joins, if it has not already started. Can be: true or false and the default is true. If false and the conference has not started, the participant is muted and hears background music until another participant starts the conference.

  • StatusCallback string(uri)

    The URL we should call using the status_callback_method to send status information to your application.

  • StatusCallbackEvent array[string]

    The call progress events that we will send to status_callback. Can be: initiated, ringing, answered, or completed.

    Values are initiated, ringing, answered, or completed.

  • StatusCallbackMethod string(http-method)

    The HTTP method we should use to call status_callback. Can be: POST or GET and the default is POST.

    Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

  • Timeout integer

    The timeout for a call when executing a Conference instruction.

  • To string

    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.

  • WaitMethod string(http-method)

    The HTTP method we should use to call wait_url. Can be GET or POST and the default is POST. When using a static audio file, this should be GET so that we can cache the file.

    Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

  • WaitUrl string(uri)

    The URL we should call using the wait_method for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. Learn more about hold music.

  • The new worker activity SID if rejecting a reservation.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WA[0-9a-fA-F]{32}$.

Responses

  • OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • date_created string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was last updated

    • reservation_status string | null

      The current status of the reservation

      Values are pending, accepted, rejected, timeout, canceled, rescinded, wrapping, or completed.

    • sid string | null

      The unique string that identifies the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WR[0-9a-fA-F]{32}$.

    • task_sid string | null

      The SID of the reserved Task resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WT[0-9a-fA-F]{32}$.

    • url string(uri) | null

      The absolute URL of the WorkerReservation resource

    • worker_name string | null

      The friendly_name of the Worker that is reserved

    • worker_sid string | null

      The SID of the reserved Worker resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WK[0-9a-fA-F]{32}$.

    • workspace_sid string | null

      The SID of the Workspace that this worker is contained within.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WS[0-9a-fA-F]{32}$.

POST /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid}
curl \
 -X POST https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Reservations/{Sid} \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "If-Match: string" \
 -d 'Beep=string&BeepOnCustomerEntrance=true&CallAccept=true&CallFrom=string&CallRecord=string&CallStatusCallbackUrl=https%3A%2F%2Fexample.com&CallTimeout=42&CallTo=string&CallUrl=https%3A%2F%2Fexample.com&ConferenceRecord=string&ConferenceRecordingStatusCallback=https%3A%2F%2Fexample.com&ConferenceRecordingStatusCallbackMethod=HEAD&ConferenceStatusCallback=https%3A%2F%2Fexample.com&ConferenceStatusCallbackEvent=start&ConferenceStatusCallbackMethod=HEAD&ConferenceTrim=string&DequeueFrom=string&DequeuePostWorkActivitySid=string&DequeueRecord=string&DequeueStatusCallbackEvent=string&DequeueStatusCallbackUrl=https%3A%2F%2Fexample.com&DequeueTimeout=42&DequeueTo=string&EarlyMedia=true&EndConferenceOnCustomerExit=true&EndConferenceOnExit=true&From=string&Instruction=string&MaxParticipants=42&Muted=true&PostWorkActivitySid=string&Record=true&RecordingChannels=string&RecordingStatusCallback=https%3A%2F%2Fexample.com&RecordingStatusCallbackMethod=HEAD&RedirectAccept=true&RedirectCallSid=string&RedirectUrl=https%3A%2F%2Fexample.com&Region=string&ReservationStatus=pending&SipAuthPassword=string&SipAuthUsername=string&StartConferenceOnEnter=true&StatusCallback=https%3A%2F%2Fexample.com&StatusCallbackEvent=initiated&StatusCallbackMethod=HEAD&Timeout=42&To=string&WaitMethod=HEAD&WaitUrl=https%3A%2F%2Fexample.com&WorkerActivitySid=string'
Request example
# Headers
If-Match: string

# Payload
{
  "Beep": "string",
  "BeepOnCustomerEntrance": true,
  "CallAccept": true,
  "CallFrom": "string",
  "CallRecord": "string",
  "CallStatusCallbackUrl": "https://example.com",
  "CallTimeout": 42,
  "CallTo": "string",
  "CallUrl": "https://example.com",
  "ConferenceRecord": "string",
  "ConferenceRecordingStatusCallback": "https://example.com",
  "ConferenceRecordingStatusCallbackMethod": "HEAD",
  "ConferenceStatusCallback": "https://example.com",
  "ConferenceStatusCallbackEvent": [
    "start"
  ],
  "ConferenceStatusCallbackMethod": "HEAD",
  "ConferenceTrim": "string",
  "DequeueFrom": "string",
  "DequeuePostWorkActivitySid": "string",
  "DequeueRecord": "string",
  "DequeueStatusCallbackEvent": [
    "string"
  ],
  "DequeueStatusCallbackUrl": "https://example.com",
  "DequeueTimeout": 42,
  "DequeueTo": "string",
  "EarlyMedia": true,
  "EndConferenceOnCustomerExit": true,
  "EndConferenceOnExit": true,
  "From": "string",
  "Instruction": "string",
  "MaxParticipants": 42,
  "Muted": true,
  "PostWorkActivitySid": "string",
  "Record": true,
  "RecordingChannels": "string",
  "RecordingStatusCallback": "https://example.com",
  "RecordingStatusCallbackMethod": "HEAD",
  "RedirectAccept": true,
  "RedirectCallSid": "string",
  "RedirectUrl": "https://example.com",
  "Region": "string",
  "ReservationStatus": "pending",
  "SipAuthPassword": "string",
  "SipAuthUsername": "string",
  "StartConferenceOnEnter": true,
  "StatusCallback": "https://example.com",
  "StatusCallbackEvent": [
    "initiated"
  ],
  "StatusCallbackMethod": "HEAD",
  "Timeout": 42,
  "To": "string",
  "WaitMethod": "HEAD",
  "WaitUrl": "https://example.com",
  "WorkerActivitySid": "string"
}
Request examples
# Headers
If-Match: string

# Payload
{
  "Beep": "string",
  "BeepOnCustomerEntrance": true,
  "CallAccept": true,
  "CallFrom": "string",
  "CallRecord": "string",
  "CallStatusCallbackUrl": "https://example.com",
  "CallTimeout": 42,
  "CallTo": "string",
  "CallUrl": "https://example.com",
  "ConferenceRecord": "string",
  "ConferenceRecordingStatusCallback": "https://example.com",
  "ConferenceRecordingStatusCallbackMethod": "HEAD",
  "ConferenceStatusCallback": "https://example.com",
  "ConferenceStatusCallbackEvent": [
    "start"
  ],
  "ConferenceStatusCallbackMethod": "HEAD",
  "ConferenceTrim": "string",
  "DequeueFrom": "string",
  "DequeuePostWorkActivitySid": "string",
  "DequeueRecord": "string",
  "DequeueStatusCallbackEvent": [
    "string"
  ],
  "DequeueStatusCallbackUrl": "https://example.com",
  "DequeueTimeout": 42,
  "DequeueTo": "string",
  "EarlyMedia": true,
  "EndConferenceOnCustomerExit": true,
  "EndConferenceOnExit": true,
  "From": "string",
  "Instruction": "string",
  "MaxParticipants": 42,
  "Muted": true,
  "PostWorkActivitySid": "string",
  "Record": true,
  "RecordingChannels": "string",
  "RecordingStatusCallback": "https://example.com",
  "RecordingStatusCallbackMethod": "HEAD",
  "RedirectAccept": true,
  "RedirectCallSid": "string",
  "RedirectUrl": "https://example.com",
  "Region": "string",
  "ReservationStatus": "pending",
  "SipAuthPassword": "string",
  "SipAuthUsername": "string",
  "StartConferenceOnEnter": true,
  "StatusCallback": "https://example.com",
  "StatusCallbackEvent": [
    "initiated"
  ],
  "StatusCallbackMethod": "HEAD",
  "Timeout": 42,
  "To": "string",
  "WaitMethod": "HEAD",
  "WaitUrl": "https://example.com",
  "WorkerActivitySid": "string"
}
Response examples (200)
{
  "account_sid": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "links": {},
  "reservation_status": "pending",
  "sid": "string",
  "task_sid": "string",
  "url": "https://example.com",
  "worker_name": "string",
  "worker_sid": "string",
  "workspace_sid": "string"
}
Response examples (200)
{
  "account_sid": "string",
  "date_created": "2024-05-04T09:42:00+00:00",
  "date_updated": "2024-05-04T09:42:00+00:00",
  "links": {},
  "reservation_status": "pending",
  "sid": "string",
  "task_sid": "string",
  "url": "https://example.com",
  "worker_name": "string",
  "worker_sid": "string",
  "workspace_sid": "string"
}