# Open the client's door

Source: https://amanucci.com/nl/docs/developers/api/people/createOrganisationInvite

## POST /v1/organisations/{organisationId}/invites

Open the client's door

Invite somebody into an ORGANISATION — the client's door. Admits the organisation's own seats AND the firm it hangs under, because a firm seeds its client's FIRST owner before anybody at the client holds a seat; who may then invite whom is the use case's question (an owner invites anyone, the firm only the first owner). The body carries a client-minted uuid v7 id, the idempotency key. Role and entity scope are fixed HERE. A fresh invite's link is mailed after it commits (`inviteMailed`); a duplicate mails nothing.

Operation ID: `createOrganisationInvite`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "organisationId",
    "in": "path"
  }
]
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CreateOrganisationInvite"
      }
    }
  }
}
```

### Responses

#### 200 Duplicate-ok: this id, or an open invite for this address, already existed. No token.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/CreateInviteResult"
    }
  }
}
```

#### 201 The invite, and (on a fresh create only) its plaintext token.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/CreateInviteResult"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
