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

# Create browser session

> Initiates a new verification session for a given platform. Returns an `embedUrl` to load in an iframe.



## OpenAPI

````yaml /api-reference/openapi.json post /partner/browser-session
openapi: 3.1.0
info:
  title: Cr3dentials Partner API
  description: >-
    Integrate account verification into your application. Users verify their
    accounts through an iframe-based browser session, and you receive
    cryptographically attested proof of data authenticity.
  version: 1.0.0
  contact:
    name: Cr3dentials Support
    url: https://cr3dentials.xyz
servers:
  - url: https://app.cr3dentials.xyz/v1
    description: Production
  - url: https://staging.cr3dentials.xyz/v1
    description: Staging
security:
  - apiKey: []
paths:
  /partner/browser-session:
    post:
      tags:
        - Sessions
      summary: Create browser session
      description: >-
        Initiates a new verification session for a given platform. Returns an
        `embedUrl` to load in an iframe.
      operationId: createBrowserSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBrowserSessionRequest'
      responses:
        '201':
          description: Session created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    $ref: '#/components/schemas/CreatedSession'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    CreateBrowserSessionRequest:
      type: object
      required:
        - platformId
        - location
      properties:
        platformId:
          type: integer
          description: Platform ID from the platforms endpoint.
          example: 1
        receiverData:
          type: object
          description: >-
            Metadata about the person performing verification (name, email,
            phone, etc.).
          additionalProperties: true
          example:
            name: John Doe
            email: john@example.com
        expiresInHours:
          type: integer
          description: Session TTL in hours (1–168). Defaults to the maximum if omitted.
          minimum: 1
          maximum: 168
          example: 24
        location:
          allOf:
            - $ref: '#/components/schemas/Location'
          description: >-
            Required. Where your applicant is — the verification runs from a
            residential IP in this country so the provider sign-in looks like
            your user, not a foreign datacenter. Use values from `GET
            /partner/supported-countries`.
        preferredRegion:
          type: string
          enum:
            - us-central
            - us-west
            - us-east
            - asia-south
            - europe-west
          description: >-
            Preferred compute region for the browser. Overrides the region
            otherwise derived from `location`. Omit to auto-select the closest
            region for lowest latency.
          example: us-central
        generateAttestation:
          type: boolean
          description: >-
            When `true`, the session also produces a Primus (zkTLS) attestation
            of the collected data. Defaults to `false` (raw data only). When
            set, the completed session exposes `hasAttestation: true` and
            webhooks include a `proofHash`.
          default: false
          example: false
        notificationPlatformId:
          type: integer
          description: >-
            Notification channel used to send the verification link to your
            applicant on your behalf (e.g. email or WhatsApp). Requires
            `receiverData` with the applicant's contact. Omit to deliver the
            `embedUrl` yourself.
          example: 1
        senderName:
          type: string
          description: >-
            Business name shown as the sender in the verification notification.
            Only applies when `notificationPlatformId` is set. Defaults to
            "Cr3dentials".
          example: Acme Corporation
        emailTemplateId:
          type: integer
          description: >-
            Approved email template for the verification notification. Only
            applies when `notificationPlatformId` is an email channel. Falls
            back to the team or system default.
          example: 1
        receiverId:
          type: string
          description: >-
            User ID of a registered Cr3dentials receiver to link this session
            to. Leave unset for external applicants and identify them via
            `receiverData`.
          example: user-uuid-123
        externalReferenceId:
          type: string
          description: >-
            Your internal reference ID for tracking this session. Included in
            webhook payloads and responses.
          example: user_abc123
    CreatedSession:
      type: object
      properties:
        sessionId:
          type: string
          format: uuid
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        status:
          $ref: '#/components/schemas/SessionStatus'
        embedUrl:
          type: string
          description: URL for iframe embedding — load this in your UI.
          example: https://frame.cr3dentials.xyz/verify/a1b2c3d4...?token=xxx
        platformId:
          type: integer
          example: 1
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        location:
          allOf:
            - $ref: '#/components/schemas/Location'
          description: The resolved applicant location the session runs from.
        externalReferenceId:
          type: string
          description: Only present if provided in the request.
          example: user_abc123
    Location:
      type: object
      required:
        - country
      description: >-
        Applicant location. The verification browser egresses from a residential
        IP here.
      properties:
        country:
          type: string
          description: ISO-3166 alpha-2 country code.
          example: ZA
        state:
          type: string
          description: Optional region/state for finer targeting.
          example: gauteng
        city:
          type: string
          description: Optional city for finer targeting (best-effort).
          example: johannesburg
    SessionStatus:
      type: string
      description: Lifecycle status of a verification session.
      enum:
        - CREATED
        - INITIALIZING
        - READY
        - CONNECTED
        - LOADING_TREE
        - RUNNING
        - AWAITING_USER
        - COLLECTING_DATA
        - VERIFYING
        - COMPLETED
        - PARTIAL_COMPLETE
        - ERROR
        - CANCELLED
        - TERMINATED
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SessionStatus'
          example:
            statusCode: 400
            message: platformId must be a number
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          example:
            statusCode: 401
            message: Unauthorized
    RateLimited:
      description: Too many requests — 120 req / 60s per API key. Use exponential backoff.
      content:
        application/json:
          example:
            statusCode: 429
            message: Too Many Requests
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Your partner API key. Alternatively, pass `Authorization: Bearer <key>`.'

````