---
title: "Get a plan code"
method: GET
path: "/v1/plan-codes/{code}"
tags: ["Teams"]
---

# Get a plan code

`GET /v1/plan-codes/{code}`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/plan-codes/{code}`
- Auth: HTTP bearer

Returns the plan a redeem code grants, how long the plan lasts, whether the code can still be redeemed, and which of your teams can receive it.

## Path parameters

- `code` string, required: The redeem code from the link.

## 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
    - `code` string, required: The redeem code, as issued.
    - `planCode` 'free' | 'go' | 'plus' | 'gold' | 'enterprise' | 'internal', required: Plan code.
    - `planName` string, required: Display name of the plan the code grants.
    - `grantDurationDays` integer, nullable, required: How long the resulting plan lasts, in days. Null means it never expires.
    - `status` 'redeemable' | 'expired' | 'disabled' | 'exhausted', required: Whether the code can be redeemed right now, and if not, why.
    - `redeemedByCaller` boolean, required: Whether the caller already redeemed this code (each person redeems once).
    - `teams` object[], required: The caller's teams and whether the code can be redeemed for each.
      - `id` string, required: Team id.
      - `slug` string, required: Team slug.
      - `name` string, required: Team display name.
      - `eligibility` 'eligible' | 'already_on_plan' | 'not_permitted' | 'already_redeemed', required: eligible: the caller can redeem for this team. already_on_plan: the team already holds an active grant for this plan. not_permitted: the caller cannot manage billing for this team. already_redeemed: this code was already redeemed for this team.

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