---
title: "Redeem a plan code"
method: POST
path: "/v1/plan-codes/{code}/redeem"
tags: ["Teams"]
---

# Redeem a plan code

`POST /v1/plan-codes/{code}/redeem`

## Request

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

Puts a team on the plan the code grants. You must be able to manage the team's billing. Each person redeems a code once, and each team receives it once.

## Path parameters

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

## Request body

- object
  - `teamId` string, required: Team to put on the plan (id or slug).

## 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
    - `teamId` string, required: Team the code was redeemed for.
    - `teamSlug` string, required: Slug of that team.
    - `planCode` 'free' | 'go' | 'plus' | 'gold' | 'enterprise' | 'internal', required: Plan code.
    - `planName` string, required: Display name of the granted plan.
    - `grantId` string, required: Plan grant the redemption created.
    - `expiresAt` string, date-time, nullable, required: When the granted plan ends. Null means it never expires.

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