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

# Replace a share link

> Turns this link off and makes a new one with a new url and the same label. The old link stops working at once and any call running through it ends. The new link expires in 7 days, or never if the old one never expired. Replacing a link that was already replaced returns the current link.



## OpenAPI

````yaml /api-reference/openapi.json post /agent/{agent_id}/share-link/{link_id}/regenerate
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Public REST API for Brilo. Authenticate by sending your API key as a Bearer
    token in the `Authorization` header.
  title: Brilo API
  version: '2025-03-02'
servers:
  - description: Production
    url: https://api.brilo.ai/v1
security: []
tags: []
paths:
  /agent/{agent_id}/share-link/{link_id}/regenerate:
    post:
      tags:
        - Share Links
      summary: Replace a share link
      description: >-
        Turns this link off and makes a new one with a new url and the same
        label. The old link stops working at once and any call running through
        it ends. The new link expires in 7 days, or never if the old one never
        expired. Replacing a link that was already replaced returns the current
        link.
      operationId: AgentShareLinkController_regenerate
      parameters:
        - description: The agent the link opens a call with.
          in: path
          name: agent_id
          required: true
          schema:
            type: string
        - description: The id of the link to replace.
          in: path
          name: link_id
          required: true
          schema:
            type: string
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareLinkResponseDto'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            share_links_not_enabled: share links are not turned on for this
            workspace yet.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            agent_not_found: no agent with this ID in your workspace.
            share_link_not_found: no link with this ID on this agent.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
          description: >-
            share_links_unavailable: new links cannot be made right now. Try
            again later.
      security:
        - bearerAuth: []
components:
  schemas:
    ShareLinkResponseDto:
      properties:
        agent_id:
          example: 0b6f3c1a-2d4e-4f5a-8b9c-1d2e3f4a5b6c
          type: string
        call_count:
          description: Calls started through this link so far.
          example: 3
          type: number
        created_at:
          example: '2026-10-19T10:00:00.000Z'
          format: date-time
          type: string
        enabled:
          description: false while the link is paused.
          example: true
          type: boolean
        expires_at:
          description: When the link stops working. null means it never expires.
          example: '2026-10-26T10:00:00.000Z'
          format: date-time
          nullable: true
          type: string
        id:
          example: 6d1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b
          type: string
        label:
          example: Demo for Dr Rao's clinic
          nullable: true
          type: string
        status:
          description: >-
            active: works now. disabled: paused. expired: past expires_at.
            revoked: turned off for good.
          enum:
            - active
            - disabled
            - expired
            - revoked
          example: active
          type: string
        url:
          description: >-
            The link to send. Anyone who opens it can talk to the agent in their
            browser. null only for a link made before a security key change: it
            still works for whoever has it, but cannot be shown again. Replace
            it to get a new one.
          example: https://brilo.ai/talk#q3Vx9mT2bK7yR1nW8pZ4cL6hJ0dF5sA2gE9uY3iO7kM
          nullable: true
          type: string
      required:
        - id
        - agent_id
        - url
        - label
        - enabled
        - status
        - expires_at
        - call_count
        - created_at
      type: object
    ApiErrorResponseDto:
      properties:
        details:
          description: Structured extras, such as the field and allowed conditions.
          example:
            allowed:
              - is
              - gt
            field: age
            op: has
          type: object
        error_code:
          description: Stable machine-readable code. Branch on this, not on `message`.
          example: validation_failed
          type: string
        message:
          description: What went wrong, in plain words, and how to fix it.
          example: >-
            Filter 1: "Age" is a number field, so the condition must be one of:
            is, gt, gte, lt, lte, between, empty, not_empty.
          type: string
        status:
          description: HTTP status code.
          example: 400
          type: number
      required:
        - status
        - error_code
        - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Enter your API key (Bearer token)
      scheme: bearer
      type: http

````

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