---
title: "Create a public share link"
method: POST
path: "/chats/{id}/share"
tags: ["Chats"]
---

# Create a public share link

`POST /chats/{id}/share`

## Request

- Base URL: `https://app.gc.ai/api/external/v1`
- URL: `https://app.gc.ai/api/external/v1/chats/{id}/share`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/gc-ai/apis/gc-ai-external-api/docs/chats/:id/share/post.ts> (a function with typed inputs; its response is checked against the schema)

Make a chat publicly accessible via a share URL. **Security note**: anyone with the URL can read the chat, even without authenticating. Treat this as a deliberate publishing action. Omit expiry fields to use the default 7-day lifetime (or keep the current expiry when re-sharing a live link). Pass `expires_at: null` for a link that never expires.

## Path parameters

- `id` string, uuid, required: The chat ID

## Request body

- ShareRequest
  - `expires_in` integer: Link lifetime in seconds from now.
  - `expires_at` string, date-time, nullable: Absolute ISO 8601 expiry. Explicit null means the link never expires.

## Response `200`

Share link created

- ShareResponse
  - `share_url` string, required: Public share URL
  - `is_public` boolean, required: Always true on success
  - `expires_at` string, nullable, required: ISO 8601 expiry, or null when the link never expires.

## Other responses

- `400`: Invalid chat ID or expiry
- `401`: Missing or malformed API key
- `403`: Chat sharing disabled for this organization, or insufficient access
- `404`: Chat not found or access denied
- `429`: Rate limit exceeded. See [Rate Limits](https://docs.gc.ai/api-reference/concepts/rate-limits) for the tiers, limits, and how to back off.
- `500`: Failed to update chat
- `503`: Service temporarily unavailable

---

[API](https://skmtc.dev/gc-ai/apis/gc-ai-external-api.md) - [All operations](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/revisions/2bbdfddf7107?raw)
