Skip to main content
POST
/
api
/
tasks
/
allocate
Allocate tasks in bulk
curl --request POST \
  --url https://clarus-api.com/api/tasks/allocate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "ids": [
    1,
    2,
    3
  ]
}
'
{
  "error": "<string>"
}

Request Structure

{
  "ids": [1, 2, 3],
  "user_id": 5
}

Key Fields

FieldRequiredDescription
idsYesArray of task IDs to allocate
user_idNoUser ID to allocate tasks to. Defaults to the current authenticated user if omitted

Behavior

  • Allocates all specified tasks to the given (or current) user
  • Sets status to ALLOCATED and records assigned_at for each task
  • Returns 204 No Content on success
  • Returns 422 if any task cannot be allocated

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Body

application/json
ids
integer[]
required

Array of task IDs to allocate

user_id
integer | null

User ID to allocate tasks to. Defaults to the current authenticated user if omitted

Response

Operation completed successfully with no content to return