---
title: "Create share link"
method: POST
path: "/api/sessions/share"
tags: ["Shares"]
---

# Create share link

`POST /api/sessions/share`

Creates a shareable link for a session snapshot. The share is scoped to the organization and can be accessed by any user in the same org. Rate limited to 50 shares per hour per user. The share contains a snapshot of the session at creation time (not live updates).

## Headers

- `X-Grafana-Org-Id` string

## Request body

- object
  - `sessionId` string, required — Session ID to share
  - `sessionData` object, required — Full session object (must include id and messages fields)
  - `expiresInHours` integer — Expiration time in hours (optional)
  - `expiresInDays` integer — Expiration time in days (optional, converted to hours)

## Response `200`

Share created

- object
  - `shareId` string — Cryptographically secure share ID (base64 URL-safe 32-byte token)
  - `shareUrl` string — Full URL to access the shared session
  - `expiresAt` string, date-time, nullable — Expiration timestamp (null if no expiration)

## Other responses

- `400` — Bad request (invalid parameters or malformed request body)
- `401` — Unauthorized (missing or invalid authentication)
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) · [All operations](https://skmtc.net/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/consensys/ask-o11y-ai-powered-observability-assistant-api/versions/3ccc03eccaef/schema)
