# Create a KYC link

Creates a KYC link that can be shared with a customer to complete identity verification. Optionally associate with an existing customer via `customer_id`, or with a new customer via `email`. Both fields are optional and mutually exclusive — passing both will return a 400 error. Omitting both creates an unlinked KYC link.
By default (`send_email: true`), Glomo will send the link to the customer's email address automatically. Set `send_email: false` to suppress the email and distribute the link yourself.
The response contains a summary of the created KYC link. To retrieve full details — including the customer ID, status tracker, and submitted documents — use `GET /kyc-links/{id}`.

Endpoint: POST /kyc-links
Version: 1.0.0
Security: JWT

## Security:

  - `JWT` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `customer_id` (string)
    The unique identifier of an existing customer (`cust_` prefix). Mutually exclusive with `email`.
    Example: cust_abc123XYZ

  - `email` (string)
    Email address to associate the KYC link with. Mutually exclusive with `customer_id`.
    Example: john.doe@example.com

  - `expire_in_days` (integer)
    Number of days until the link expires. Must be greater than 0. Defaults to the platform setting if omitted.
    Example: 90

  - `send_email` (boolean)
    Whether to send the KYC link to the customer via email. Defaults to `true` — omitting this field will trigger an email to the customer.
    Example: true

## Response 201:

  - `201` (unknown)
    KYC link created successfully

## Response 201 fields (application/json):

  - `id` (string)
    Unique identifier of the KYC link.
    Example: kyc_69b3f97eSThQY

  - `status` (string)
    Current status of the KYC link.
    Example: initiated

  - `link_url` (string)
    The shareable URL to send to the customer to complete KYC. Share it as returned rather than building it yourself: in sandbox it ends with `?sandbox=true`.
    Example: https://app.glomopay.com/kyc-links/kyc_69b3f97eSThQY

  - `expires_at` (string)
    When the link expires, as an ISO 8601 date-time in UTC.
    Example: 2026-06-11T11:48:14.361Z

  - `created_at` (string)
    When the link was created, as an ISO 8601 date-time in UTC.
    Example: 2026-03-13T11:48:14.363Z

  - `customer_id` (string | null)
    The unique identifier of the customer associated with this KYC link. `null` if no existing customer is associated — e.g. when created with only an email address, or without `customer_id` or `email`.
    Example: cust_abc123XYZ

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `error` (string)
    Example: Bad Request

  - `message` (string)
    Error message describing the validation failure.
    Example: customer_id and email are mutually exclusive

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `error` (string)
    Example: Unauthorized

  - `message` (string)
    Example: Invalid or missing authentication token

