> ## 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

> The Terms of Service page must be displayed to the end user. This page can be whitelabeled upon request.



## OpenAPI

````yaml https://production.hifi.com/api/v2/openapi.json post /v2/tos-link
openapi: 3.0.0
info:
  title: Hifi API
  version: 2.0.0
  description: API documentation for Hifi
servers:
  - url: https://production.hifibridge.com
    description: Production server
  - url: https://sandbox.hifibridge.com
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Common
    description: Common endpoints
  - name: User
    description: User endpoints
  - name: Kyc
    description: Kyc endpoints
  - name: Wallet
    description: Wallet endpoints
  - name: Account
    description: Account endpoints
  - name: External Account
    description: External Account endpoints for managing beneficiary bank accounts
  - name: Fiat Account
    description: Fiat Account endpoints
  - name: Virtual Account
    description: Virtual Account endpoints
  - name: Onramp
    description: Onramp endpoints
  - name: Offramp
    description: Offramp endpoints
  - name: Orchestration Address
    description: >-
      Orchestration Address endpoints — persistent on-chain wallets that
      automatically off-ramp incoming stablecoin deposits to a USD bank account
  - name: Crypto Transfer
    description: Crypto Transfer endpoints
  - name: Cross-Chain Bridge
    description: Cross-Chain Bridge endpoints
  - name: Token Swap
    description: Token Swap endpoints
  - name: Canton Offers
    description: Canton Offers endpoints
  - name: Transfer Rules
    description: Transfer approval rules and configuration
  - name: Transfer Approvals
    description: Transfer approval workflow and admin actions
  - name: File
    description: File endpoints
  - name: Reporting
    description: Reporting and metrics endpoints
paths:
  /v2/tos-link:
    post:
      tags:
        - User
      summary: Generate a terms of service link
      description: >-
        The Terms of Service page must be displayed to the end user. This page
        can be whitelabeled upon request.
      requestBody:
        $ref: '#/components/requestBodies/ToSLinkBody'
      responses:
        '200':
          $ref: '#/components/responses/ToSLinkObjectResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  requestBodies:
    ToSLinkBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ToSLink'
  responses:
    ToSLinkObjectResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ToSLinkObject'
          examples:
            ToSLinkObjectExample:
              $ref: '#/components/examples/ToSLinkObjectExample'
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    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
          description: >-
            Id of the custom terms of service template generated in the HIFI
            developer dashboard. If not passed, the page will use HIFI's default
            template.
        redirectUrl:
          type: string
          description: >-
            Url to redirect after accepting the terms of service link. The
            signedAgreementId is the same as the passed idempotencyKey, you may
            attempt to call the POST /user/create endpoint, but if the user did
            not accept the TOS, the user creation will return an error.
      required:
        - idempotencyKey
    ToSLinkObject:
      type: object
      properties:
        url:
          type: string
        signedAgreementId:
          type: string
    Unauthorized:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        error:
          type: string
          description: Error type
        errorDetails:
          type: string
          description: Detailed error message
    InternalServerError:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        error:
          type: string
          description: Error type
        errorDetails:
          type: string
          description: Detailed error message
  examples:
    ToSLinkObjectExample:
      summary: ToS Link Object
      value:
        url: >-
          https://dashboard.hifibridge.com/accept-terms-of-service?sessionToken=e12d9c3f-75a8-4bd1-aa3d-97a2cfaf2c40&redirectUrl=undefined&templateId=2fb2da24-472a-4e5b-b160-038d9dc82a40
        signedAgreementId: e12d9c3f-75a8-4bd1-aa3d-97a2cfaf2c40
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````