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

# Create terms link

> Creates a single-use link to Endl's hosted terms page for a customer you haven't created yet. The customer accepts there, and you receive a signed agreement id to send as `termsAcceptance.signed_agreement_id` on [Create customer](/api-reference/onboarding/create-customer).

- The document (Endl platform terms) and its version are chosen by Endl. You don't send them.
- A link works only once and expires. `expires_at` says when; links currently last 15 minutes.
- **Use the `url` exactly as Endl returns it.** Sandbox and QA links include `&env=sandbox` or `&env=qa`; production links have no `env`. Don't add, remove or change it. Don't add `redirect_uri` to the page URL yourself: Endl stores it with the link, and a `redirect_uri` added to the page URL is ignored.

Unlike other onboarding responses, this one is wrapped in `{ code, message, status, data }`.

`Api-Version` is required, as on every `/api/v0` request: if it's missing or the value isn't supported, the request fails with `400` and `field: "Api-Version"`.

See the [hosted terms page guide](/guides/terms-acceptance) for showing the `url` in an iframe or by redirect, and [Terms acceptance](/api-reference/onboarding/terms-acceptance) for sending the result on Create customer.



## OpenAPI

````yaml api-reference/endl-onboarding-api.json POST /api/v0/terms/links
openapi: 3.1.0
info:
  title: Endl Partner Onboarding API
  version: '0'
  description: >-
    Onboard end customers for identity verification — individuals (KYC) and
    businesses (KYB) — through one uniform REST surface.


    Authentication is API-key only: every request carries a single `API-KEY`
    header. Unlike the Partner API, responses are **flat** — a successful body
    is the data object itself, with no `{ data, code, message, status }`
    envelope.
servers:
  - url: https://api-sandbox.endl.io
    description: Sandbox
security:
  - apiKey: []
tags:
  - name: Terms
  - name: Customers
    description: Create, read, update and delete onboarding customers.
  - name: Documents
    description: Upload identity, company and beneficial-owner documents.
paths:
  /api/v0/terms/links:
    post:
      tags:
        - Terms
      summary: Create terms link
      description: >-
        Creates a single-use link to Endl's hosted terms page for a customer you
        haven't created yet. The customer accepts there, and you receive a
        signed agreement id to send as `termsAcceptance.signed_agreement_id` on
        [Create customer](/api-reference/onboarding/create-customer).


        - The document (Endl platform terms) and its version are chosen by Endl.
        You don't send them.

        - A link works only once and expires. `expires_at` says when; links
        currently last 15 minutes.

        - **Use the `url` exactly as Endl returns it.** Sandbox and QA links
        include `&env=sandbox` or `&env=qa`; production links have no `env`.
        Don't add, remove or change it. Don't add `redirect_uri` to the page URL
        yourself: Endl stores it with the link, and a `redirect_uri` added to
        the page URL is ignored.


        Unlike other onboarding responses, this one is wrapped in `{ code,
        message, status, data }`.


        `Api-Version` is required, as on every `/api/v0` request: if it's
        missing or the value isn't supported, the request fails with `400` and
        `field: "Api-Version"`.


        See the [hosted terms page guide](/guides/terms-acceptance) for showing
        the `url` in an iframe or by redirect, and [Terms
        acceptance](/api-reference/onboarding/terms-acceptance) for sending the
        result on Create customer.
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect_uri:
                  type: string
                  format: uri
                  description: >-
                    Only for redirect mode. Where Endl sends the customer's
                    browser after they accept. Must be an absolute `https://`
                    URL. Leave it out for an iframe-only link. Sent blank (`""`
                    or only spaces) → `400 ERRCUS_1712`.
            example:
              redirect_uri: https://partner.example/endl/done
      responses:
        '201':
          description: Terms link created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 201
                  message:
                    type: string
                    example: Terms link created
                  status:
                    type: string
                    example: SUCCESS
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        description: >-
                          The hosted terms page for this link. Show it in an
                          iframe or send the customer to it.
                      expires_at:
                        type: string
                        format: date-time
                        description: When the link stops working (UTC).
              example:
                code: 201
                message: Terms link created
                status: SUCCESS
                data:
                  url: >-
                    https://www.endl.io/legal/terms?link=tos_3f9c2a71-8d4e-4b6a-9e1f-0c5d7a2b8e64&env=sandbox
                  expires_at: '2026-11-05T10:15:00Z'
        '400':
          description: >-
            `ERRCUS_1712` — `redirect_uri` isn't an absolute `https://` URL, or
            it was sent blank (`""` or only spaces); leave it out for the iframe
            flow.


            `Api-Version` missing or not supported — `field: "Api-Version"`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: 400
                message: Onboarding validation failed
                status: ERROR
                data: null
                errors:
                  - code: ERRCUS_1712
                    message: >-
                      redirect_uri must not be blank; leave it out for the
                      iframe flow
                    field: redirect_uri
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API key doesn't have the `customers` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    ApiVersion:
      name: Api-Version
      in: header
      required: true
      description: >-
        The API version this request targets. Required on every `/api/v0/*`
        call. Format `YYYY-MM.<release>`; `2026-09.1` is the latest. The version
        that served the request is echoed back on the response. Missing,
        malformed or unsupported values are rejected with `400`.
      schema:
        type: string
        pattern: ^\d{4}-\d{2}\.\d+$
        default: 2026-09.1
      example: 2026-09.1
  schemas:
    Error:
      type: object
      description: >-
        Every onboarding error, for every status code, uses this one envelope.
        `errors[]` holds one entry per problem — field, questionnaire and
        custom-field errors are reported together, and nothing is created when
        any is present. **Branch on `errors[].code`, never on the message.**
      properties:
        code:
          type: integer
          description: The HTTP status, as an integer.
          example: 400
        message:
          type: string
          description: A summary of the failure.
        status:
          type: string
          enum:
            - ERROR
          description: Always `ERROR`.
        data:
          type: 'null'
          description: Always `null`.
        errors:
          type: array
          description: One entry per problem.
          items:
            type: object
            properties:
              code:
                type: string
                description: >-
                  A frozen catalogue code — `ERRCUS_*` for onboarding errors,
                  `ERRCORE_*` / `ERRREF_*` / `ERRCOMP_*` otherwise. Codes are
                  never renumbered, reused or removed.
              message:
                type: string
                description: The specific reason.
              field:
                type:
                  - string
                  - 'null'
                description: >-
                  The offending input as a single token — `email`,
                  `company.phone`, `beneficiaries[0].dob`,
                  `customFields.whatsappNumber`, `questionnaireItem`. A missing
                  block names the block (`company`, `company.address`,
                  `beneficiaries`); a cross-beneficiary rule names
                  `beneficiaries`. Only errors with no single input (a malformed
                  questionnaire structure, a country refused by the platform or
                  partner list) carry `field: null`. A country refused by the
                  verification level names the field that carried it, e.g.
                  `nationality` or `beneficiaries[1].taxResidenceCountry`.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: API-KEY
      description: Your partner API key. The key must carry the `customers` permission.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.