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

# Create a KYC session

> Start or resume an identity-verification session and get a verification URL. Requires the WRITE_KYC scope.

Starts a new verification session (or returns the active one) and gives you a session id and verification URL to redirect the merchant to. The store is bound to your app token server-side — never send a shop id.


## OpenAPI

````yaml POST /kyc/session
openapi: 3.1.0
info:
  title: Salesive Apps API — Account
  version: 1.0.0
  description: >-
    Read the store's account configuration — domains, staff roles and payout
    methods — and manage its identity verification (KYC) from an installed
    third-party app. Every endpoint authenticates with an installed-app access
    token (prefix `app_`) and requires a specific OAuth scope. The target store
    is bound to the token server-side from the installation — never send a shop
    id. Domains, roles and payouts are read-only for apps: their
    create/update/delete operations are owner-only and are not exposed here.
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /kyc/session:
    post:
      tags:
        - KYC
      summary: Create a KYC session
      description: >-
        Starts a new identity-verification session for the store, or returns the
        existing active session if verification is already in progress (or
        `alreadyApproved` if the store is already verified). Returns a session
        id and a verification URL to redirect the merchant to. Requires the
        `WRITE_KYC` scope and returns 403 if the token is missing it. The store
        is bound to the app token server-side from the installation — never send
        a shop id.
      operationId: createKycSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - callbackUrl
              properties:
                callbackUrl:
                  type: string
                  format: uri
                  description: >-
                    URL the merchant is returned to after completing
                    verification.
            example:
              callbackUrl: https://app.example.com/kyc/callback
      responses:
        '200':
          description: The verification session (newly created or resumed).
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/KycSession'
              example:
                status: 200
                success: true
                message: KYC session created
                data:
                  sessionId: sess_abc123
                  sessionUrl: https://verification.didit.me/session/sess_abc123
                  status: pending
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    EnvelopeBase:
      type: object
      description: >-
        Standard Salesive response envelope. The operation-specific payload is
        carried in `data`.
      required:
        - status
        - success
        - message
      properties:
        status:
          type: integer
          description: HTTP status code, echoed in the body.
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable result message.
    KycSession:
      type: object
      description: >-
        A verification session returned by create-session. When the store is
        already verified, `alreadyApproved` is true and the session fields may
        be omitted.
      properties:
        sessionId:
          type: string
          description: The verification session id.
        sessionUrl:
          type: string
          description: URL to redirect the merchant to for verification.
        status:
          type: string
          description: Current verification status.
          enum:
            - not_started
            - pending
            - in_review
            - approved
            - declined
        alreadyApproved:
          type: boolean
          description: True if the store is already verified; no new session was created.
    Envelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              description: Operation-specific payload (object, array, or null).
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 401
            success: false
            message: Authentication required
            data: null
    Forbidden:
      description: The app token is missing the OAuth scope required for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 403
            success: false
            message: Insufficient scope
            data: null
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````