Skip to content

Get Workspace

GET/workspaces/:id

Retrieve a single workspace by its ID.

Request

js
import Confetti from 'confetti'

const confetti = new Confetti({ apiKey: 'your-key' })

const workspace = await confetti.workspaces.find(1)
sh
curl "https://api.confetti.events/workspaces/1" \
  -H "Authorization: apikey your-key"

Response

ts
interface Workspace {
  id: number
  name: string
  timeZone: string
  slug: string
  featureLevel: string
  website: string
  email: string
  createdAt: Date
  updatedAt: Date
  shareTitle: string
  shareDescription: string
  summary: string
  primaryColor: string
}
json
{
  "id": 1,
  "name": "My workspace",
  "type": "workspace"
}
json
{
  "data": {
    "id": 1,
    "type": "workspace",
    "attributes": {
      "name": "My workspace"
    }
  }
}