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

# Create Application



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/gizmo-sdk/openapi.documented.yml post /applications
openapi: 3.1.0
info:
  title: Gizmo
  description: Gizmo REST API
  version: 1.0.0
servers:
  - url: https://core.usegizmo.com/v1
    description: Gizmo Production API
security:
  - bearerAuth: []
paths:
  /applications:
    post:
      tags:
        - Application
      summary: Create Application
      operationId: createApplication
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                primaryBorrowerFirstName:
                  type: string
                primaryBorrowerLastName:
                  type: string
                primaryBorrowerEmail:
                  type: string
                primaryBorrowerPhone:
                  type: string
                primaryBorrowerDateOfBirth:
                  type: string
                primaryBorrowerSsn:
                  type: string
                subjectPropertyState:
                  $ref: '#/components/schemas/State'
                subjectPropertyStreetAddress:
                  type: string
                subjectPropertyCity:
                  type: string
                subjectPropertyZip:
                  type: string
                loanPurpose:
                  $ref: '#/components/schemas/LoanPurpose'
                losId:
                  type: string
                crmId:
                  type: string
                leadProviderSlug:
                  type: string
                teamId:
                  type: string
              required:
                - primaryBorrowerFirstName
                - primaryBorrowerLastName
                - primaryBorrowerEmail
                - primaryBorrowerPhone
                - subjectPropertyState
                - leadProviderSlug
      responses:
        '200':
          description: The created Application ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 32
                    maxLength: 32
                required:
                  - id
        '400':
          description: Error creating Application
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  kind:
                    type: string
                    const: RateLimited
                  name:
                    type: string
                  retryAfter:
                    type: number
                required:
                  - kind
                  - name
                  - retryAfter
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Gizmo from '@gizmo-os/sdk';

            const client = new Gizmo({
              apiKey: process.env['GIZMO_API_KEY'], // This is the default and can be omitted
            });

            const application = await client.applications.create({
              leadProviderSlug: 'leadProviderSlug',
              primaryBorrowerEmail: 'primaryBorrowerEmail',
              primaryBorrowerFirstName: 'primaryBorrowerFirstName',
              primaryBorrowerLastName: 'primaryBorrowerLastName',
              primaryBorrowerPhone: 'primaryBorrowerPhone',
              subjectPropertyState: 'al',
            });

            console.log(application.id);
        - lang: Python
          source: |-
            import os
            from gizmo_sdk import Gizmo

            client = Gizmo(
                api_key=os.environ.get("GIZMO_API_KEY"),  # This is the default and can be omitted
            )
            application = client.applications.create(
                lead_provider_slug="leadProviderSlug",
                primary_borrower_email="primaryBorrowerEmail",
                primary_borrower_first_name="primaryBorrowerFirstName",
                primary_borrower_last_name="primaryBorrowerLastName",
                primary_borrower_phone="primaryBorrowerPhone",
                subject_property_state="al",
            )
            print(application.id)
components:
  schemas:
    State:
      type: string
      enum:
        - al
        - ak
        - az
        - ar
        - ca
        - co
        - ct
        - de
        - dc
        - fl
        - ga
        - hi
        - id
        - il
        - in
        - ia
        - ks
        - ky
        - la
        - me
        - md
        - ma
        - mi
        - mn
        - ms
        - mo
        - mt
        - ne
        - nv
        - nh
        - nj
        - nm
        - ny
        - nc
        - nd
        - oh
        - ok
        - or
        - pa
        - ri
        - sc
        - sd
        - tn
        - tx
        - ut
        - vt
        - va
        - wa
        - wv
        - wi
        - wy
      description: The two-letter state abbreviation in lowercase
    LoanPurpose:
      type: string
      enum:
        - purchase
        - refi
        - refiCashOut
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            data: {}
          required:
            - message
      required:
        - error
      description: Error response object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````