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

# Create share link

`POST /api/sessions/share`

## Request

- Base URL: `/api/plugins/consensys-asko11y-app/resources` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/plugins/consensys-asko11y-app/resources/api/sessions/share`
- Auth: one of:
  - API key in cookie `grafana_session`
  - HTTP bearer

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.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) - [All operations](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/revisions/ee3ccd0f186d?raw)
