Workspaces
Create a new workspace
Create a new workspace for the authenticated user.
POST
https://api.dub.co
/
workspaces
curl --request POST \
--url https://api.dub.co/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"slug": "<string>",
"domain": "<string>"
}'
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"logo": null,
"usage": 123,
"usageLimit": 123,
"linksUsage": 123,
"linksLimit": 123,
"domainsLimit": 123,
"tagsLimit": 123,
"usersLimit": 123,
"plan": "free",
"stripeId": "<string>",
"billingCycleStart": 123,
"createdAt": "<string>",
"users": [
{
"role": "owner"
}
],
"domains": [
{
"slug": "<string>"
}
]
}
Authorizations
Default authentication mechanism
Body
application/json
Response
200
application/json
The created workspace
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.dub.co/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"slug": "<string>",
"domain": "<string>"
}'
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"logo": null,
"usage": 123,
"usageLimit": 123,
"linksUsage": 123,
"linksLimit": 123,
"domainsLimit": 123,
"tagsLimit": 123,
"usersLimit": 123,
"plan": "free",
"stripeId": "<string>",
"billingCycleStart": 123,
"createdAt": "<string>",
"users": [
{
"role": "owner"
}
],
"domains": [
{
"slug": "<string>"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.