Assign Users To Task
Developing
Testing Env
Testing Env
POST
/api/v1/tasks/assign-users/6
Last modified:2025-05-15 11:39:35
API Documentation
Assign Users to Task [POST]
Request Headers
Key | Value | Required |
---|---|---|
Accept | application/json | Yes |
user-token | {{user_token}} | Yes |
secure-business-key | {{secure_business_key}} | Yes |
Accept-Language | en/ar | No |
Content-Type | string | Should be multipart/form-data |
Request Format
Parameter | Type | Required | Example Value | Description |
---|---|---|---|---|
assignments | array | Yes | [{"user_id": 45}] | Array of user assignments |
assignments.*.user_id | integer | Yes | 45 | ID of user to assign to the task |
URL Parameters
Parameter | Type | Description | Required |
---|---|---|---|
taskId | int | ID of task to assign users to | Yes |
Response Examples
Success (200)
{
"status_code": 200,
"code": 1020,
"hint": "Processed Successfully",
"success": true,
"data": {
"task": {
"id": 6,
"business_id": 259,
"group_name": "Development",
"name": "Task Title",
"task_code": "T00005",
"owner_id": 123,
"reviewed_by": 456,
"status": "Not Started",
"due_date": "2025-05-20",
"duration_days": 5,
"timeline_start": "2025-05-15",
"timeline_end": "2025-05-25",
"description": "Implement feature X",
"note": "Requires review",
"budget": "1500.00",
"dependent_on": 1,
"project_id": 1,
"board_id": null,
"created_at": "2025-05-14 16:45:03",
"updated_at": "2025-05-14 19:23:37",
"deleted_at": null,
"assignments": [
{
"id": 3,
"task_id": 6,
"assign_to": 101,
"assigned_at": "2025-05-14 16:45:04"
},
{
"id": 7,
"task_id": 6,
"assign_to": 11,
"assigned_at": "2025-05-15 11:38:29"
},
{
"id": 8,
"task_id": 6,
"assign_to": 12,
"assigned_at": "2025-05-15 11:38:29"
}
]
},
"message": "تم تعيين المستخدمين بنجاح"
}
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/tasks/assign-users/6' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'user-token: ' \
--header 'secure-business-key: 4765066450c0bd66325.48403130' \
--form 'assignments[0][user_id]="11";type=5' \
--form 'assignments[1][user_id]="12"'
Response Response Example
{
"status_code": 200,
"code": 1020,
"hint": "Processed Successfully",
"success": true,
"data": {
"task": {
"id": 6,
"business_id": 259,
"group_name": "Development",
"name": "Task Title",
"task_code": "T00005",
"owner_id": 123,
"reviewed_by": 456,
"status": "Not Started",
"due_date": "2025-05-20",
"duration_days": 5,
"timeline_start": "2025-05-15",
"timeline_end": "2025-05-25",
"description": "Implement feature X",
"note": "Requires review",
"budget": "1500.00",
"dependent_on": 1,
"project_id": 1,
"board_id": null,
"created_at": "2025-05-14 16:45:03",
"updated_at": "2025-05-14 19:23:37",
"deleted_at": null,
"assignments": [
{
"id": 3,
"task_id": 6,
"assign_to": 101,
"assigned_at": "2025-05-14 16:45:04"
},
{
"id": 7,
"task_id": 6,
"assign_to": 11,
"assigned_at": "2025-05-15 11:38:29"
},
{
"id": 8,
"task_id": 6,
"assign_to": 12,
"assigned_at": "2025-05-15 11:38:29"
}
]
},
"message": "تم تعيين المستخدمين بنجاح"
}
}
Request
Header Params
Accept
string
optional
Example:
application/json
Accept-Language
string
optional
Example:
en
Content-Type
string
optional
Example:
application/json
user-token
string
optional
Example:
{{user_token}}
secure-business-key
string
optional
Example:
{{secure_business_key}}
Body Params multipart/form-data
assignments[0][user_id]
array[string]
optional
Example:
["11"]
assignments[1][user_id]
array[string]
optional
Example:
["12"]