POST /task-go/v1/workspaces/
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"ownerId": "user-uuid",
"name": "My Workspace",
"description": "This is my main project workspace."
}
{
"message": "Workspace created successfully."
}
{
"error": "Unauthorized. Token missing or invalid."
}
{
"error": "Workspace name is required."
}
PATCH /task-go/v1/workspaces/{workspaceId}
Parameter |
Description |
workspaceId |
UUID of the workspace to update |
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"name": "Updated Workspace Name",
"description": "Updated workspace description."
}
Fields are optional. Send only what needs to be updated.
{
"message": "Workspace updated successfully."
}
{
"error": "Unauthorized. Token missing or invalid."
}
{
"error": "Workspace not found with this ID."
}
Get All Workspaces for an Owner
GET /task-go/v1/users/workspaces/owner/{ownerId}
Parameter |
Description |
ownerId |
UUID of the user |
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"id": "workspace-uuid",
"name": "My Workspace",
"description": "This is my main project workspace.",
"viewers": [
{
"id": "user-uuid",
"username": "najat-mansour",
"firstName": "Najat",
"lastName": "Mansour",
"email": "[email protected]",
"birthdate": "2003-01-28",
"gender": "FEMALE",
"address": {
"country": "Palestine",
"city": "Nablus",
"town": "",
"street": ""
},
"createdAt": "2025-05-02T18:00:00",
"app_rate": 5
}
],
"groups": [
{
"id": "group-uuid",
"name": "Development Team",
"color": "#123456",
"description": "Handles all development tasks",
"tasks": [
{
"id": "task-uuid",
"name": "Setup project",
"description": "Initialize Git repo and base structure",
"status": "NOT_STARTED",
"priority": "HIGH",
"startingTimestamp": "2025-05-01T10:00:00",
"endingTimestamp": "2025-05-02T18:00:00",
"isFavorite": false,
"assignedTo": {
"id": "user-uuid",
"username": "najat-mansour",
"firstName": "Najat",
"lastName": "Mansour",
"email": "[email protected]",
"birthdate": "2003-01-28",
"gender": "FEMALE",
"address": {
"country": "Palestine",
"city": "Nablus",
"town": "",
"street": ""
},
"createdAt": "2025-05-02T18:00:00",
"app_rate": 5
},
"subtasks": [
{
"id": "subtask-uuid",
"name": "Create GitHub repo",
"description": "Set up the GitHub repository",
"status": "NOT_STARTED",
"priority": "MEDIUM",
"startingTimestamp": "2025-05-01T11:00:00",
"endingTimestamp": "2025-05-01T12:00:00"
}
]
}
]
}
]
}
{
"error": "Unauthorized. Token missing or invalid."
}
{
"error": "User not found."
}
❌ 404 Not Found - Workspaces
{
"error": "No workspaces found for this user."
}
Get All Workspaces for a Viewer
GET /task-go/v1/users/workspaces/viewer/{viewerId}
Parameter |
Description |
viewerId |
UUID of the user |
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"id": "workspace-uuid",
"name": "My Workspace",
"description": "This is my main project workspace.",
"viewers": [
{
"id": "user-uuid",
"username": "najat-mansour",
"firstName": "Najat",
"lastName": "Mansour",
"email": "[email protected]",
"birthdate": "2003-01-28",
"gender": "FEMALE",
"address": {
"country": "Palestine",
"city": "Nablus",
"town": "",
"street": ""
},
"createdAt": "2025-05-02T18:00:00",
"app_rate": 5
}
],
"groups": [
{
"id": "group-uuid",
"name": "Development Team",
"color": "#123456",
"description": "Handles all development tasks",
"tasks": [
{
"id": "task-uuid",
"name": "Setup project",
"description": "Initialize Git repo and base structure",
"status": "NOT_STARTED",
"priority": "HIGH",
"startingTimestamp": "2025-05-01T10:00:00",
"endingTimestamp": "2025-05-02T18:00:00",
"isFavorite": false,
"assignedTo": {
"id": "user-uuid",
"username": "najat-mansour",
"firstName": "Najat",
"lastName": "Mansour",
"email": "[email protected]",
"birthdate": "2003-01-28",
"gender": "FEMALE",
"address": {
"country": "Palestine",
"city": "Nablus",
"town": "",
"street": ""
},
"createdAt": "2025-05-02T18:00:00",
"app_rate": 5
},
"subtasks": [
{
"id": "subtask-uuid",
"name": "Create GitHub repo",
"description": "Set up the GitHub repository",
"status": "NOT_STARTED",
"priority": "MEDIUM",
"startingTimestamp": "2025-05-01T11:00:00",
"endingTimestamp": "2025-05-01T12:00:00"
}
]
}
]
}
]
}
{
"error": "Unauthorized. Token missing or invalid."
}
{
"error": "User not found."
}
❌ 404 Not Found - Workspaces
{
"error": "No workspaces found for this user."
}
GET /task-go/v1/workspaces/{workspaceId}
Parameter |
Description |
workspaceId |
UUID of the workspace |
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"id": "workspace-uuid",
"name": "My Workspace",
"description": "This is my main project workspace.",
"members": [
{
"id": "user-uuid",
"username": "najat-mansour",
"firstName": "Najat",
"lastName": "Mansour"
}
],
"groups": [
{
"id": "group-uuid",
"name": "Development Team",
"color": "#123456",
"description": "Handles all development tasks",
"tasks": [
{
"id": "task-uuid",
"name": "Setup project",
"description": "Initialize Git repo and base structure",
"status": "NOT_STARTED",
"priority": "HIGH",
"startingTimestamp": "2025-05-01T10:00:00",
"endingTimestamp": "2025-05-02T18:00:00",
"isFavorite": false,
"assignedTo": {
"id": "user-uuid",
"username": "najat-mansour",
"firstName": "Najat",
"lastName": "Mansour",
"email": "[email protected]",
"birthdate": "2003-01-28",
"gender": "FEMALE",
"address": {
"country": "Palestine",
"city": "Nablus",
"town": "",
"street": ""
},
"createdAt": "2025-05-02T18:00:00",
"app_rate": 5
},
"subtasks": [
{
"id": "subtask-uuid",
"name": "Create GitHub repo",
"description": "Set up the GitHub repository",
"status": "NOT_STARTED",
"priority": "MEDIUM",
"startingTimestamp": "2025-05-01T11:00:00",
"endingTimestamp": "2025-05-01T12:00:00"
}
]
}
]
}
]
}
{
"error": "Unauthorized. Token missing or invalid."
}
{
"error": "Workspace not found."
}
DELETE /task-go/v1/workspaces/{workspaceId}
Parameter |
Description |
workspaceId |
UUID of the workspace |
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"message": "Workspace deleted successfully."
}
{
"error": "Unauthorized. Token missing or invalid."
}
{
"error": "Workspace not found."
}
POST /task-go/v1/workspaces/{workspaceId}/viewers
Parameter |
Description |
workspaceId |
UUID of the workspace |
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"viewerId": "user-id-to-add"
}
{
"message": "User added to workspace successfully."
}
{
"error": "Unauthorized. Token missing or invalid."
}
❌ 404 Not Found – Workspace
{
"error": "Workspace not found."
}
{
"error": "User not found."
}
{
"error": "User is already a member of this workspace."
}
Delete User from Workspace
DELETE /task-go/v1/workspaces/{workspaceId}/viewers/{viewerId}
Parameter |
Description |
workspaceId |
UUID of the workspace |
viewerId |
UUID of the user to remove |
Headers
Header |
Value |
Authorization |
Bearer {JWT}
|
{
"message": "User deleted from workspace successfully."
}
️⚠️ 400 Bad Request – Mismatching
{
"error": "The user is not a member of this workspace."
}
{
"error": "Unauthorized. Token missing or invalid."
}
❌ 404 Not Found – Workspace
{
"error": "Workspace not found."
}
{
"error": "User not found."
}