# Setup

## Get Beeper app setup state

**get** `/v1/app/setup`

Return the current Beeper Desktop or Beeper Server sign-in and encrypted messaging setup state. This endpoint is public before sign-in so apps can discover that sign-in is needed; after sign-in, pass a read token.

### Returns

- `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

  Encrypted messaging setup status.

  - `crossSigning: boolean`

    Whether this account can verify trusted devices.

  - `firstSyncDone: boolean`

    Whether the first encrypted message sync is complete.

  - `hasBackedUpRecoveryKey: boolean`

    Whether the user confirmed that they saved their recovery key.

  - `initialized: boolean`

    Whether encrypted messaging setup has started.

  - `keyBackup: boolean`

    Whether encrypted message backup is available.

  - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

    Encrypted messaging keys available on this device.

    - `masterKey: boolean`

      Whether the account identity key is available.

    - `megolmBackupKey: boolean`

      Whether the encrypted message backup key is available.

    - `recoveryKey: boolean`

      Whether a recovery key is available.

    - `selfSigningKey: boolean`

      Whether the device trust key is available.

    - `userSigningKey: boolean`

      Whether the user trust key is available.

  - `secretStorage: boolean`

    Whether secure key storage is available.

  - `verified: boolean`

    Whether this device is trusted for encrypted messages.

  - `recoveryKeyGeneratedAt: optional number`

    Unix timestamp for when the recovery key was created.

- `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

  Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

  - `"needs-login"`

  - `"initializing"`

  - `"needs-cross-signing-setup"`

  - `"needs-verification"`

  - `"needs-secrets"`

  - `"needs-first-sync"`

  - `"ready"`

- `matrix: optional object { deviceID, homeserver, userID }`

  Signed-in account details. Omitted until sign-in is complete.

  - `deviceID: string`

    Current device ID.

  - `homeserver: string`

    Beeper homeserver URL for this account.

  - `userID: string`

    Signed-in Beeper user ID.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "e2ee": {
    "crossSigning": true,
    "firstSyncDone": true,
    "hasBackedUpRecoveryKey": true,
    "initialized": true,
    "keyBackup": true,
    "secrets": {
      "masterKey": true,
      "megolmBackupKey": true,
      "recoveryKey": true,
      "selfSigningKey": true,
      "userSigningKey": true
    },
    "secretStorage": true,
    "verified": true,
    "recoveryKeyGeneratedAt": 0
  },
  "state": "needs-login",
  "matrix": {
    "deviceID": "deviceID",
    "homeserver": "homeserver",
    "userID": "userID"
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Start Beeper app setup

**post** `/v1/app/setup/start`

Start setting up Beeper Desktop or Beeper Server. The flow supports existing Beeper accounts and new account creation.

### Returns

- `setupRequestID: string`

  Setup request ID to use in the next sign-in step.

- `signInMethods: array of string`

  Available sign-in methods for this setup request.

### Example

```http
curl http://localhost:23373/v1/app/setup/start \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "setupRequestID": "setupRequestID",
  "signInMethods": [
    "string"
  ]
}
```

## Send setup sign-in code

**post** `/v1/app/setup/email`

Send a sign-in code to the user email address for app setup.

### Body Parameters

- `email: string`

  Email address to send the sign-in code to.

- `setupRequestID: string`

  Setup request ID returned by the start step.

### Example

```http
curl http://localhost:23373/v1/app/setup/email \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN" \
    -d '{
          "email": "dev@stainless.com",
          "setupRequestID": "setupRequestID"
        }'
```

## Complete setup sign-in with code

**post** `/v1/app/setup/response`

Finish setup sign-in with the code sent to the user email address. If the user needs a new account, the response includes account creation copy and username suggestions.

### Body Parameters

- `response: string`

  Sign-in code from the user email.

- `setupRequestID: string`

  Setup request ID returned by the start step.

### Returns

- `Success object { matrix, session }`

  - `matrix: object { accessToken, deviceID, homeserver, userID }`

    Account credentials for first-party app setup.

    - `accessToken: string`

      Beeper account access token. Returned once for first-party app setup.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state after sign-in.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

- `RegistrationRequired object { copy, leadToken, registrationRequired, 2 more }`

  - `copy: object { submit, terms, title, usernamePlaceholder }`

    Copy to display during account creation.

    - `submit: "Continue"`

      Submit button label.

      - `"Continue"`

    - `terms: "By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."`

      Terms and privacy notice to show before account creation.

      - `"By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."`

    - `title: "Choose your username"`

      Title for the username step.

      - `"Choose your username"`

    - `usernamePlaceholder: "Username"`

      Placeholder for the username field.

      - `"Username"`

  - `leadToken: string`

    Registration token returned by Beeper.

  - `registrationRequired: true`

    Indicates that the user needs to create a Beeper account.

    - `true`

  - `setupRequestID: string`

    Setup request ID to use when creating the account.

  - `usernameSuggestions: optional array of string`

    Suggested usernames for the new account.

### Example

```http
curl http://localhost:23373/v1/app/setup/response \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN" \
    -d '{
          "response": "response",
          "setupRequestID": "setupRequestID"
        }'
```

#### Response

```json
{
  "matrix": {
    "accessToken": "accessToken",
    "deviceID": "deviceID",
    "homeserver": "homeserver",
    "userID": "userID"
  },
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  }
}
```

## Create account for setup

**post** `/v1/app/setup/register`

Create a Beeper account after the user chooses a username and accepts the Terms of Use.

### Body Parameters

- `acceptTerms: true`

  Confirms that the user agreed to our [terms of use](https://www.beeper.com/terms-onboarding) and has read our [privacy policy](https://www.beeper.com/privacy).

  - `true`

- `leadToken: string`

  Registration token returned by Beeper.

- `setupRequestID: string`

  Setup request ID returned by the start step.

- `username: string`

  Username selected by the user.

### Returns

- `matrix: object { accessToken, deviceID, homeserver, userID }`

  Account credentials for first-party app setup.

  - `accessToken: string`

    Beeper account access token. Returned once for first-party app setup.

  - `deviceID: string`

    Current device ID.

  - `homeserver: string`

    Beeper homeserver URL for this account.

  - `userID: string`

    Signed-in Beeper user ID.

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state after sign-in.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/register \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN" \
    -d '{
          "acceptTerms": true,
          "leadToken": "leadToken",
          "setupRequestID": "setupRequestID",
          "username": "x"
        }'
```

#### Response

```json
{
  "matrix": {
    "accessToken": "accessToken",
    "deviceID": "deviceID",
    "homeserver": "homeserver",
    "userID": "userID"
  },
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  }
}
```

## Domain Types

### Setup Retrieve Response

- `SetupRetrieveResponse object { e2ee, state, matrix, verification }`

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Setup Start Response

- `SetupStartResponse object { setupRequestID, signInMethods }`

  - `setupRequestID: string`

    Setup request ID to use in the next sign-in step.

  - `signInMethods: array of string`

    Available sign-in methods for this setup request.

### Setup Response Response

- `SetupResponseResponse = object { matrix, session }  or object { copy, leadToken, registrationRequired, 2 more }`

  - `Success object { matrix, session }`

    - `matrix: object { accessToken, deviceID, homeserver, userID }`

      Account credentials for first-party app setup.

      - `accessToken: string`

        Beeper account access token. Returned once for first-party app setup.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `session: object { e2ee, state, matrix, verification }`

      Current app sign-in and encrypted messaging setup state after sign-in.

      - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

        Encrypted messaging setup status.

        - `crossSigning: boolean`

          Whether this account can verify trusted devices.

        - `firstSyncDone: boolean`

          Whether the first encrypted message sync is complete.

        - `hasBackedUpRecoveryKey: boolean`

          Whether the user confirmed that they saved their recovery key.

        - `initialized: boolean`

          Whether encrypted messaging setup has started.

        - `keyBackup: boolean`

          Whether encrypted message backup is available.

        - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

          Encrypted messaging keys available on this device.

          - `masterKey: boolean`

            Whether the account identity key is available.

          - `megolmBackupKey: boolean`

            Whether the encrypted message backup key is available.

          - `recoveryKey: boolean`

            Whether a recovery key is available.

          - `selfSigningKey: boolean`

            Whether the device trust key is available.

          - `userSigningKey: boolean`

            Whether the user trust key is available.

        - `secretStorage: boolean`

          Whether secure key storage is available.

        - `verified: boolean`

          Whether this device is trusted for encrypted messages.

        - `recoveryKeyGeneratedAt: optional number`

          Unix timestamp for when the recovery key was created.

      - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

        Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

        - `"needs-login"`

        - `"initializing"`

        - `"needs-cross-signing-setup"`

        - `"needs-verification"`

        - `"needs-secrets"`

        - `"needs-first-sync"`

        - `"ready"`

      - `matrix: optional object { deviceID, homeserver, userID }`

        Signed-in account details. Omitted until sign-in is complete.

        - `deviceID: string`

          Current device ID.

        - `homeserver: string`

          Beeper homeserver URL for this account.

        - `userID: string`

          Signed-in Beeper user ID.

      - `verification: optional object { id, availableActions, direction, 8 more }`

        Trusted device verification progress.

        - `id: string`

          Verification ID to pass in verification action paths.

        - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

          Verification actions that are valid for the current state.

          - `"accept"`

          - `"cancel"`

          - `"qr.confirmScanned"`

          - `"sas.start"`

          - `"sas.confirm"`

        - `direction: "incoming" or "outgoing"`

          Whether this device started or received the verification.

          - `"incoming"`

          - `"outgoing"`

        - `methods: array of "qr" or "sas"`

          Verification methods supported for this transaction.

          - `"qr"`

          - `"sas"`

        - `purpose: "login" or "device"`

          Why this verification exists.

          - `"login"`

          - `"device"`

        - `state: "requested" or "ready" or "sas_ready" or 4 more`

          Current trusted-device verification state.

          - `"requested"`

          - `"ready"`

          - `"sas_ready"`

          - `"qr_scanned"`

          - `"done"`

          - `"cancelled"`

          - `"error"`

        - `error: optional object { code, reason }`

          Verification error details, if verification stopped.

          - `code: string`

            Verification error code.

          - `reason: string`

            User-facing verification error message.

        - `otherDevice: optional object { id, name }`

          Other device participating in verification.

          - `id: string`

            Other device ID.

          - `name: optional string`

            Other device display name, if known.

        - `otherUserID: optional string`

          Other Beeper user participating in verification.

        - `qr: optional object { data }`

          QR verification data.

          - `data: string`

            QR code payload to display for verification.

        - `sas: optional object { emojis, decimals }`

          Emoji or number comparison data for verification.

          - `emojis: string`

            Emoji sequence to compare on both devices.

          - `decimals: optional string`

            Number sequence to compare on both devices.

  - `RegistrationRequired object { copy, leadToken, registrationRequired, 2 more }`

    - `copy: object { submit, terms, title, usernamePlaceholder }`

      Copy to display during account creation.

      - `submit: "Continue"`

        Submit button label.

        - `"Continue"`

      - `terms: "By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."`

        Terms and privacy notice to show before account creation.

        - `"By continuing, you agree to the Terms of Use and acknowledge the Privacy Policy."`

      - `title: "Choose your username"`

        Title for the username step.

        - `"Choose your username"`

      - `usernamePlaceholder: "Username"`

        Placeholder for the username field.

        - `"Username"`

    - `leadToken: string`

      Registration token returned by Beeper.

    - `registrationRequired: true`

      Indicates that the user needs to create a Beeper account.

      - `true`

    - `setupRequestID: string`

      Setup request ID to use when creating the account.

    - `usernameSuggestions: optional array of string`

      Suggested usernames for the new account.

### Setup Register Response

- `SetupRegisterResponse object { matrix, session }`

  - `matrix: object { accessToken, deviceID, homeserver, userID }`

    Account credentials for first-party app setup.

    - `accessToken: string`

      Beeper account access token. Returned once for first-party app setup.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state after sign-in.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

# Recovery Key

## Verify with recovery key

**post** `/v1/app/setup/verification/recovery-key`

Unlock encrypted messages with the user recovery key.

### Body Parameters

- `recoveryKey: string`

  Recovery key saved by the user.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verification/recovery-key \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN" \
    -d '{
          "recoveryKey": "x"
        }'
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  }
}
```

## Domain Types

### Recovery Key Verify Response

- `RecoveryKeyVerifyResponse object { session }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

# Reset

## Create new recovery key

**post** `/v1/app/setup/verification/recovery-key/reset`

Create a new recovery key when the user cannot use the existing one.

### Body Parameters

- `existingRecoveryKey: optional string`

  Existing recovery key, if the user has it.

### Returns

- `recoveryKey: string`

  New recovery key. Show it once and ask the user to save it.

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state after creating the new recovery key.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verification/recovery-key/reset \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "recoveryKey": "recoveryKey",
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  }
}
```

## Confirm new recovery key

**post** `/v1/app/setup/verification/recovery-key/reset/confirm`

Confirm that the new recovery key should be used for this account.

### Body Parameters

- `recoveryKey: string`

  New recovery key returned by the reset step.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verification/recovery-key/reset/confirm \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN" \
    -d '{
          "recoveryKey": "x"
        }'
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  }
}
```

## Domain Types

### Reset Create Response

- `ResetCreateResponse object { recoveryKey, session }`

  - `recoveryKey: string`

    New recovery key. Show it once and ask the user to save it.

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state after creating the new recovery key.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

### Reset Confirm Response

- `ResetConfirmResponse object { session }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

# Verifications

## List active verifications

**get** `/v1/app/setup/verifications`

List pending and active device verifications. Use this to recover state without a WebSocket connection.

### Returns

- `items: array of object { id, availableActions, direction, 8 more }`

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  ]
}
```

## Start device verification

**post** `/v1/app/setup/verifications`

Start verifying this device from another signed-in device.

### Body Parameters

- `purpose: optional "login" or "device"`

  Why this verification is being started.

  - `"login"`

  - `"device"`

- `userID: optional string`

  Beeper user ID to verify. Defaults to the signed-in user.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Get verification

**get** `/v1/app/setup/verifications/{verificationID}`

Get the current state of a device verification transaction.

### Path Parameters

- `verificationID: string`

  Verification ID.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications/$VERIFICATION_ID \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Accept device verification

**post** `/v1/app/setup/verifications/{verificationID}/accept`

Accept an incoming device verification request.

### Path Parameters

- `verificationID: string`

  Verification ID.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications/$VERIFICATION_ID/accept \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Cancel device verification

**post** `/v1/app/setup/verifications/{verificationID}/cancel`

Cancel an active device verification request.

### Path Parameters

- `verificationID: string`

  Verification ID.

### Body Parameters

- `code: optional string`

  Optional cancellation code.

- `reason: optional string`

  Optional user-facing cancellation reason.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications/$VERIFICATION_ID/cancel \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Domain Types

### Verification List Response

- `VerificationListResponse object { items }`

  - `items: array of object { id, availableActions, direction, 8 more }`

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Verification Create Response

- `VerificationCreateResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Verification Retrieve Response

- `VerificationRetrieveResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Verification Accept Response

- `VerificationAcceptResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### Verification Cancel Response

- `VerificationCancelResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

# QR

## Scan verification QR code

**post** `/v1/app/setup/verifications/qr/scan`

Submit the QR code scanned from another signed-in device.

### Body Parameters

- `data: string`

  QR code payload scanned from the other device.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications/qr/scan \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN" \
    -d '{
          "data": "x"
        }'
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Confirm QR code scan

**post** `/v1/app/setup/verifications/{verificationID}/qr/confirm-scanned`

Confirm that another device scanned this device QR code.

### Path Parameters

- `verificationID: string`

  Verification ID.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications/$VERIFICATION_ID/qr/confirm-scanned \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Domain Types

### QR Scan Response

- `QRScanResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### QR Confirm Scanned Response

- `QRConfirmScannedResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

# SAS

## Start emoji verification

**post** `/v1/app/setup/verifications/{verificationID}/sas/start`

Start emoji comparison for device verification.

### Path Parameters

- `verificationID: string`

  Verification ID.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications/$VERIFICATION_ID/sas/start \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Confirm emoji verification

**post** `/v1/app/setup/verifications/{verificationID}/sas/confirm`

Confirm that the emoji or number sequence matches on both devices.

### Path Parameters

- `verificationID: string`

  Verification ID.

### Returns

- `session: object { e2ee, state, matrix, verification }`

  Current app sign-in and encrypted messaging setup state.

  - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

    Encrypted messaging setup status.

    - `crossSigning: boolean`

      Whether this account can verify trusted devices.

    - `firstSyncDone: boolean`

      Whether the first encrypted message sync is complete.

    - `hasBackedUpRecoveryKey: boolean`

      Whether the user confirmed that they saved their recovery key.

    - `initialized: boolean`

      Whether encrypted messaging setup has started.

    - `keyBackup: boolean`

      Whether encrypted message backup is available.

    - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

      Encrypted messaging keys available on this device.

      - `masterKey: boolean`

        Whether the account identity key is available.

      - `megolmBackupKey: boolean`

        Whether the encrypted message backup key is available.

      - `recoveryKey: boolean`

        Whether a recovery key is available.

      - `selfSigningKey: boolean`

        Whether the device trust key is available.

      - `userSigningKey: boolean`

        Whether the user trust key is available.

    - `secretStorage: boolean`

      Whether secure key storage is available.

    - `verified: boolean`

      Whether this device is trusted for encrypted messages.

    - `recoveryKeyGeneratedAt: optional number`

      Unix timestamp for when the recovery key was created.

  - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

    Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

    - `"needs-login"`

    - `"initializing"`

    - `"needs-cross-signing-setup"`

    - `"needs-verification"`

    - `"needs-secrets"`

    - `"needs-first-sync"`

    - `"ready"`

  - `matrix: optional object { deviceID, homeserver, userID }`

    Signed-in account details. Omitted until sign-in is complete.

    - `deviceID: string`

      Current device ID.

    - `homeserver: string`

      Beeper homeserver URL for this account.

    - `userID: string`

      Signed-in Beeper user ID.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

- `verification: optional object { id, availableActions, direction, 8 more }`

  Trusted device verification progress.

  - `id: string`

    Verification ID to pass in verification action paths.

  - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

    Verification actions that are valid for the current state.

    - `"accept"`

    - `"cancel"`

    - `"qr.confirmScanned"`

    - `"sas.start"`

    - `"sas.confirm"`

  - `direction: "incoming" or "outgoing"`

    Whether this device started or received the verification.

    - `"incoming"`

    - `"outgoing"`

  - `methods: array of "qr" or "sas"`

    Verification methods supported for this transaction.

    - `"qr"`

    - `"sas"`

  - `purpose: "login" or "device"`

    Why this verification exists.

    - `"login"`

    - `"device"`

  - `state: "requested" or "ready" or "sas_ready" or 4 more`

    Current trusted-device verification state.

    - `"requested"`

    - `"ready"`

    - `"sas_ready"`

    - `"qr_scanned"`

    - `"done"`

    - `"cancelled"`

    - `"error"`

  - `error: optional object { code, reason }`

    Verification error details, if verification stopped.

    - `code: string`

      Verification error code.

    - `reason: string`

      User-facing verification error message.

  - `otherDevice: optional object { id, name }`

    Other device participating in verification.

    - `id: string`

      Other device ID.

    - `name: optional string`

      Other device display name, if known.

  - `otherUserID: optional string`

    Other Beeper user participating in verification.

  - `qr: optional object { data }`

    QR verification data.

    - `data: string`

      QR code payload to display for verification.

  - `sas: optional object { emojis, decimals }`

    Emoji or number comparison data for verification.

    - `emojis: string`

      Emoji sequence to compare on both devices.

    - `decimals: optional string`

      Number sequence to compare on both devices.

### Example

```http
curl http://localhost:23373/v1/app/setup/verifications/$VERIFICATION_ID/sas/confirm \
    -X POST \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "session": {
    "e2ee": {
      "crossSigning": true,
      "firstSyncDone": true,
      "hasBackedUpRecoveryKey": true,
      "initialized": true,
      "keyBackup": true,
      "secrets": {
        "masterKey": true,
        "megolmBackupKey": true,
        "recoveryKey": true,
        "selfSigningKey": true,
        "userSigningKey": true
      },
      "secretStorage": true,
      "verified": true,
      "recoveryKeyGeneratedAt": 0
    },
    "state": "needs-login",
    "matrix": {
      "deviceID": "deviceID",
      "homeserver": "homeserver",
      "userID": "userID"
    },
    "verification": {
      "id": "id",
      "availableActions": [
        "accept"
      ],
      "direction": "incoming",
      "methods": [
        "qr"
      ],
      "purpose": "login",
      "state": "requested",
      "error": {
        "code": "code",
        "reason": "reason"
      },
      "otherDevice": {
        "id": "id",
        "name": "name"
      },
      "otherUserID": "otherUserID",
      "qr": {
        "data": "data"
      },
      "sas": {
        "emojis": "emojis",
        "decimals": "decimals"
      }
    }
  },
  "verification": {
    "id": "id",
    "availableActions": [
      "accept"
    ],
    "direction": "incoming",
    "methods": [
      "qr"
    ],
    "purpose": "login",
    "state": "requested",
    "error": {
      "code": "code",
      "reason": "reason"
    },
    "otherDevice": {
      "id": "id",
      "name": "name"
    },
    "otherUserID": "otherUserID",
    "qr": {
      "data": "data"
    },
    "sas": {
      "emojis": "emojis",
      "decimals": "decimals"
    }
  }
}
```

## Domain Types

### SAS Start Response

- `SASStartResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.

### SAS Confirm Response

- `SASConfirmResponse object { session, verification }`

  - `session: object { e2ee, state, matrix, verification }`

    Current app sign-in and encrypted messaging setup state.

    - `e2ee: object { crossSigning, firstSyncDone, hasBackedUpRecoveryKey, 6 more }`

      Encrypted messaging setup status.

      - `crossSigning: boolean`

        Whether this account can verify trusted devices.

      - `firstSyncDone: boolean`

        Whether the first encrypted message sync is complete.

      - `hasBackedUpRecoveryKey: boolean`

        Whether the user confirmed that they saved their recovery key.

      - `initialized: boolean`

        Whether encrypted messaging setup has started.

      - `keyBackup: boolean`

        Whether encrypted message backup is available.

      - `secrets: object { masterKey, megolmBackupKey, recoveryKey, 2 more }`

        Encrypted messaging keys available on this device.

        - `masterKey: boolean`

          Whether the account identity key is available.

        - `megolmBackupKey: boolean`

          Whether the encrypted message backup key is available.

        - `recoveryKey: boolean`

          Whether a recovery key is available.

        - `selfSigningKey: boolean`

          Whether the device trust key is available.

        - `userSigningKey: boolean`

          Whether the user trust key is available.

      - `secretStorage: boolean`

        Whether secure key storage is available.

      - `verified: boolean`

        Whether this device is trusted for encrypted messages.

      - `recoveryKeyGeneratedAt: optional number`

        Unix timestamp for when the recovery key was created.

    - `state: "needs-login" or "initializing" or "needs-cross-signing-setup" or 4 more`

      Current sign-in and encrypted messaging setup state for Beeper Desktop or Beeper Server.

      - `"needs-login"`

      - `"initializing"`

      - `"needs-cross-signing-setup"`

      - `"needs-verification"`

      - `"needs-secrets"`

      - `"needs-first-sync"`

      - `"ready"`

    - `matrix: optional object { deviceID, homeserver, userID }`

      Signed-in account details. Omitted until sign-in is complete.

      - `deviceID: string`

        Current device ID.

      - `homeserver: string`

        Beeper homeserver URL for this account.

      - `userID: string`

        Signed-in Beeper user ID.

    - `verification: optional object { id, availableActions, direction, 8 more }`

      Trusted device verification progress.

      - `id: string`

        Verification ID to pass in verification action paths.

      - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

        Verification actions that are valid for the current state.

        - `"accept"`

        - `"cancel"`

        - `"qr.confirmScanned"`

        - `"sas.start"`

        - `"sas.confirm"`

      - `direction: "incoming" or "outgoing"`

        Whether this device started or received the verification.

        - `"incoming"`

        - `"outgoing"`

      - `methods: array of "qr" or "sas"`

        Verification methods supported for this transaction.

        - `"qr"`

        - `"sas"`

      - `purpose: "login" or "device"`

        Why this verification exists.

        - `"login"`

        - `"device"`

      - `state: "requested" or "ready" or "sas_ready" or 4 more`

        Current trusted-device verification state.

        - `"requested"`

        - `"ready"`

        - `"sas_ready"`

        - `"qr_scanned"`

        - `"done"`

        - `"cancelled"`

        - `"error"`

      - `error: optional object { code, reason }`

        Verification error details, if verification stopped.

        - `code: string`

          Verification error code.

        - `reason: string`

          User-facing verification error message.

      - `otherDevice: optional object { id, name }`

        Other device participating in verification.

        - `id: string`

          Other device ID.

        - `name: optional string`

          Other device display name, if known.

      - `otherUserID: optional string`

        Other Beeper user participating in verification.

      - `qr: optional object { data }`

        QR verification data.

        - `data: string`

          QR code payload to display for verification.

      - `sas: optional object { emojis, decimals }`

        Emoji or number comparison data for verification.

        - `emojis: string`

          Emoji sequence to compare on both devices.

        - `decimals: optional string`

          Number sequence to compare on both devices.

  - `verification: optional object { id, availableActions, direction, 8 more }`

    Trusted device verification progress.

    - `id: string`

      Verification ID to pass in verification action paths.

    - `availableActions: array of "accept" or "cancel" or "qr.confirmScanned" or 2 more`

      Verification actions that are valid for the current state.

      - `"accept"`

      - `"cancel"`

      - `"qr.confirmScanned"`

      - `"sas.start"`

      - `"sas.confirm"`

    - `direction: "incoming" or "outgoing"`

      Whether this device started or received the verification.

      - `"incoming"`

      - `"outgoing"`

    - `methods: array of "qr" or "sas"`

      Verification methods supported for this transaction.

      - `"qr"`

      - `"sas"`

    - `purpose: "login" or "device"`

      Why this verification exists.

      - `"login"`

      - `"device"`

    - `state: "requested" or "ready" or "sas_ready" or 4 more`

      Current trusted-device verification state.

      - `"requested"`

      - `"ready"`

      - `"sas_ready"`

      - `"qr_scanned"`

      - `"done"`

      - `"cancelled"`

      - `"error"`

    - `error: optional object { code, reason }`

      Verification error details, if verification stopped.

      - `code: string`

        Verification error code.

      - `reason: string`

        User-facing verification error message.

    - `otherDevice: optional object { id, name }`

      Other device participating in verification.

      - `id: string`

        Other device ID.

      - `name: optional string`

        Other device display name, if known.

    - `otherUserID: optional string`

      Other Beeper user participating in verification.

    - `qr: optional object { data }`

      QR verification data.

      - `data: string`

        QR code payload to display for verification.

    - `sas: optional object { emojis, decimals }`

      Emoji or number comparison data for verification.

      - `emojis: string`

        Emoji sequence to compare on both devices.

      - `decimals: optional string`

        Number sequence to compare on both devices.
