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

# create share link

> Create a new share link



## OpenAPI

````yaml https://api.anam.ai/swagger.json post /v1/share-links
openapi: 3.1.0
info:
  title: Anam AI API
  version: '1.0'
servers:
  - url: https://api.anam.ai
    description: Anam API
security:
  - BearerAuth: []
tags:
  - name: Sessions
  - name: Personas
  - name: Avatars
  - name: Voices
  - name: LLMs
  - name: Knowledge
  - name: Tools
  - name: Share Links
paths:
  /v1/share-links:
    post:
      tags:
        - Share Links
      summary: create share link
      description: Create a new share link
      operationId: createShareLink
      requestBody:
        description: >-
          Persona to issue a share link for, plus optional lifetime and usage
          limits. A share link with no `expiresInHours` defaults to 168 (one
          week); with no `usageLimit` it defaults to 10.
        required: true
        content:
          application/json:
            examples:
              default:
                $ref: '#/components/examples/ShareLinkCreate'
            schema:
              type: object
              required:
                - personaId
              properties:
                personaId:
                  type: string
                  format: uuid
                expiresInHours:
                  type: number
                  default: 168
                usageLimit:
                  type: number
                  default: 10
      responses:
        '201':
          description: Successfully created share link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareLink'
              examples:
                default:
                  $ref: '#/components/examples/ShareLinkResponse'
        '400':
          description: Bad request - Invalid share link data
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Persona not found
        '500':
          description: Server error
components:
  examples:
    ShareLinkCreate:
      summary: Issue a share link valid for one week
      value:
        personaId: 00000000-0000-0000-0000-000000000000
        expiresInHours: 168
        usageLimit: 10
    ShareLinkResponse:
      summary: A single share link (as returned by create or update)
      value:
        id: 00000000-0000-0000-0000-000000000000
        token: sh_2kL9pQxYzR4vN8mBwHfJc
        type: LINK
        expiresAt: '2026-04-27T10:00:00.000Z'
        usageLimit: 10
        usageCount: 0
        allowedOrigins: []
        allowAllOrigins: false
        removeWatermark: false
        enabled: true
        isPrimary: false
        createdAt: '2026-04-20T10:00:00.000Z'
  schemas:
    ShareLink:
      type: object
      description: >-
        A shareable link to a persona. Can be used as a direct URL or embedded
        via the widget.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the share link.
        token:
          type: string
          description: Opaque token appended to the public URL.
        type:
          type: string
          enum:
            - LINK
            - PLAYER_EMBED
            - ORB_EMBED
          description: Kind of share link — a direct URL, a player embed, or an orb embed.
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp after which the link no longer works, or `null` if the
            link does not expire.
        usageLimit:
          type:
            - integer
            - 'null'
          description: >-
            Maximum number of times the link can be used, or `null` for
            unlimited.
        usageCount:
          type: integer
          description: Number of times the link has been used.
        allowedOrigins:
          type: array
          items:
            type: string
          description: >-
            Origins permitted to load the link when embedded. Ignored when
            `allowAllOrigins` is true.
        allowAllOrigins:
          type: boolean
          description: Whether the link can be embedded on any origin.
        removeWatermark:
          type: boolean
          description: >-
            Whether the persona renders without the Anam watermark. Requires a
            plan that permits watermark removal.
        enabled:
          type: boolean
          description: Whether the link currently accepts connections.
        isPrimary:
          type: boolean
          description: >-
            Whether this is the persona's primary share link (at most one per
            persona).
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the share link was created.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````