Skip to main content

Workspaces

List workspaces accessible to your API key. Use the returned IDs with file and conversation endpoints.

GET/v1/workspacesAny scope

Returns workspaces the key can access. Keys with no workspace restriction return all org workspaces. Keys scoped to specific workspaces return only those.

workspaces = client.workspaces.list()
for ws in workspaces:
    print(ws.id, ws.name)