---
title: "Generate Invitation Code"
method: POST
path: "/api/v1/users/{user_id}/invitation-code"
tags: ["External: Mobile SDK"]
---

# Generate Invitation Code

`POST /api/v1/users/{user_id}/invitation-code`

Generate a single-use invitation code for standalone SDK onboarding.

Issues a single-use code that a mobile app can redeem (via
`POST /api/v1/invitation-code/redeem`) to receive SDK access and refresh
tokens - without your backend having to mint and forward a token itself.
Any previously generated codes for this user are marked as expired.

This is a convenience mechanism for apps with no backend of their own (for
example the Open Wearables app or quick manual testing). It is not the
standard integration path: if your app authenticates users against your own
backend, mint a token directly with `POST /api/v1/users/{user_id}/token`
instead.

Requires developer authentication.

## Path parameters

- `user_id` string, uuid, required

## Response `201`

Successful Response

- UserInvitationCodeRead — Response schema after generating an invitation code.
  - `id` string, uuid, required
  - `code` string, required
  - `user_id` string, uuid, required
  - `expires_at` string, date-time, required
  - `created_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/openwearables/apis/open-wearables-api.md) · [All operations](https://skmtc.net/openwearables/apis/open-wearables-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openwearables/open-wearables-api/revisions/8c15cc93d210/schema)
