---
title: "Invite someone to an app"
method: POST
path: "/apps/{id}/users"
tags: ["Apps"]
---

# Invite someone to an app

`POST /apps/{id}/users`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/apps/{id}/users`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `sites:write`)

Lets this person sign in to the app with the given role, and emails them a sign-in link (unless send_email is false). The app needs auth (deploy_app with auth). With signup invite (the default) only invited people can sign in. Invitations with an email are limited per app to 20 per hour and 100 per day, and the same address once per 10 minutes (429 with Retry-After).

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `email` string, email, required: Their email address.
  - `name` string: Their name, shown to the app.
  - `role` string: One of the app's roles. Defaults to default_role.
  - `send_email` boolean: Send them a sign-in link now (default true).

## Response `201`

Invited.

- object: Someone who may sign in to the app.
  - `id` string, uuid, required: The person's id: sub in x-hypamoon-user.
  - `email` string, required
  - `name` string, nullable, required
  - `role` string, required
  - `created_at` string, required
  - `last_sign_in_at` string, nullable, required

## Other responses

- `400`: Bad Request: invalid_json.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `409`: Conflict: conflict.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
