---
title: "Invites"
description: "The invites endpoints of the HTTP API."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Invites

## GET /invites

List the pending invites, newest first.

Only Admins can call this endpoint, and an Admin service-account key can too. An invite stays pending until someone signs in with its email verified by the identity provider.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | `integer` | Between 1 and 500. Default `100`. |
| `cursor` | query | `string` |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | One page of pending invites. | [`InviteList`](/docs/reference/api/schemas/#invitelist) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /invites

Invite an email with the role it gets at its first sign-in.

Only Admins can call this endpoint, and an Admin service-account key can too. No email is sent: share the returned sign_in_url with the person. The role applies at the first sign-in of that email, only when the identity provider says the email is verified, and it then shows as set by the Admin who invited. An invite lets no one in that the sign-in rules would refuse; admin emails and identity-provider group roles still win over it. Inviting an email that already has a pending invite changes its role and answers 200.

### Request body

`application/json`, required.

A [`CreateInviteRequest`](/docs/reference/api/schemas/#createinviterequest) object.

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The pending invite for this email, with the new role. | [`Invite`](/docs/reference/api/schemas/#invite) |
| `201` | The invite is created. | [`Invite`](/docs/reference/api/schemas/#invite) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | Someone with this email has already signed in (`already_member`); change their role instead. | [`Error`](/docs/reference/api/schemas/#error) |
| `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) |
| `422` | The email's domain is not in `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` (`email_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## DELETE /invites/{id}

Withdraw a pending invite.

Only Admins can call this endpoint, and an Admin service-account key can too. The email can still sign in when the sign-in rules allow it, with the role those rules give.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `204` | The invite is withdrawn. |   |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
