---
title: "List a space's variables"
method: GET
path: "/v1/spaces/{spaceId}/variables"
tags: ["Variables"]
---

# List a space's variables

`GET /v1/spaces/{spaceId}/variables`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/spaces/{spaceId}/variables`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `spaces:read`)

Returns the variables visible to this space, including inherited team values. Secret values are never returned.

## Path parameters

- `spaceId` string, required

## Query parameters

- `limit` integer: Page size.
- `cursor` string: Opaque cursor from the previous page's `nextCursor`.

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` union[], required
    - union
      - object
        - `name` string, required: Variable name, referenced as {{ vars.NAME }} in templates.
        - `scope` 'space' | 'principal', required: Where the variable is defined; space wins over principal.
        - `secret` boolean, required: Secret values are write-only and never returned after creation.
        - `value` string: Variable value; omitted when secret=true.
        - `channelValues` object: Per-channel overrides compiled into channel template variants; omitted for secrets.
        - `createdAt` string, date-time, required: Instant when the variable was created.
        - `updatedAt` string, date-time, required: Instant when the value was last written.
      - object
        - `name` string, required
        - `value` string, required
        - `scope` 'system', required: Platform-provided, read-only variable.
  - `pagination` object, required
    - `nextCursor` string, nullable, required: Opaque cursor for the next page; null when there are no more results.
    - `hasMore` boolean, required: Whether another page exists after this one.

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
