Overview
SDKs
- Overview
- Server-side SDKs
- Client-side SDK
- Embedded Dashboards
APIs
- Links API
- Analytics API
- Conversions API
- Partners API
- Customers API
- Folders API
- Tags API
- Domains API
Update a workspace
Update a workspace
Update a workspace by ID or slug.
PATCH
/
workspaces
/
{idOrSlug}
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
});
async function run() {
const result = await dub.workspaces.update("<value>");
// Handle the result
console.log(result);
}
run();
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"logo": null,
"inviteCode": "<string>",
"plan": "free",
"stripeId": "<string>",
"billingCycleStart": 123,
"paymentFailedAt": "<string>",
"stripeConnectId": "<string>",
"totalLinks": 123,
"usage": 123,
"usageLimit": 123,
"linksUsage": 123,
"linksLimit": 123,
"salesUsage": 123,
"salesLimit": 123,
"domainsLimit": 123,
"tagsLimit": 123,
"foldersUsage": 123,
"foldersLimit": 123,
"usersLimit": 123,
"aiUsage": 123,
"aiLimit": 123,
"conversionEnabled": true,
"dotLinkClaimed": true,
"partnersEnabled": true,
"createdAt": "<string>",
"users": [
{
"role": "owner",
"defaultFolderId": "<string>"
}
],
"domains": [
{
"slug": "acme.com",
"primary": false,
"verified": false
}
],
"flags": {},
"store": {},
"allowedHostnames": [
"dub.sh"
]
}
Authorizations
Default authentication mechanism
Path Parameters
The ID or slug of the workspace to update.
Body
application/json
Response
200
application/json
The updated workspace.
The response is of type object
.
Was this page helpful?
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
});
async function run() {
const result = await dub.workspaces.update("<value>");
// Handle the result
console.log(result);
}
run();
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"logo": null,
"inviteCode": "<string>",
"plan": "free",
"stripeId": "<string>",
"billingCycleStart": 123,
"paymentFailedAt": "<string>",
"stripeConnectId": "<string>",
"totalLinks": 123,
"usage": 123,
"usageLimit": 123,
"linksUsage": 123,
"linksLimit": 123,
"salesUsage": 123,
"salesLimit": 123,
"domainsLimit": 123,
"tagsLimit": 123,
"foldersUsage": 123,
"foldersLimit": 123,
"usersLimit": 123,
"aiUsage": 123,
"aiLimit": 123,
"conversionEnabled": true,
"dotLinkClaimed": true,
"partnersEnabled": true,
"createdAt": "<string>",
"users": [
{
"role": "owner",
"defaultFolderId": "<string>"
}
],
"domains": [
{
"slug": "acme.com",
"primary": false,
"verified": false
}
],
"flags": {},
"store": {},
"allowedHostnames": [
"dub.sh"
]
}