GET
/
workspaces
/
{idOrSlug}
require 'dub'


s = ::OpenApiSDK::Dub.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    token: "DUB_API_KEY",
  )
)


req = ::OpenApiSDK::Operations::GetWorkspaceRequest.new(
  id_or_slug: "<value>",
)
    
res = s.workspaces.get(req)

if ! res.workspace_schema.nil?
  # handle response
end
{
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "logo": null,
  "inviteCode": "<string>",
  "plan": "free",
  "stripeId": "<string>",
  "billingCycleStart": 123,
  "paymentFailedAt": "<string>",
  "stripeConnectId": "<string>",
  "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"
    }
  ],
  "domains": [
    {
      "slug": "acme.com",
      "primary": false,
      "verified": false
    }
  ],
  "flags": {},
  "store": {},
  "allowedHostnames": [
    "dub.sh"
  ]
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

idOrSlug
string
required

The ID or slug of the workspace.

Response

200
application/json
The retrieved workspace
id
string
required

The unique ID of the workspace.

name
string
required

The name of the workspace.

slug
string
required

The slug of the workspace.

The logo of the workspace.

inviteCode
string | null
required

The invite code of the workspace.

plan
enum<string>
required

The plan of the workspace.

Available options:
free,
pro,
business,
business plus,
business extra,
business max,
enterprise
stripeId
string | null
required

The Stripe ID of the workspace.

billingCycleStart
number
required

The date and time when the billing cycle starts for the workspace.

paymentFailedAt
string | null
required

The date and time when the payment failed for the workspace.

stripeConnectId
string | null
required

The Stripe Connect ID of the workspace.

usage
number
required

The usage of the workspace.

usageLimit
number
required

The usage limit of the workspace.

The links usage of the workspace.

The links limit of the workspace.

salesUsage
number
required

The dollar amount of tracked revenue in the current billing cycle (in cents).

salesLimit
number
required

The limit of tracked revenue in the current billing cycle (in cents).

domainsLimit
number
required

The domains limit of the workspace.

tagsLimit
number
required

The tags limit of the workspace.

foldersUsage
number
required

The folders usage of the workspace.

foldersLimit
number
required

The folders limit of the workspace.

usersLimit
number
required

The users limit of the workspace.

aiUsage
number
required

The AI usage of the workspace.

aiLimit
number
required

The AI limit of the workspace.

conversionEnabled
boolean
required

Whether the workspace has conversion tracking enabled automatically for new links (d.to/conversions).

Whether the workspace has claimed a free .link domain. (dub.link/free)

partnersEnabled
boolean
required

Whether the workspace has Dub Partners enabled.

createdAt
string
required

The date and time when the workspace was created.

users
object[]
required

The role of the authenticated user in the workspace.

domains
object[]
required

The domains of the workspace.

store
object | null
required

The miscellaneous key-value store of the workspace.

allowedHostnames
string[] | null
required

Specifies hostnames permitted for client-side click tracking.

flags
object

The feature flags of the workspace, indicating which features are enabled.