---
title: "Create a shareable analytics link"
method: POST
path: "/api/v1/workspaces/{workspace_id}/analytics/share-links"
tags: ["🔗 Analytics Share Links"]
---

# Create a shareable analytics link

`POST /api/v1/workspaces/{workspace_id}/analytics/share-links`

## Request

- Base URL: `https://api.contentstudio.io`
- URL: `https://api.contentstudio.io/api/v1/workspaces/{workspace_id}/analytics/share-links`
- Auth: API key in header `X-API-Key`

Creates a link that anyone holding the URL can open without a ContentStudio account. It grants READ access to the workspace, platform and account it was created for, and nothing else. Set is_password_protected with a password to require one; the password is stored hashed and never returned.

## Path parameters

- `workspace_id` string, required

## Request body

- object
  - `title` string, required
  - `platform` 'overview' | 'facebook' | 'instagram' | 'linkedin' | 'tiktok' | 'youtube' | 'pinterest' | 'twitter' | 'gmb' | 'meta_ads' | 'google_ads', required
  - `account_id` string, nullable
  - `overview_accounts` string[], nullable
  - `is_date_range_fixed` boolean
  - `date_range` string, nullable: Required when is_date_range_fixed is true. A fixed link keeps showing the period it was made for.
  - `is_account_switching_enabled` boolean
  - `is_password_protected` boolean
  - `password` string: Write-only. Stored hashed, never returned.
  - `expires_at` string, nullable: Optional deadline (date or datetime, must be in the future). After it passes the link stops opening and the viewer is told it expired. Omit for a link that lives until disabled or deleted.

## Response `201`

Created; the response carries share_url.

- object

## Other responses

- `401`: Unauthorized
- `403`: Workspace access refusals return `error_code` `WORKSPACE_ACCESS_DENIED`, `WORKSPACE_INVITATION_PENDING`, `WORKSPACE_LOCKED`, `PERMISSION_DENIED`, `ACCOUNT_ACCESS_DENIED`.
- `422`: Validation error

## Changes

- **2026-11-03** `2ce09d50369c`: 1 info
  - added the non-success response with the status `403`
- **2026-09-29** `9c2efef77ec1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/changes/api/v1/workspaces/:workspace_id/analytics/share-links/post.md)

---

[API](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1.md) - [All operations](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/contentstudio/apis/contentstudio-api-v1/revisions/2ce09d50369c?raw)
