Workspace
Retrieve workspaces
Retrieve all workspaces that you have access to (inside the active user organization with ID 1337
):
curl https://api.tapeapp.com/v1/workspace/org \
-u user_key_replace_with_your_api_key:
{
"total": 2,
"workspaces": [
{
"workspace_id": 1,
"name": "Task management",
"slug": "task-management",
"type": "closed",
"description": "Manage all tasks and projects inside this workspace.",
"org_id": 1337
},
{
"workspace_id": 2,
"name": "Contact directory",
"slug": "contact-directory",
"type": "default",
"description": "Keep track of our contacts here.",
"org_id": 1337
}
]
}
Create a workspace
Create a new workspace:
curl -X POST https://api.tapeapp.com/v1/workspace \
-u user_key_replace_with_your_api_key:\
-H "Content-Type: application/json" \
--data '{
"name": "Task management",
"type": "closed",
"description": "Manage all tasks and projects inside this workspace."
}'
The created workspace will be returned in the response:
{
"workspace_id": 1,
"name": "Task management",
"slug": "task-management",
"type": "closed",
"description": "Manage all tasks and projects inside this workspace.",
"org_id": 1337
}
Workspace type
The type
property to create workspaces needs to be one of "closed"
, "open"
, "default"
and "private"
. This corresponds to the workspace types documented in the help center.
Update a workspace
Update an existing workspace via its ID:
curl -X PUT https://api.tapeapp.com/v1/workspace/1 \
-u user_key_replace_with_your_api_key:\
-H "Content-Type: application/json" \
--data '{
"name": "Task management (NEW)",
"type": "closed",
"description": "Manage all tasks and projects inside this NEW workspace."
}'
The updated workspace will be returned in the response:
{
"workspace_id": 1,
"name": "Task management (NEW)",
"slug": "task-management-new",
"type": "closed",
"description": "Manage all tasks and projects inside this NEW workspace.",
"org_id": 1337
}
Delete a workspace
Delete a workspace via its ID:
curl -X DELETE https://api.tapeapp.com/v1/workspace/1 \
-u user_key_replace_with_your_api_key:\
-H "Content-Type: application/json"
The deleted workspace will be returned in the response:
{
"workspace_id": 1,
"name": "Task management (NEW)",
"slug": "task-management-new",
"type": "closed",
"description": "Manage all tasks and projects inside this NEW workspace.",
"org_id": 1337
}
Retrieve workspace members
Retrieve all workspace members for a given workspace:
curl https://api.tapeapp.com/v1/workspace/1/member \
-u user_key_replace_with_your_api_key:
{
"workspace_members": [
{
"workspace_id": 1,
"user_id": 10000,
"role": "'admin",
},
{
"workspace_id": 1,
"user_id": 10001,
"role": "'member",
}
]
}
Add a workspace member
Add an existing organization user to a given workspace. If the user is already a member, the role will be updated according to the provided input.
curl -X POST https://api.tapeapp.com/v1/workspace/1/member \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"user_id": 10002,
"role": "admin"
}'
{
"workspace_id": 1,
"user_id": 10002,
"role": "'admin"
}
User Workspace Role
The role
property to add members needs to be one of "admin"
, "member"
and"guest"
. This corresponds to the workspace organization roles documented in the help center.
Remove a workspace member
Remove a workspace member from a given workspace. Note that the user will continue to exist in the organization.
curl -X DELETE https://api.tapeapp.com/v1/workspace/100/member/{userId} \
-u user_key_replace_with_your_api_key:
{
"workspace_id": 100,
"user_id": 10002,
"role": "'admin"
}
Notes
Note
Currently it is not possible to change the type of a workspace via the API. Be sure to properly create workspaces with the desired type.