---
title: "Enable Share"
method: POST
path: "/voice/sharing/{agentId}/share"
tags: ["Voice Agent Sharing"]
---

# Enable Share

`POST /voice/sharing/{agentId}/share`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/voice/sharing/{agentId}/share`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

### Enable Share

Requires the OWNER or ADMIN role. Turns on the agent's public share link and embeddable widget. Safe to call again to change isPublic/allowedDomains/expiresAt -- the existing shareToken and shortCode are kept rather than rotated.

## Path parameters

- `agentId` string, required

## Request body

- object
  - `isPublic` boolean: Defaults to false.
  - `allowedDomains` string[]: Restrict the embeddable widget to these domains. Defaults to empty (no restriction).
  - `expiresAt` string, date-time

## Response `200`

OK

- object
  - `status` 'success'
  - `data` object
    - `agentId` string
    - `isPublic` boolean
    - `shareToken` string: Reused across repeated enable calls once generated. Part of the public share link and the widget embed.
    - `shortCode` string: Short, URL-friendly alias for shareToken.
    - `allowedDomains` string[]
    - `expiresAt` string, date-time, nullable

## Other responses

- `403`: Caller's role is not OWNER or ADMIN
- `404`: Agent not found

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
