Update workflow

POST /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the Workflow to update.

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

  • Sid string Required

    The SID of the Workflow resource to update.

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

application/x-www-form-urlencoded

Body

  • FriendlyName string

    A descriptive string that you create to describe the Workflow resource. For example, Inbound Call Workflow or 2014 Outbound Campaign.

  • AssignmentCallbackUrl string(uri)

    The URL from your application that will process task assignment events. See Handling Task Assignment Callback for more details.

  • FallbackAssignmentCallbackUrl string(uri)

    The URL that we should call when a call to the assignment_callback_url fails.

  • Configuration string

    A JSON string that contains the rules to apply to the Workflow. See Configuring Workflows for more information.

  • TaskReservationTimeout integer

    How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to 86,400 (24 hours) and the default is 120.

  • ReEvaluateTasks string

    Whether or not to re-evaluate Tasks. The default is false, which means Tasks in the Workflow will not be processed through the assignment loop again.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • 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 Workflow resource.

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

    • assignment_callback_url string(uri) | null

      The URL that we call when a task managed by the Workflow is assigned to a Worker. See Assignment Callback URL for more information.

    • configuration string | null

      A JSON string that contains the Workflow's configuration. See Configuring Workflows for more information.

    • date_created string(date-time) | null

      The date and time in GMT when the resource was created specified in RFC 2822 format.

    • date_updated string(date-time) | null

      The date and time in GMT when the resource was last updated specified in RFC 2822 format.

    • document_content_type string | null

      The MIME type of the document.

    • fallback_assignment_callback_url string(uri) | null

      The URL that we call when a call to the assignment_callback_url fails.

    • friendly_name string | null

      The string that you assigned to describe the Workflow resource. For example, Customer Support or 2014 Election Campaign.

    • sid string | null

      The unique string that we created to identify the Workflow resource.

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

    • task_reservation_timeout integer

      How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to 86,400 (24 hours) and the default is 120.

      Default value is 0.

    • workspace_sid string | null

      The SID of the Workspace that contains the Workflow.

      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 Workflow resource.

POST /v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}
curl \
 --request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workflows/{Sid}' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'FriendlyName=friendly_name&Configuration=configuration&ReEvaluateTasks=false&AssignmentCallbackUrl=http%3A%2F%2Fexample.com&TaskReservationTimeout=1&FallbackAssignmentCallbackUrl=http%3A%2F%2Fexample.com'
Request example
{"FriendlyName"=>"friendly_name", "Configuration"=>"configuration", "ReEvaluateTasks"=>"false", "AssignmentCallbackUrl"=>"http://example.com", "TaskReservationTimeout"=>1, "FallbackAssignmentCallbackUrl"=>"http://example.com"}
Response examples (200)
{
  "sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "links": {
    "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
    "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics",
    "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics"
  },
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2014-05-14T10:50:02Z",
  "date_updated": "2014-05-14T23:26:06Z",
  "configuration": "task-routing:\\n  - filter: \\n      - 1 == 1\\n    target:\\n      - queue: WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\n        set-priority: 0\\n",
  "friendly_name": "Default Fifo Workflow",
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "document_content_type": "application/json",
  "assignment_callback_url": "http://example.com",
  "task_reservation_timeout": 120,
  "fallback_assignment_callback_url": null
}