Update task reservation

POST /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}

Tasks reserved for workers

Headers

  • If-Match string

    The If-Match HTTP request header

Path parameters

  • WorkspaceSid string Required

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

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

  • TaskSid string Required

    The SID of the reserved Task resource with the TaskReservation resources to update.

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

  • Sid string Required

    The SID of the TaskReservation resource to update.

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

application/x-www-form-urlencoded

Body

  • ReservationStatus string

    The current status of the reservation. Can be: pending, accepted, rejected, or timeout.

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

  • WorkerActivitySid string

    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}$.

  • Instruction string

    The assignment instruction for reservation.

  • DequeuePostWorkActivitySid string

    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}$.

  • DequeueFrom string

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

  • DequeueRecord string

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

  • DequeueTimeout integer

    Timeout for call when executing a Dequeue instruction.

  • DequeueTo string

    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.

  • DequeueStatusCallbackUrl string(uri)

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

  • CallFrom string

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

  • CallRecord string

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

  • CallTimeout integer

    Timeout for 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.

  • CallStatusCallbackUrl string(uri)

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

  • CallAccept boolean

    Whether to accept a reservation when executing a Call instruction.

  • RedirectCallSid string

    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}$.

  • RedirectAccept boolean

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

  • RedirectUrl string(uri)

    TwiML URI to redirect the call to when executing the Redirect 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.

  • From string

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

  • StatusCallback string(uri)

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

  • 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 GET or POST.

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

  • Timeout integer

    Timeout for call when executing a Conference instruction.

  • Record boolean

    Whether to record the participant and their conferences, including the time between conferences. The default is false.

  • Muted boolean

    Whether the agent is muted in the conference. The default is false.

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

  • StartConferenceOnEnter boolean

    Whether to start the conference when the participant joins, if it has not already started. 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.

  • EndConferenceOnExit boolean

    Whether to end the conference when the agent leaves.

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

  • 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 GET or POST.

  • EarlyMedia boolean

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

  • MaxParticipants integer

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

  • ConferenceStatusCallback string(uri)

    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.

  • ConferenceStatusCallbackMethod string(http-method)

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

    Values are GET or POST.

  • ConferenceStatusCallbackEvent array[string]

    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.

  • ConferenceRecord string

    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.

  • ConferenceTrim string

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

  • RecordingChannels string

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

  • RecordingStatusCallback string(uri)

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

  • RecordingStatusCallbackMethod string(http-method)

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

    Values are GET or POST.

  • ConferenceRecordingStatusCallback string(uri)

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

  • ConferenceRecordingStatusCallbackMethod string(http-method)

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

    Values are GET or POST.

  • Region string

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

  • SipAuthUsername string

    The SIP username used for authentication.

  • SipAuthPassword string

    The SIP password for authentication.

  • DequeueStatusCallbackEvent array[string]

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

  • PostWorkActivitySid string

    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}$.

  • SupervisorMode string

    Values are monitor, whisper, or barge.

  • Supervisor string

    The Supervisor SID/URI when executing the Supervise instruction.

  • EndConferenceOnCustomerExit boolean

    Whether to end the conference when the customer leaves.

  • BeepOnCustomerEntrance boolean

    Whether to play a notification beep when the customer joins.

  • JitterBufferSize string

    The jitter buffer size for conference. Can be: small, medium, large, off.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • ETag string
    • X-Rate-Limit-Limit string
    • X-Rate-Limit-Remaining string
    • X-Rate-Limit-Config string
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

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

      The SID of the Account that created the TaskReservation 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 date and time in GMT when the resource was created specified in ISO 8601 format.

    • date_updated string(date-time) | null

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

    • reservation_status string

      The current status of the reservation. Can be: pending, accepted, rejected, or timeout.

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

    • sid string | null

      The unique string that we created to identify the TaskReservation 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}$.

    • 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 task is contained within.

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

    • url string(uri) | null

      The absolute URL of the TaskReservation reservation.

POST /v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}
curl \
 --request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Tasks/{TaskSid}/Reservations/{Sid}' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --header "If-Match: string" \
 --data 'ReservationStatus=accepted'
{"ReservationStatus"=>"accepted"}
{"Supervisor"=>"WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Instruction"=>"supervise", "SupervisorMode"=>"monitor"}
Response examples (200)
{
  "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attention": 0,
  "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "worker_name": "Doug",
  "date_created": "2014-05-14T10:50:02Z",
  "date_updated": "2014-05-15T16:03:42Z",
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "reservation_status": "accepted"
}
{
  "sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "task": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "worker": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "attention": 0,
  "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "worker_name": "Doug",
  "date_created": "2014-05-14T10:50:02Z",
  "date_updated": "2014-05-15T16:03:42Z",
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "reservation_status": "accepted"
}