{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argyle9a25/json-schema/argyle9a25-client-session-create-request-schema.json",
  "title": "ClientSessionCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argyle9a25-sessions-api-openapi.yml#/components/schemas/ClientSessionCreateRequest",
  "oneOf": [
    {
      "$ref": "#/$defs/ClientEmbeddedSessionCreateRequest"
    },
    {
      "$ref": "#/$defs/ClientInviteSessionCreateRequest"
    }
  ],
  "$defs": {
    "ClientEmbeddedSessionCreateRequest": {
      "title": "Embedded",
      "type": "object",
      "properties": {
        "verification": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the verification used to initialize the session."
        },
        "type": {
          "type": "string",
          "enum": [
            "embedded"
          ],
          "default": "embedded",
          "description": "Session type. Defaults to `embedded` when omitted."
        },
        "configuration": {
          "$ref": "#/$defs/ClientSessionCreateConfiguration"
        }
      },
      "required": [
        "verification"
      ]
    },
    "ClientInviteSessionCreateConfiguration": {
      "type": "object",
      "properties": {
        "flow_id": {
          "type": "string",
          "description": "Flow ID for the invite experience. For Mortgage accounts, users with `external_metadata.broker` use wholesale flows; users without broker details use retail flows.\n\nIf omitted, the matching default is used. A provided flow takes precedence only if it matches the wholesale or retail experience; otherwise, the matching default is used. See [Wholesale Mortgage](/verifications/wholesale-mortgage#choose-the-invite-flow).\n"
        },
        "items": {
          "type": "array",
          "description": "Limits Link to the provided Items.",
          "items": {
            "type": "string"
          }
        },
        "reply_to": {
          "type": "string",
          "format": "email",
          "description": "Reply-To address for the invite email."
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "Invite recipient email address.\n\n**Note:** Required if `phone_number` is omitted.\n"
        },
        "phone_number": {
          "type": "string",
          "description": "Invite recipient phone number.\n\n**Note:** Required if `email` is omitted.\n"
        }
      }
    },
    "ClientInviteSessionCreateRequest": {
      "title": "Invites",
      "type": "object",
      "properties": {
        "user": {
          "type": "string",
          "format": "uuid",
          "description": "User ID.\n\n**Note:** The user must have `first_name` and `last_name`.\n"
        },
        "type": {
          "type": "string",
          "enum": [
            "invite"
          ],
          "description": "Session type."
        },
        "configuration": {
          "$ref": "#/$defs/ClientInviteSessionCreateConfiguration"
        }
      },
      "required": [
        "user",
        "type",
        "configuration"
      ]
    },
    "ClientSessionCreateConfiguration": {
      "type": "object",
      "description": "Connection session configuration for payroll and banking verifications.",
      "properties": {
        "experience": {
          "type": "string",
          "format": "uuid",
          "description": "Banking only. Optional bank connection experience customization ID."
        },
        "single_use_url": {
          "type": "boolean",
          "description": "Banking only. If `true`, the session link expires after one successful connection."
        },
        "redirect_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Payroll and banking. Optional redirect URL after session completion. Hosted/direct-launch flows should always set this. On desktop browsers, use a regular `https://` URL. For mobile app flows, use a custom scheme such as `your-custom-scheme://return-to-app`, or a Universal Link on iOS / App Link on Android. Universal Links and App Links are the more modern approach. You can include an application-owned state or nonce value to match the returning browser session to an internal user, session, or verification. Argyle appends `user_submission_complete` and `user_attempted_employer_selection`, which mirror the [`onClose`](/link/reference/callbacks#onclose) fields."
        },
        "flow_id": {
          "type": "string",
          "description": "Payroll only. Optional payroll embedded connection experience customization ID."
        },
        "items": {
          "type": "array",
          "description": "Payroll only. Limits Link to the provided Items. If one Item is provided, Link skips search and opens that Item's login screen. If multiple Items are provided, Link shows only those Items.",
          "items": {
            "type": "string"
          }
        },
        "language": {
          "type": "string",
          "enum": [
            "EN",
            "ES",
            "RU",
            "ZH"
          ],
          "description": "Payroll only. Supported Link [display language](/link/initialization/overview#optional-initialization-parameters)."
        },
        "mobile_app": {
          "type": "boolean",
          "description": "Payroll only. Set to `true` when the session is used in a mobile app, including Hosted Link opened in a secure browser context."
        }
      }
    }
  }
}