Skip to main content
GET
/
api
/
v1
/
workspaces
/
{id}
Get Workspace
curl --request GET \
  --url https://app.tokencraft.dev/api/v1/api/v1/workspaces/{id} \
  --header 'Authorization: Bearer <token>'

Get Workspace

Retrieves detailed information about a specific workspace.

Endpoint

GET /api/v1/workspaces/{id}

Authentication

Requires a valid API token in the Authorization header.

Request

Headers

HeaderValueRequired
AuthorizationBearer tokenYes

Path Parameters

ParameterTypeRequiredDescription
idstringYesWorkspace ID

Response

Success Response

Status: 200 OK
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Design System",
  "description": "Main product design system",
  "user_id": "user-123",
  "created_at": "2025-01-15T10:00:00Z",
  "updated_at": "2025-01-15T10:00:00Z"
}

Response Fields

FieldTypeDescription
idstringUnique workspace identifier
namestringWorkspace name
descriptionstring|nullOptional description
user_idstringOwner’s user ID
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Examples

curl -H "Authorization: Bearer dtk_your_token_here" \
  https://app.tokencraft.dev/api/v1/workspaces/550e8400-e29b-41d4-a716-446655440000

Error Responses

401 Unauthorized

{
  "error": "Invalid API token"
}

404 Not Found

{
  "error": "Workspace not found"
}
Causes:
  • Workspace ID doesn’t exist
  • Workspace belongs to a different user
  • Invalid ID format

500 Internal Server Error

{
  "error": "Internal server error"
}

Next Steps