Path parameters
-
The SID of the Workspace that the new Activity belongs to.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WS[0-9a-fA-F]{32}$
.
Body
-
A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include:
on-call
,break
, andemail
. -
Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of
true
,1
, oryes
specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created.
POST
/v1/Workspaces/{WorkspaceSid}/Activities
curl \
--request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Activities' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Available=true&FriendlyName=friendly_name'
Request example
{"Available"=>"true", "FriendlyName"=>"friendly_name"}
Response examples (201)
{
"sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"available": true,
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2014-05-14T10:50:02Z",
"date_updated": "2014-05-14T23:26:06Z",
"friendly_name": "New Activity",
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}