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

# Create a client secret

> Generate a new client secret for the specified session



## OpenAPI

````yaml GET /sessions/{sessionId}/refresh
openapi: 3.0.3
info:
  title: FaceSign API
  description: >
    The FaceSign API enables developers to create AI-powered identity
    verification flows with conversational interfaces, 

    biometric verification, document scanning, and multi-factor authentication.
  version: 1.0.18
  contact:
    name: FaceSign Support
    email: support@facesign.ai
    url: https://facesign.ai
  license:
    name: MIT
    url: https://github.com/facesignai/facesign-api/blob/main/LICENSE
servers:
  - url: https://api.facesign.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Sessions
    description: Identity verification session management
  - name: Languages
    description: Supported language operations
  - name: Avatars
    description: Available avatar operations
paths:
  /sessions/{sessionId}/refresh:
    get:
      tags:
        - Sessions
      summary: Create a client secret
      description: Generate a new client secret for the specified session
      operationId: createClientSecret
      parameters:
        - name: sessionId
          in: path
          required: true
          description: The session ID
          schema:
            type: string
      responses:
        '200':
          description: Client secret created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientSecret'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    ClientSecret:
      type: object
      required:
        - secret
        - createdAt
        - expireAt
        - url
      properties:
        secret:
          type: string
        createdAt:
          type: integer
          description: Unix timestamp
        expireAt:
          type: integer
          description: Unix timestamp
        url:
          type: string
          description: Hosted session URL
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - message
          properties:
            type:
              type: string
              enum:
                - authentication_error
                - validation_error
                - not_found_error
                - rate_limit_error
                - server_error
            message:
              type: string
            code:
              type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: authentication_error
              message: Invalid API key provided
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: not_found_error
              message: Session not found
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: rate_limit_error
              message: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: The rate limit ceiling
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: The number of requests remaining in the current window
        X-RateLimit-Reset:
          schema:
            type: integer
          description: The time at which the rate limit window resets in Unix time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Use format "Bearer sk_live_..." or "Bearer
        sk_test_..."

````