# Create a new signup invite link

Creates a new invite link with an auto-generated unique code. The invite can optionally have a maximum use count and expiration date. Requires authentication. Fails if invites are not enabled on the platform or if the user has exceeded the maximum number of invite links.

Endpoint: POST /api/v1/users/invite-links
Version: 1.0
Security: header

## Request fields (application/json):

  - `expiresAt` (string,null)
    Expiration timestamp (UTC). Must be in the future if provided.
    Example: "2022-03-10T16:15:50Z"

  - `maxUses` (integer,null)
    Maximum number of uses. Use null or 0 for unlimited
    Example: 3

## Response 200 fields (application/json):

  - `code` (string, required)
    Unique invite code

  - `ownerUserId` (string, required)
    Owner user id who created the link
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

  - `expiresAt` (string,null)
    Expiration timestamp (UTC)
    Example: "2022-03-10T16:15:50Z"

  - `maxUses` (integer,null)
    Maximum number of uses. Null means unlimited.

  - `usedCount` (integer, required)
    Number of uses so far

  - `active` (boolean, required)
    Whether link is active (not deactivated)

  - `createdAt` (string, required)
    Creation timestamp (UTC)
    Example: "2022-03-10T16:15:50Z"

  - `deactivatedAt` (string,null)
    Deactivation timestamp (UTC)
    Example: "2022-03-10T16:15:50Z"

  - `accounts` (array, required)
    List of account IDs created using this link
    Example: ["us_01hxcvk1hjexere4pvtrj0ymqq"]

## Response 400 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 401 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


