---
title: "Read the context of your token"
method: GET
path: "/v1/context"
tags: ["Agent"]
---

# Read the context of your token

`GET /v1/context`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/context`
- Auth: one of:
  - none
  - HTTP bearer
  - HTTP bearer
  - API key in cookie `__Host-better-auth.session_token`

Introspects the caller behind the request. Any caller can read it — a browser session, an API key, a machine credential, a Space key, a partner token, or no credential at all — and every answer carries the Spacefast agent instructions as Markdown, filtered by `scopes` and budgeted for the `consumer`. An authenticated caller also gets a `credential` block naming what kind of token it is and what it is bound to, and a user-owned interactive grant gets a `capabilities` map of the operations its scopes allow.

## Query parameters

- `scopes` union: Comma-separated (or repeated) AGENT_PROSE fragment keys.
  - string
  - string[]
- `consumer` 'cursor' | 'mcp' | 'markdown': Which client is reading, so the fragments come back shaped for it.

## 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` object, required
    - `consumer` 'cursor' | 'mcp' | 'markdown', required: Which client is reading, so the fragments come back shaped for it.
    - `scopes` string[], required: The instruction fragment keys included in `markdown`, in reading order.
    - `markdown` string, required: The Spacefast agent instructions. Identical for every caller.
    - `truncated` boolean
    - `omittedScopes` string[]
    - `credential` object: The credential behind this request and what it is bound to. Absent for an anonymous caller.
      - `kind` 'session' | 'api_key' | 'partner_token' | 'oauth_client' | 'runtime' | 'internal' | 'claim_token', required: What the caller presented, in the platform's own credential vocabulary.
      - `authorizationId` string: Stable identity of the credential itself — the API key or OAuth client row.
      - `subject` object: Whose authority the credential spends.
        - `type` 'user' | 'team' | 'external' | 'system', required
        - `id` string, required
      - `tenantId` string
      - `userId` string: The person who created the credential, when one did.
      - `ownerPrincipal` object: The principal that owns the credential. Absent on platform-owned credentials.
        - `type` 'team' | 'external', required
        - `id` string, required
      - `teams` union: The teams the credential may act in.
        - object
          - `mode` 'all', required
        - object
          - `mode` 'teams', required
          - `teamIds` string[], required
        - object
          - `mode` 'none', required
      - `grantId` string: The grant the credential spends, when it spends one.
      - `authorizationLevel` 'user' | 'team': Whether that grant carries the authorizing person's authority or their team's.
      - `expiresAt` string
    - `capabilities` object: What the calling grant may do, present only for user-owned interactive agent grants. Advisory: it never replaces a route's own authorization.
      - `enabled` boolean, required
      - `degraded` boolean, required
      - `grantId` string, required
      - `authorizationLevel` 'user', required
      - `grantedScopes` string[], required
      - `reason` string
      - `operations` object[], required
        - `operation` string, required
        - `action` string, required
        - `available` boolean, required
        - `reason` string, required
        - `acceptableScopeSets` array[], required
          - string[]
        - `missingScopes` string[], required

## 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)
