Skip to main content
POST
/
api
/
tasks
/
{id}
/
allocate
Allocate a task to a user
curl --request POST \
  --url https://clarus-api.com/api/tasks/{id}/allocate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '{
  "user_id": 5
}'
{
  "error": "<string>"
}

Request Structure

{
  "user_id": 5
}

Key Fields

FieldRequiredDescription
user_idNoUser ID to allocate the task to. Defaults to the current authenticated user if omitted

Behavior

  • Sets task status to ALLOCATED
  • Records assigned_at timestamp
  • Associates the task with the specified (or current) user
  • Returns 204 No Content on success
  • Returns 422 if the task is already completed or 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.

Path Parameters

id
integer
required

The unique identifier of the task to allocate

Body

application/json
user_id
integer | null

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

Response

Operation completed successfully with no content to return