add Workspace
Developing
Testing Env
Testing Env
POST
/api/v1/workspaces/add
Last modified:2025-04-29 06:41:28
Create Workspace
Endpoint
POST /api/workspaces
Parameters
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 | Yes |
Request Body (JSON)
Name | Type | Required | Description | Validation Rules |
---|---|---|---|---|
name_ar | string | Yes | Arabic name of the workspace | max:255 |
name_en | string | Yes | English name of the workspace | max:255 |
client_name | string | No | Name of the associated client | nullable, max:255 |
description | string | No | Description of the workspace | nullable, max:255 |
board_ids | array | No | Array of board IDs to associate | nullable, array of existing board IDs |
team_ids | array | No | Array of team IDs to associate | nullable, array of existing team IDs |
business_id | integer | Yes* | ID of the associated business | required (implied from code) |
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/workspaces/add' \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'user-token: ' \
--header 'secure-business-key: 4765066450c0bd66325.48403130' \
--form 'name_ar="اسم مساحة العمل";type=body' \
--form 'name_en="Workspace Name";type=body' \
--form 'client_name="اسم العميل";type=body' \
--form 'description="وصف المساحة";type=body' \
--form 'board_ids[]="1";type=body' \
--form 'board_ids[]="2";type=body' \
--form 'team_ids[]="1";type=body' \
--form 'team_ids[]="2";type=body'
Response Response Example
{
"status_code": 201,
"code": 1021,
"hint": "Resource created successfully",
"success": true,
"data": {
"workspace": {
"id": 4,
"name": "Workspace Name",
"client_name": "اسم العميل",
"description": "وصف المساحة",
"board_ids": "1,2",
"team_ids": "1,2",
"business_id": 259,
"created_at": "2025-04-29T07:18:33.000000Z",
"updated_at": "2025-04-29T07:18:33.000000Z"
},
"message": "Workspace created successfully"
}
}
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
name_ar
string
required
Example:
اسم مساحة العمل
name_en
string
required
Example:
Workspace Name
client_name
string
optional
Example:
اسم العميل
description
string
optional
Example:
وصف المساحة
board_ids[]
array[string]
optional
Example:
["1","2"]
team_ids[]
array[string]
optional
Example:
["1","2"]