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

# Record a ToS acceptance

> Record the `tosId` the settlement partner returned in the acceptance redirect. Requires an in-flight ToS session (call `/tos-session` first) so a `tos_id` captured from another account's redirect cannot be replayed here. Idempotent: re-recording the same `tosId` is a no-op.



## OpenAPI

````yaml https://api.caratuva.com/docs-json post /v1/accounts/{id}/tos-accepted
openapi: 3.0.0
info:
  title: Caratuva API
  description: >-
    Cross-border B2B payments. Fiat on-ramp → USDC → PIX off-ramp.


    Every request runs in **test** or **live** mode on this single host — there
    is no separate sandbox URL. API keys carry the mode in their prefix
    (`pk_test_…` / `pk_live_…`); dashboard JWTs start in test and re-mint via
    `POST /v1/auth/switch-mode`. Test mode runs the full pipeline against a
    sandbox payment instance (KYB/KYC auto-approve, no real money); live runs on
    real rails and requires approved KYB. Test and live data are fully isolated.
    Check readiness with `GET /v1/onboarding/status`.
  version: 1.0.0
  contact: {}
servers: []
security: []
tags:
  - name: Invoices
    description: Create and manage invoices that collect for one of your sellers.
  - name: Payments
    description: Create a payment (keep your own checkout), fetch it, or cancel it.
  - name: Accounts
    description: >-
      Onboard and manage your sellers, buyers, and your own (self) account at
      the settlement partner.
  - name: Webhooks
    description: Subscribe to outbound event notifications and manage signing secrets.
  - name: API keys
    description: Issue, list, and revoke the API keys that authenticate your integration.
  - name: Access
    description: Request and check production (live-mode) access for your organization.
  - name: Reports
    description: Pull settlement and transfer-pricing reports.
paths:
  /v1/accounts/{id}/tos-accepted:
    post:
      tags:
        - Accounts
      summary: Record a ToS acceptance
      description: >-
        Record the `tosId` the settlement partner returned in the acceptance
        redirect. Requires an in-flight ToS session (call `/tos-session` first)
        so a `tos_id` captured from another account's redirect cannot be
        replayed here. Idempotent: re-recording the same `tosId` is a no-op.
      operationId: ConnectedAccountsController_tosAccepted
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tosId:
                  type: string
                  minLength: 1
              required:
                - tosId
              additionalProperties: false
            examples:
              default:
                value:
                  tosId: tos_8a3f2b91
      responses:
        '200':
          description: ToS acceptance recorded
          content:
            application/json:
              schema:
                type: object
                properties:
                  accepted:
                    type: boolean
                    example: true
              examples:
                default:
                  value:
                    accepted: true
        '400':
          description: >-
            NoTosSessionInFlight — Cannot accept ToS — call tos-session first so
            the redirect can be bound to this connected account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 400
                  error:
                    type: string
                    example: NoTosSessionInFlight
                  message:
                    type: string
                    example: >-
                      Cannot accept ToS — call tos-session first so the redirect
                      can be bound to this connected account.
      security:
        - apiKey: []
        - bearer: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````