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

# Submit a consumer identity for verification

> Submits an identity you collected from a consumer for KYC verification. Verification runs asynchronously: the request is accepted with a `202` and a submission id — poll `GET /identity_submissions/{submission_id}` or subscribe to the `OnboardingSession.completed` webhook for the outcome and the resulting `principal_ref`. Submissions are idempotent per `idempotency_key`: resubmitting the same key returns the original submission instead of starting a new verification.



## OpenAPI

````yaml /api-reference/openapi.json post /identity_submissions/consumer
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /identity_submissions/consumer:
    post:
      tags:
        - Identities
      summary: Submit a consumer identity for verification
      description: >-
        Submits an identity you collected from a consumer for KYC verification.
        Verification runs asynchronously: the request is accepted with a `202`
        and a submission id — poll `GET /identity_submissions/{submission_id}`
        or subscribe to the `OnboardingSession.completed` webhook for the
        outcome and the resulting `principal_ref`. Submissions are idempotent
        per `idempotency_key`: resubmitting the same key returns the original
        submission instead of starting a new verification.
      operationId: submit_consumer_identity
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1.ConsumerIdentitySubmissionRequest'
          application/vnd.baselayer.v1+json:
            schema:
              $ref: '#/components/schemas/v1.ConsumerIdentitySubmissionRequest'
        required: true
      responses:
        '202':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.IdentitySubmissionResponse'
            application/vnd.baselayer.v1+json:
              schema:
                $ref: '#/components/schemas/v1.IdentitySubmissionResponse'
        '409':
          description: >-
            A submission with this idempotency_key already exists but could not
            be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
                title: IdentitySubmissionConflict
                description: A submission with this idempotency key already exists.
                examples:
                  - code: 6201
                    message: A submission with this idempotency key already exists.
                    metadata: {}
        '422':
          description: The submission payload failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
                title: InvalidIdentitySubmissionPayload
                description: The identity submission payload failed validation.
                examples:
                  - code: 6200
                    message: The identity submission payload failed validation.
                    metadata: {}
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.ConsumerIdentitySubmissionRequest:
      additionalProperties: false
      description: Body for ``POST /identity_submissions/consumer``.
      properties:
        idempotency_key:
          description: >-
            Caller-chosen key making the submission idempotent: a resubmission
            under the same key returns the original submission instead of
            minting a second session.
          maxLength: 255
          minLength: 1
          title: Idempotency Key
          type: string
        reference_id:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          default: null
          description: Caller-supplied correlation id.
          title: Reference Id
        consumer:
          $ref: '#/components/schemas/v1.ConsumerIdentityPayload'
          description: The consumer identity to verify.
      required:
        - idempotency_key
        - consumer
      title: ConsumerIdentitySubmissionRequest (v1)
      type: object
    v1.IdentitySubmissionResponse:
      description: >-
        Body for the submission routes: the accepted, asynchronous submission.


        KYC/KYB run asynchronously — the response never carries a verification

        result. Poll ``GET /identity_submissions/{submission_id}`` or subscribe
        to

        the ``OnboardingSession.completed`` webhook for the outcome and refs.
      properties:
        submission_id:
          description: >-
            Unique id of the accepted submission — the handle for status
            polling, and the session id the OnboardingSession.completed webhook
            carries.
          format: uuid
          title: Submission Id
          type: string
        state:
          $ref: '#/components/schemas/v1.ResumableWorkflowState'
          description: Lifecycle state of the verification workflow.
        reference_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Caller-supplied correlation id.
          title: Reference Id
      required:
        - submission_id
        - state
      title: IdentitySubmissionResponse (v1)
      type: object
    APIError:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
        - code
        - message
      title: APIError
      description: >-
        APIError is a Pydantic model for standardizing error responses from the
        API.


        This class is used internally by APIException for JSON serialization.

        Users should typically work with APIException directly in exception
        catalogs.
    v1.ConsumerIdentityPayload:
      additionalProperties: false
      description: The consumer identity a customer asserts for verification.
      properties:
        first_name:
          description: Legal first name.
          maxLength: 128
          minLength: 1
          title: First Name
          type: string
        middle_name:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          default: null
          description: Legal middle name, if any.
          title: Middle Name
        last_name:
          description: Legal last name.
          maxLength: 128
          minLength: 1
          title: Last Name
          type: string
        dob:
          description: Date of birth (YYYY-MM-DD).
          format: date
          title: Dob
          type: string
        phone_number:
          description: Phone number in E.164 format.
          pattern: ^\+[1-9]\d{1,14}$
          title: Phone Number
          type: string
        email:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Email address, if collected.
          title: Email
        address:
          description: >-
            Residential address as a single line; normalized server-side before
            verification.
          examples:
            - 1640 Riverside Drive, Hill Valley, CA 95420
          maxLength: 500
          minLength: 2
          title: Address
          type: string
        national_id:
          description: >-
            US national id (SSN), nine digits; separators are accepted and
            stripped. Required: identity continuity is anchored on it, and a
            submission without one could never earn a principal_ref.
          title: National Id
          type: string
      required:
        - first_name
        - last_name
        - dob
        - phone_number
        - address
        - national_id
      title: ConsumerIdentityPayload (v1)
      type: object
    v1.ResumableWorkflowState:
      description: |-
        Lifecycle state of an asynchronous verification workflow, such as an
        identity submission: PENDING, EXECUTING, or WAITING while in flight,
        then a terminal COMPLETED, FAILED, EXPIRED, or CANCELLED.
      enum:
        - PENDING
        - EXECUTING
        - WAITING
        - COMPLETED
        - FAILED
        - EXPIRED
        - CANCELLED
      title: ResumableWorkflowState
      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````