# Walk through the door

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

## POST /v1/invites/accept

Walk through the door

Consume an invite and sign in — PUBLIC, because the token IS the credential. Always 201 on a committed accept, with the outcome discriminant in the body: `sessionMintFailed` means the invite is consumed and the account is real and only the cookie is missing, so the recovery is a plain sign-in and never a second click. An operator in operator mode is 403 `operator-read-only`: an accept would append a seat in a tenant.

Operation ID: `acceptInvite`

### Request body

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

### Responses

#### 201 The accept committed. `Set-Cookie` carries the session on the `sessionMinted` arm.

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

#### 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"
    }
  }
}
```

#### 409 The world is not in the state the request assumed: a stale `expectedSeq`, or a transition already made.

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

#### 410 A door that existed and is permanently closed (an expired or revoked invite).

```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"
    }
  }
}
```
