Goatlab API Docs

Get a space

GET
/v1/spaces/{spaceId}

Retrieves detailed information about a specific space, including file count.

Access Control:

Access to a space depends on your permissions and the space's visibility:

  • Private Spaces: Only accessible by the space owner
  • Public Spaces: Accessible by all users within the same tenant

You must provide valid authentication credentials (API key, tenant ID, and user ID) to access any space.

Response includes:

  • Space metadata (id, name, description, type, visibility)
  • Ownership (ownerId, tenantId) — scope prefixes are stripped for scoped API keys
  • File count (number of successfully processed files in the space)
  • Last upload timestamp (lastUpload), or null when the space has no files
  • Timestamps (createdAt, updatedAt)

Authorization

ApiTokenAuth PRODUCT, GEN_AI
x-api-key<token>

API Key with role based permission

In: header

Scope: PRODUCT, GEN_AI

Path Parameters

spaceId*string

The unique identifier of the space to retrieve

Header Parameters

x-user-id?string

The ID of the user requesting the space

x-tenant-id*string

The ID of the tenant

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/spaces/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "x-tenant-id: string"
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Product Development",
  "description": "Space for tracking product development activities",
  "type": "PROJECT",
  "visibility": "PRIVATE",
  "ownerId": "user-123",
  "tenantId": "tenant-456",
  "fileCount": 42,
  "lastUpload": "2026-01-05T14:19:29.754Z",
  "createdAt": "2025-12-30T10:30:00.000Z",
  "updatedAt": "2026-01-05T14:22:00.000Z"
}

{
  "message": "x-user-id is required"
}

{
  "message": "Invalid API Key"
}
{
  "message": "Invalid API Key"
}

{
  "message": "Space not found."
}

{
  "message": "Internal Server Error"
}