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

# Generate a terms of service link

> Generate a hosted Terms of Service link that can be used before creating a user.



## OpenAPI

````yaml https://production.hifi.com/api/v3/openapi.json post /v3/tos-link
openapi: 3.0.0
info:
  title: Hifi API
  version: 3.0.0
  description: API documentation for HIFI
servers:
  - url: https://production.hifi.com
    description: Production server
  - url: https://sandbox.hifi.com
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Common
    description: Common endpoints
  - name: User
    description: User endpoints
  - name: Counter Party
    description: Counter party endpoints
  - name: Crypto Transfer
    description: Crypto transfer and batch transfer endpoints
  - name: Wallet
    description: Wallet and wallet offer endpoints
  - name: External Account
    description: External bank account endpoints (under a counter party)
  - name: External Wallet
    description: External wallet endpoints (under a counter party)
  - name: External Card
    description: External card endpoints (under a counter party)
  - name: Token Swap
    description: Token swap endpoints
  - name: Bridge
    description: Bridge endpoints
  - name: Virtual Account
    description: Virtual account endpoints
  - name: Compliance
    description: Compliance and compliance link endpoints
  - name: Webhook Endpoint
    description: Webhook endpoint endpoints
  - name: File
    description: File upload endpoints
  - name: Onramp
    description: Onramp (fiat to crypto) endpoints
  - name: Offramp
    description: Offramp (crypto to fiat) endpoints
  - name: Orchestration Address
    description: Orchestration (liquidation) address endpoints
  - name: KYC Link
    description: Hosted and custom KYC/KYB link endpoints
  - name: Transfer Approval
    description: Transfer approval endpoints
  - name: Corridor
    description: Supported fiat/crypto transfer corridor endpoints
  - name: Migration
    description: v2-to-v3 ID mapping endpoints
paths:
  /v3/tos-link:
    post:
      tags:
        - User
      summary: Generate a terms of service link
      description: >-
        Generate a hosted Terms of Service link that can be used before creating
        a user.
      operationId: v3GenerateTosLink
      requestBody:
        $ref: '#/components/requestBodies/CreateToSLinkBody'
      responses:
        '200':
          $ref: '#/components/responses/ToSLinkObjectResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  requestBodies:
    CreateToSLinkBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ToSLink'
  responses:
    ToSLinkObjectResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateToSLinkObject'
          examples:
            ToSLinkObjectExample:
              $ref: '#/components/examples/ToSLinkObjectExample'
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    NotFoundResponse:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFound'
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  schemas:
    ToSLink:
      type: object
      properties:
        idempotencyKey:
          type: string
          description: Unique identifier for the resource.
          format: uuid
        templateId:
          type: string
          format: uuid
          description: >-
            ID of the custom Terms of Service template generated in the Hifi
            developer dashboard.
        redirectUrl:
          type: string
          format: uri
          description: URL to redirect to after the Terms of Service link is accepted.
      required:
        - idempotencyKey
    CreateToSLinkObject:
      type: object
      properties:
        url:
          type: string
          format: uri
        id:
          type: string
          format: uuid
        signed:
          type: boolean
        sessionToken:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        expiredAt:
          type: string
          format: date-time
      required:
        - url
        - id
        - signed
        - sessionToken
        - createdAt
        - expiredAt
    Unauthorized:
      type: object
      properties:
        type:
          type: string
          description: Unauthorized enum
          example: UNAUTHORIZED
        message:
          type: string
          description: Unauthorized message
          example: Authentication required
    NotFound:
      type: object
      properties:
        type:
          type: string
          example: RESOURCE_NOT_FOUND
          description: The error type, e.g., RESOURCE_NOT_FOUND
        message:
          type: string
          description: A descriptive error message
        fields:
          type: array
          description: List of specific field errors
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code related to the field issue
              message:
                type: string
                description: Error message for the specific issue
              field:
                type: string
                description: The name of the field that has an issue
    InternalServerError:
      type: object
      properties:
        type:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: Internal server error enum
        message:
          type: string
          example: An internal server error occurred
          description: Internal server error message
  examples:
    ToSLinkObjectExample:
      summary: ToS Link Object
      value:
        url: >-
          https://app.hifi.com/tos?sessionToken=03402692-0fdf-4bbd-8axd-5658d87c6c2d&redirectUrl=https%3A%2F%2Fwww.google.com&templateId=12345426-65x9-4b4b-9e8f-2867a724e2d9&sandbox=true
        id: 34d07807-e590-4d4a-b125-6267862a68f2
        signed: true
        sessionToken: 12345672-0fdf-4cbc-9a0d-5658d87c6a3c
        createdAt: '2026-07-09T17:58:19.651Z'
        expiredAt: '2026-07-14T17:58:19.053Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````