---
title: "Invite a person to the workspace"
description: "Other routes API"
---

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

# Invite a person to the workspace

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="post">POST</span>
<code class="cvo-op-path-code">/v1/team/invitations</code>
</div>
</div>

For a new address: makes a login at the identity provider, adds the person to this workspace with the role and access, and has the identity provider mail them an invitation to set up their sign-in, in one step. When anything fails after the login was made, it is removed again and nothing is stored.

For an address that already has a Certinvo login: stores a pending invitation and mails a notice. Nothing is reachable until that person, signed in as themselves, accepts it with `POST /v1/session/invitations/{id}/accept`. The answer is the same as for a new address. A notice that could not be sent leaves the invitation pending; Team lists it, and it can be resent or revoked.

Only an owner or an admin of the workspace can invite, and only an owner can invite an owner. Only a signed-in person can invite. An API key is refused with 401 `session_required`.

## Request body

`application/json`, required

## Response

A `201` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `201` | The new person is on the workspace and the identity provider's invitation was sent, or an existing login was invited and must accept. |
| `400` | The body is not `{"email", "role", "access", "companies"}` with an email address, one of the five roles, and at least one company for selected access (`invalid_invitation`); or a company is not one of this workspace (`unknown_company`). Nothing was done. |
| `401` | No usable credential was sent (`invalid_credentials`), or an API key was used (`session_required`). |
| `403` | The person is not an owner or an admin of this workspace, an admin tried to invite an owner, or an admin with selected access gave access beyond their own companies (`role_required`). Nothing was done. |
| `409` | The person is already a member of this workspace (`already_member`), so their access is changed in Team instead; this workspace already has a pending invitation to the address (`already_invited`); or the address belongs to a login at the identity provider that Certinvo does not know (`email_taken`). Nothing was done. |
| `501` | This deployment has no database (`no_database`). Sending the same request again will not help. |
| `502` | The identity provider refused or could not be reached (`invitation_not_sent`). Nothing was stored. |
| `503` | This deployment has no identity provider token (`invitations_not_configured`). |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/other/invite-a-person-to-the-workspace/index.mdx
