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

# Generate User Consent

> Record user acceptance of terms and conditions and generate a consent ID



## OpenAPI

````yaml /api-reference/openapi.json post /onboarding/api/v1/tnc
openapi: 3.0.0
info:
  title: Carbn Connect API
  version: 1.0.0
  description: >-
    API documentation for Carbn Connect services including user onboarding, KYC,
    wallet management, and transfers.
servers:
  - url: https://api.carbnconnect.com
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /onboarding/api/v1/tnc:
    post:
      tags:
        - User Management
      summary: Generate User Consent
      description: Record user acceptance of terms and conditions and generate a consent ID
      operationId: generateUserConsent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserConsentRequest'
      responses:
        '200':
          description: User consent recorded successfully and consent ID generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserConsentResponse'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized - API key is missing or invalid
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UserConsentRequest:
      type: object
      required:
        - tnc_data
      properties:
        tnc_data:
          type: object
          required:
            - tnc_accepted
            - accepted_at
          properties:
            tnc_accepted:
              type: boolean
              example: true
              description: Whether the user has accepted the terms and conditions
            accepted_at:
              type: string
              format: date-time
              example: YYYY-MM-DDTHH:MM:SS.sssZ
              description: >-
                Timestamp in UTC format when the terms and conditions were
                accepted
    UserConsentResponse:
      type: string
      format: uuid
      example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      description: >-
        The unique consent ID generated for the user's terms and conditions
        acceptance
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Must be included in the x-api-key header.

````