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

# Submit Passkey Session

> Submit WebAuthn ceremony data to complete passkey creation or authentication.

<Warning>
  The "Try It" feature is disabled for this endpoint because it requires cryptographic WebAuthn authenticator response data that can only be generated during a browser WebAuthn ceremony. Use the [Integration Guide](/grid/v1/accounts/passkeys/integration-guide) for implementation examples.
</Warning>

Submits the WebAuthn authenticator response to complete passkey creation or authentication. Processes ceremony data and executes on-chain transaction to initialize or refresh the passkey.

<Note>
  Only ES256 (algorithm `-7`) signatures are supported. The authenticator response must verify user presence.
</Note>

## Implementation Flow

<Steps>
  <Step title="Complete WebAuthn Ceremony">
    User completes passkey creation or authentication in hosted UI or custom UI
  </Step>

  <Step title="Extract Response">
    Retrieve the complete authenticator response from the WebAuthn API
  </Step>

  <Step title="Submit to API">
    POST to /passkeys/submit with ceremony type, session key, slot, and response
  </Step>

  <Step title="Process Result">
    Receive passkey\_account address and session\_key for transaction signing
  </Step>
</Steps>

## Related Endpoints

* [Create Passkey Session](/grid/v1/api-reference/endpoint/passkeys/post) - Initialize passkey creation
* [Authorize Passkey Session](/grid/v1/api-reference/endpoint/passkeys/auth) - Start authentication
* [Get Passkey Account](/grid/v1/api-reference/endpoint/passkeys/get-account) - Retrieve passkey details


## OpenAPI

````yaml POST /api/grid/v1/passkeys/submit
openapi: 3.1.0
info:
  title: Grid v1 API
  description: Grid v1 REST API for Solana-based smart account system
  contact:
    name: Grid API Support
    url: https://squads.so
    email: support@squads.so
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://grid.squads.xyz
    description: Production server
security:
  - bearer_auth: []
tags:
  - name: accounts
    description: Smart account management operations
  - name: spending-limits
    description: Spending limit management
  - name: standing-orders
    description: Standing order operations
  - name: transactions
    description: Transaction management
  - name: trade
    description: Trade operations and management
  - name: payments
    description: Payment intent operations
  - name: passkeys
    description: Passkey management
  - name: kyc
    description: Know Your Customer operations
  - name: external-accounts
    description: External bank account management
  - name: virtual-accounts
    description: Virtual account management
  - name: auth
    description: Authentication operations
  - name: proposals
    description: Proposal management for multi-sig operations
  - name: compliance
    description: Compliance entity management and KYB/KYC operations
paths:
  /api/grid/v1/passkeys/submit:
    post:
      tags:
        - passkeys
      summary: Submit passkey session
      description: >-
        Submit passkey ceremony data (create or auth) to initialize or refresh a
        passkey account. Returns the passkey account address, session key, and
        optionally a smart account if the passkey is a signer on one.
      operationId: handler
      parameters:
        - name: x-grid-environment
          in: header
          description: Solana network environment (sandbox, devnet, mainnet)
          required: true
          schema:
            type: string
          example: sandbox
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitPasskeySessionRequestPayload'
        required: true
      responses:
        '200':
          description: >-
            Passkey session submitted successfully. If the passkey is a signer
            on a smart account, smart_account data will be included in the
            response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitPasskeySessionResponsePayload'
        '400':
          description: Invalid request parameters or authenticator response
        '500':
          description: Internal server error
      security:
        - bearer_auth: []
components:
  schemas:
    SubmitPasskeySessionRequestPayload:
      type: object
      required:
        - ceremonyType
        - sessionKey
        - slotNumber
        - authenticatorResponse
      properties:
        authenticatorResponse:
          $ref: '#/components/schemas/AuthenticatorResponse'
        ceremonyType:
          $ref: '#/components/schemas/CeremonyType'
        sessionKey:
          $ref: '#/components/schemas/SessionKey'
        slotNumber:
          type: integer
          format: int64
          minimum: 0
    SubmitPasskeySessionResponsePayload:
      type: object
      required:
        - passkeyAccount
        - sessionKey
      properties:
        passkeyAccount:
          type: string
        sessionKey:
          $ref: '#/components/schemas/SessionKey'
        smartAccount:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SmartAccountData'
    AuthenticatorResponse:
      type: object
      required:
        - response
      properties:
        response:
          $ref: '#/components/schemas/WebAuthnResponse'
    CeremonyType:
      type: string
      enum:
        - create
        - auth
    SessionKey:
      type: object
      description: >-
        Grid v1 API SessionKey type that supports backward-compatible
        deserialization

        from both raw bytes array (old format) and base58 string (new format).

        Always serializes to base58 string format.
      required:
        - key
        - expiration
      properties:
        expiration:
          type: integer
          format: int64
          minimum: 0
        key:
          type: string
          example: '11111111111111111111111111111111'
    SmartAccountData:
      type: object
      required:
        - address
        - grid_user_id
        - policies
      properties:
        address:
          type: string
        grid_user_id:
          type: string
        policies:
          $ref: '#/components/schemas/AccountPolicies'
    WebAuthnResponse:
      type: object
      required:
        - authenticatorData
        - clientDataJSON
      properties:
        authenticatorData:
          type: string
        clientDataJSON:
          type: string
        publicKey:
          type:
            - string
            - 'null'
        signature:
          type:
            - string
            - 'null'
    AccountPolicies:
      type: object
      required:
        - signers
        - threshold
      properties:
        admin_address:
          type:
            - string
            - 'null'
        signers:
          type: array
          items:
            $ref: '#/components/schemas/AccountSigner'
        threshold:
          type: integer
          format: int32
          minimum: 0
        time_lock:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
    AccountSigner:
      type: object
      required:
        - address
        - role
        - permissions
      properties:
        address:
          type: string
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permission'
        provider:
          $ref: '#/components/schemas/GridMPCProvider'
        role:
          $ref: '#/components/schemas/GridSignerRole'
    Permission:
      type: string
      enum:
        - CAN_INITIATE
        - CAN_VOTE
        - CAN_EXECUTE
    GridMPCProvider:
      type: string
      enum:
        - privy
        - dynamic
        - passkey
        - turnkey
        - external
    GridSignerRole:
      type: string
      enum:
        - primary
        - backup
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: Your Grid API key from the Grid Dashboard

````