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

# Create an application session

> Creates a new application session for the specified application.



## OpenAPI

````yaml openapi-leasing.json POST /v1/application_sessions
openapi: 3.1.0
info:
  title: Yorlet Leasing API
  description: >-
    APIs for managing applications, deposits, guarantors, references, and
    tenancies.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/application_sessions:
    post:
      tags:
        - Application Sessions
      summary: Create an application session
      description: Creates a new application session for the specified application.
      operationId: application_sessions_create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                application_status:
                  type: string
                  pattern: ^[a-zA-Z0-9_]+$
                  description: >-
                    The identifier of the application status (applicant) to
                    create the session for.
                send_email:
                  type: boolean
                  description: >-
                    Whether to send an email to the applicant with the session
                    link.
              required:
                - application_status
      responses:
        '200':
          description: Returns the application session object if the creation succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - application_session
                  application:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                    description: The identifier of the application for the session.
                  application_status:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                    description: The identifier of the applicant for the session.
                  customer:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                    description: The identifier of the customer for the session.
                  mode:
                    type: string
                    enum:
                      - classic
                      - configuration
                    description: The mode of the application session.
                  status:
                    type: string
                    enum:
                      - pending
                      - complete
                      - canceled
                      - active
                      - expired
                    description: The status of the application session.
                  url:
                    type: string
                    description: The URL of the application session hosted page.
                required:
                  - id
                  - created
                  - object
                  - application
                  - application_status
                  - customer
                  - mode
                  - status
                  - url
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````