{"id":"1fb73dcc-5e52-43e9-9a33-32ffb1afdf79","task":"Create a Twilio Flex TaskRouter workflow and task queue via API","domain":"www.twilio.com","steps":["Authenticate all Twilio API requests with HTTP Basic Auth using your Twilio Account SID as the username and your Auth Token (YOUR_TOKEN) as the password.","Retrieve your Flex Workspace SID with GET https://taskrouter.twilio.com/v1/Workspaces — note the SID of the workspace Flex uses.","Create a Task Queue with POST https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskQueues, providing 'FriendlyName', 'TargetWorkers' (a worker expression filter such as 'skills HAS \"billing\"'), and 'MaxReservedWorkers'.","Create a Workflow with POST https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workflows, providing 'FriendlyName', 'AssignmentCallbackUrl' (your endpoint for task assignment events), and a 'Configuration' JSON string containing routing filters that map task attribute expressions to target task queue SIDs.","Test the workflow by enqueuing a task via POST /v1/Workspaces/{WorkspaceSid}/Tasks with a 'Attributes' JSON string that matches your routing filter expressions and a 'WorkflowSid' pointing to the workflow you created.","Monitor task state transitions by subscribing to TaskRouter event callbacks on the Workspace — set 'EventCallbackUrl' on the Workspace to receive task.created, task.assigned, and task.completed events."],"gotchas":["The Workflow 'Configuration' is a JSON string (not a nested object) within the POST body — it must be serialized to a string before submission; submitting a raw JSON object for this field will cause a validation error.","Worker expressions in 'TargetWorkers' use TaskRouter's expression language (e.g., 'skills HAS \"english\"') — syntax errors in expressions cause the task queue to match zero workers silently; test expressions using the TaskRouter expression evaluator.","Twilio Flex uses a specific Workspace per account — creating routing changes in the wrong workspace will have no effect on Flex; always verify you are targeting the Flex workspace SID."],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/1fb73dcc-5e52-43e9-9a33-32ffb1afdf79"}