---
title: "Exchange an invite code for the invited user's MCP token"
method: POST
path: "/api/invites/exchange"
tags: ["Users"]
---

# Exchange an invite code for the invited user's MCP token

`POST /api/invites/exchange`

## Request

- Base URL: `http://localhost:3013`
- URL: `http://localhost:3013/api/invites/exchange`
- Auth: none declared

Unauthenticated: the single-use invite code is the credential. Rate limited per IP. Activates the invited user. Unknown, expired, used and connector codes, and codes for users who are no longer invited, all return 404 code_invalid.

## Request body

- object
  - `code` string, required

## Response `200`

Minted MCP token for the invited user

- object
  - `token` string, required
  - `userId` string, required

## Other responses

- `404`: Code unknown, malformed, expired, already used or not an invite
- `413`: Request body too large
- `429`: Rate limited

## Changes

- **2026-10-27** `b6cfdb1f4830`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/invites/exchange/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) - [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/revisions/7e4c7198192a?raw)
