Skip to main content

Assignments

Tags: assignments, tasks, workflow

Task and workflow assignments

Resources

Request and response models used by the endpoints on this page.

AbilityResponse

FieldTypeRequiredDescription
abilityTypeString
celConditionString
configDict[str, Any]
enabledBoolean
idInteger
uuidString

Example:

{
"id": 0 // Integer,
"uuid": "string" // String,
"abilityType": "string" // String,
"config": {} // Dict[str, Any],
"enabled": false // Boolean,
"celCondition": "string" // String, optional
}

AssignmentResponse

FieldTypeRequiredDescription
concludedAtDateTime
createdAtDateTime
currentTaskAssignmentTaskResponse
dataRecordsArrayDefault: []
filesArray
idInteger
isTestBoolean
memberIdInteger
outcomeString
outcomeReasonString
pagesArrayDefault: []
rootTaskAssignmentTaskResponse
statusStringDefault: active
taskIdInteger
taskNameString
updatedAtDateTime
uuidString
workflowIdWorkflowId
workflowNameString
workflowRevisionIdWorkflowRevisionId
workflowRevisionNameString
workflowRevisionNumberInteger
workflowRevisionUuidString
workflowUuidString

Example:

{
"id": 0 // Integer,
"uuid": "string" // String,
"taskId": 0 // Integer, optional,
"taskName": "string" // String, optional,
"memberId": 0 // Integer,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"status": "string" // String, optional, default: active,
"outcome": "string" // String, optional,
"outcomeReason": "string" // String, optional,
"concludedAt": "2024-01-01T00:00:00Z" // DateTime, optional,
"rootTask": null // AssignmentTaskResponse, optional,
"currentTask": null // AssignmentTaskResponse, optional,
"isTest": false // Boolean,
"dataRecords": [] // Array<DataRecordResponse>, optional, default: [],
"files": [] // Array<FileResponse>,
"pages": [] // Array<PageResponse>, optional, default: [],
"workflowId": null // WorkflowId,
"workflowName": "string" // String, optional,
"workflowUuid": "string" // String, optional,
"workflowRevisionId": null // WorkflowRevisionId, optional,
"workflowRevisionUuid": "string" // String, optional,
"workflowRevisionNumber": 0 // Integer, optional,
"workflowRevisionName": "string" // String, optional
}

AssignmentTaskResponse

FieldTypeRequiredDescription
autoNextBoolean
childrenArrayDefault: []
idInteger
requiredBoolean
taskIdInteger
taskNameString
taskUuidString
uuidString
visitedAtDateTime
workflowIdWorkflowId

Example:

{
"id": 0 // Integer,
"uuid": "string" // String,
"required": false // Boolean,
"autoNext": false // Boolean,
"taskId": 0 // Integer,
"workflowId": null // WorkflowId,
"taskName": "string" // String,
"taskUuid": "string" // String,
"visitedAt": "2024-01-01T00:00:00Z" // DateTime,
"children": [] // Array<AssignmentTaskResponse>, optional, default: []
}

DataRecordResponse

FieldTypeRequiredDescription
accessModeInteger
createdAtDateTime
dataTypeIdInteger
externalIdString
fieldValuesDict[str, Any]
idInteger
memberIdInteger
memberNameString
retirementDataRecordRetirementResponse
updatedAtDateTime

Example:

{
"id": 0 // Integer,
"dataTypeId": 0 // Integer,
"memberId": 0 // Integer,
"memberName": "string" // String, optional,
"fieldValues": {} // Dict[str, Any],
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"externalId": "string" // String, optional,
"accessMode": 0 // Integer, optional,
"retirement": null // DataRecordRetirementResponse, optional
}

DataRecordRetirementResponse

FieldTypeRequiredDescription
reasonLiteral[monday_item_archived, monday_item_deleted]
sourceLiteral[monday]Default: monday
statusLiteral[retired]Default: retired

Example:

{
"status": "retired" // Literal[retired], optional, default: retired,
"reason": null // Literal[monday_item_archived, monday_item_deleted],
"source": "monday" // Literal[monday], optional, default: monday
}

FileFolderResponse

FieldTypeRequiredDescription
accessStringDefault: private
ancestorsArrayDefault: []
childCountIntegerDefault: 0
createdAtDateTime
descriptionString
fileCountIntegerDefault: 0
idInteger
indexBooleanDefault: False
indexingCompletedAtDateTime
indexingStartedAtDateTime
nameString
ownerIdInteger
parentIdInteger
pathString
shareableBooleanDefault: False
updatedAtDateTime
uuidString

Example:

{
"id": 0 // Integer,
"name": "string" // String,
"uuid": "string" // String,
"path": "string" // String, optional,
"description": "string" // String, optional,
"parentId": 0 // Integer, optional,
"ownerId": 0 // Integer, optional,
"childCount": 0 // Integer, optional, default: 0,
"fileCount": 0 // Integer, optional, default: 0,
"access": "string" // String, optional, default: private,
"shareable": false // Boolean, optional, default: False,
"index": false // Boolean, optional, default: False,
"indexingStartedAt": "2024-01-01T00:00:00Z" // DateTime, optional,
"indexingCompletedAt": "2024-01-01T00:00:00Z" // DateTime, optional,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"ancestors": [] // Array<FolderPathSegment>, optional, default: []
}

FileResponse

FieldTypeRequiredDescription
accessStringDefault: private
accessModeInteger
cdnUrlString
choicePromptString
createdAtDateTime
currentVersionNumberIntegerDefault: 0
dataString
descriptionString
externalIdString
fileSizeInteger
filenameString
folderFileFolderResponse
folderAncestorIdsArrayDefault: []
folderIdInteger
idInteger
isS3StoredBooleanDefault: False
labelsArray
lastEditedByMemberIdInteger
mimeTypeString
ownerIdInteger
permissionsIntegerDefault: 0
shareCountIntegerDefault: 0
siteIdInteger
titleString
updatedAtDateTime
uuidString

Example:

{
"id": 0 // Integer,
"uuid": "string" // String,
"title": "string" // String,
"description": "string" // String,
"accessMode": 0 // Integer, optional,
"choicePrompt": "string" // String, optional,
"filename": "string" // String,
"mimeType": "string" // String,
"folderId": 0 // Integer,
"folderAncestorIds": 0 // Array<Integer>, optional, default: [],
"siteId": 0 // Integer,
"externalId": "string" // String,
"ownerId": 0 // Integer, optional,
"access": "string" // String, optional, default: private,
"folder": null // FileFolderResponse,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"data": "string" // String,
"cdnUrl": "string" // String,
"fileSize": 0 // Integer,
"isS3Stored": false // Boolean, optional, default: False,
"permissions": 0 // Integer, optional, default: 0,
"labels": [] // Array<FileLabelResponse>, optional,
"shareCount": 0 // Integer, optional, default: 0,
"currentVersionNumber": 0 // Integer, optional, default: 0,
"lastEditedByMemberId": 0 // Integer, optional
}

FolderPathSegment

FieldTypeRequiredDescription
idInteger
nameString

Example:

{
"id": 0 // Integer,
"name": "string" // String
}

MessageTokenUsageResponse

FieldTypeRequiredDescription
cachedTokensIntegerDefault: 0
completionTokensInteger
creditsNumberDefault: 0.0
modelString
promptTokensInteger
totalTokensInteger

Example:

{
"model": "string" // String,
"promptTokens": 0 // Integer,
"completionTokens": 0 // Integer,
"totalTokens": 0 // Integer,
"cachedTokens": 0 // Integer, optional, default: 0,
"credits": 0.0 // Number, optional, default: 0.0
}

OpenAIFunctionToolCall

FieldTypeRequiredDescription
functionDict[str, Any]Default: {}
idStringDefault: ``
typeStringDefault: function

Example:

{
"id": "string" // String, optional, default: ,
"type": "string" // String, optional, default: function,
"function": {} // Dict[str, Any], optional, default: {}
}

OpenAIMessageResponse

FieldTypeRequiredDescription
audienceString
audioFileUuidString
audioMetadataDict[str, Any]
childMessageCountIntegerDefault: 0
contentUnion[str, List[Dict[str, Any]], null]
created_atDateTime
email_idInteger
idString
inbox_idInteger
isCannedBooleanDefault: False
memberIdInteger
originString
originalContentUnion[str, List[Dict[str, Any]], null]
parentMessageIdString
roleString
smsDeliveryErrorCodeString
smsDeliveryFailureReasonString
smsDeliveryStatusString
smsDeliveryUpdatedAtDateTime
sttMetadataSttMetadataResponse
suggestionsArray
taskIdInteger
tokenUsageMessageTokenUsageResponse
tool_call_idString
tool_callsArrayDefault: []
truncatedAtMsInteger
truncationReasonString
userRatingNumber
userRatingCommentString

Example:

{
"id": "string" // String, optional,
"role": "string" // String, optional,
"content": {} // Union[str, List[Dict[str, Any]], null], optional,
"originalContent": {} // Union[str, List[Dict[str, Any]], null], optional,
"truncationReason": "string" // String, optional,
"truncatedAtMs": 0 // Integer, optional,
"sttMetadata": null // SttMetadataResponse, optional,
"tool_calls": [] // Array<OpenAIFunctionToolCall>, optional, default: [],
"tool_call_id": "string" // String, optional,
"suggestions": "string" // Array<String>, optional,
"created_at": "2024-01-01T00:00:00Z" // DateTime, optional,
"email_id": 0 // Integer, optional,
"inbox_id": 0 // Integer, optional,
"tokenUsage": null // MessageTokenUsageResponse, optional,
"memberId": 0 // Integer, optional,
"origin": "string" // String, optional,
"audience": "string" // String, optional,
"isCanned": false // Boolean, optional, default: False,
"childMessageCount": 0 // Integer, optional, default: 0,
"parentMessageId": "string" // String, optional,
"taskId": 0 // Integer, optional,
"audioFileUuid": "string" // String, optional,
"audioMetadata": {} // Dict[str, Any], optional,
"smsDeliveryStatus": "string" // String, optional,
"smsDeliveryErrorCode": "string" // String, optional,
"smsDeliveryUpdatedAt": "2024-01-01T00:00:00Z" // DateTime, optional,
"smsDeliveryFailureReason": "string" // String, optional,
"userRating": 0.0 // Number, optional,
"userRatingComment": "string" // String, optional
}

OperatorChildTaskDetail

FieldTypeRequiredDescription
assignmentTaskIdInteger
autoNextBooleanDefault: False
celConditionString
choicePromptString
orderIntegerDefault: 0
requiredBooleanDefault: False
shortPromptString
taskIdInteger
taskNameString
taskTypeString
taskUuidString
visitedAtDateTime

Example:

{
"assignmentTaskId": 0 // Integer,
"taskId": 0 // Integer,
"taskName": "string" // String,
"taskUuid": "string" // String,
"taskType": "string" // String,
"shortPrompt": "string" // String, optional,
"choicePrompt": "string" // String, optional,
"celCondition": "string" // String, optional,
"autoNext": false // Boolean, optional, default: False,
"required": false // Boolean, optional, default: False,
"order": 0 // Integer, optional, default: 0,
"visitedAt": "2024-01-01T00:00:00Z" // DateTime, optional
}

OperatorTaskDetailResponse

FieldTypeRequiredDescription
abilitiesArrayDefault: []
assignmentIdInteger
assignmentTaskIdInteger
celGuardString
childTasksArrayDefault: []
configurationObject
descriptionString
inheritedAbilitiesArrayDefault: []
parentAssignmentTaskIdInteger
parentShortPromptString
parentTaskNameString
promptString
renderedPromptString
shortPromptString
taskIdInteger
taskNameString
taskTypeString

Example:

{
"assignmentId": 0 // Integer,
"assignmentTaskId": 0 // Integer,
"taskId": 0 // Integer,
"taskName": "string" // String,
"taskType": "string" // String,
"prompt": "string" // String, optional,
"renderedPrompt": "string" // String, optional,
"shortPrompt": "string" // String, optional,
"description": "string" // String, optional,
"configuration": {} // Object, optional,
"celGuard": "string" // String, optional,
"abilities": [] // Array<AbilityResponse>, optional, default: [],
"inheritedAbilities": [] // Array<AbilityResponse>, optional, default: [],
"childTasks": [] // Array<OperatorChildTaskDetail>, optional, default: [],
"parentAssignmentTaskId": 0 // Integer, optional,
"parentTaskName": "string" // String, optional,
"parentShortPrompt": "string" // String, optional
}

PageResponse

FieldTypeRequiredDescription
contentAMPString
contentBlocksTipTapDocument
contentHtmlString
contentMarkdownString
crawledAtDateTime
createdAtDateTime
idInteger
isHomePageBooleanDefault: False
siteIdInteger
slugString
sourceHtmlString
sourceMarkdownString
sourceMetadatadict[str, Any]
sourceUrlString
statusStringDefault: draft
titleString
updatedAtDateTime
urlString

Example:

{
"id": 0 // Integer,
"slug": "string" // String,
"title": "string" // String,
"status": "string" // String, optional, default: draft,
"url": "string" // String, optional,
"contentBlocks": null // TipTapDocument,
"contentMarkdown": "string" // String,
"contentHtml": "string" // String,
"contentAMP": "string" // String,
"sourceMetadata": {} // dict[str, Any],
"sourceHtml": "string" // String,
"sourceMarkdown": "string" // String,
"sourceUrl": "string" // String,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"crawledAt": "2024-01-01T00:00:00Z" // DateTime,
"siteId": 0 // Integer,
"isHomePage": false // Boolean, optional, default: False
}

SttMetadataResponse

FieldTypeRequiredDescription
eotConfidenceNumber
meanNumber
minNumber
modelString
wordsArrayDefault: []

Example:

{
"model": "string" // String, optional,
"eotConfidence": 0.0 // Number, optional,
"min": 0.0 // Number, optional,
"mean": 0.0 // Number, optional,
"words": [] // Array<SttWordConfidenceResponse>, optional, default: []
}

SttWordConfidenceResponse

FieldTypeRequiredDescription
cNumber
eNumber
sNumber
wString

Example:

{
"w": "string" // String,
"c": 0.0 // Number,
"s": 0.0 // Number, optional,
"e": 0.0 // Number, optional
}

TipTapDocument

FieldTypeRequiredDescription
contentArray
translationsDict[str, TipTapDocument]
typeLiteral[doc]Default: doc

Example:

{
"type": "doc" // Literal[doc], optional, default: doc,
"content": [] // Array<TipTapNode>, optional,
"translations": {} // Dict[str, TipTapDocument], optional
}

Endpoints

List

GET /api/v2/w/{workspace_uuid}/assignments

Description:

List assignments with pagination.

Self-access: Users can always list their own assignments (mine=True forced). Admin access: ASSIGNMENTS_READ scope required to list all assignments or to filter by a memberId other than the caller's own.

Authentication: Requires workspace member

Parameters:

  • page (Integer) — min: 1
  • pageSize (Integer) — min: 1, max: 100
  • sortBy (AssignmentSortField)
  • sortOrder (SortOrder)
  • mine (Boolean)
  • taskId (Integer)
  • memberId (Integer)
  • status (String)

Response: See PaginatedResponse[AssignmentResponse]


Create

POST /api/v2/w/{workspace_uuid}/assignments

Description:

Create a new assignment.

Requires workflow USE permission (checked by CreateAssignmentRequest).

Authentication: Requires workspace member

Parameters:

  • request_body (CreateAssignmentRequest)

Response: See AssignmentResponse


Get Assignment Id

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}

Description:

Get a specific assignment by ID.

Self-access: Users can view their own assignments. Admin access: ASSIGNMENTS_READ scope required to view other members' assignments.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Response: See AssignmentResponse


Update Assignment Id

PUT /api/v2/w/{workspace_uuid}/assignments/{assignment_id}

Description:

Update an existing assignment.

Self-access: Users can update their own assignments. Admin access: ASSIGNMENTS_WRITE scope required to update other members' assignments.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • request_body (UpdateAssignmentRequest)

Response: See AssignmentResponse


Cancel

POST /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/cancel

Description:

Cancel an active assignment.

Admin access: ASSIGNMENTS_WRITE scope required to cancel other members' assignments. Self-access: Users can cancel their own assignments.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • request_body (CancelAssignmentRequest)

Response: See AssignmentResponse


Cel Context

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/cel-context

Description:

Get CEL evaluation context for the current assignment.

Returns a read-only snapshot of the variables used when evaluating task conditions for this Assignment, so the UI can show routing hints. Task switches are still enforced server-side.

Self-access: Users can read context for their own assignments. Admin access: ASSIGNMENTS_READ scope required for other members' assignments.

The response omits member.form_data and member.data (empty maps) so this preview does not expose PHI; the runtime evaluator still has access when conditions reference those fields.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Current Task Detail

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/current-task-detail

Description:

Get rich detail of the current task for operator assignment view.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Response: See OperatorTaskDetailResponse


Messages

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/messages

Description:

Get all messages for a specific assignment.

Self-access: Users can view messages for their own assignments. Admin access: ASSIGNMENTS_READ scope required to view other members' messages.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)

Response: List of OpenAIMessageResponse


Tasks

GET /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/tasks/{assignment_task_id}

Description:

Get a specific assignment task by ID.

Self-access: Users can view tasks for their own assignments. Admin access: ASSIGNMENTS_READ scope required to view other members' tasks.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • assignment_task_id (Integer)

Response: See AssignmentTaskResponse


Update Select

PUT /api/v2/w/{workspace_uuid}/assignments/{assignment_id}/tasks/{assignment_task_id}/select

Description:

Switch the current task for an assignment.

Self-access: Users can switch tasks for their own assignments. Admin access: ASSIGNMENTS_WRITE scope required to switch other members' tasks.

Authentication: Requires workspace member

Parameters:

  • assignment_id (Integer)
  • assignment_task_id (Integer)

Response: See AssignmentTaskResponse