---
title: "Generate (or return existing) a share token for the intent, used to build public review links. Idempotent: returns the existing token if one is already set."
method: POST
path: "/api/v1/intents/{id}/share"
tags: ["intents"]
---

# Generate (or return existing) a share token for the intent, used to build public review links. Idempotent: returns the existing token if one is already set.

`POST /api/v1/intents/{id}/share`

token is a raw crypto.randomUUID() (v4 UUID, no prefix), generated by reviewService.generateShareToken and persisted to intent_specs.share_token. No 201 — created and pre-existing tokens both return 200. No rate limiter on this route.

## Path parameters

- `id` string, required

## Query parameters

- `workspace_id` string

## Response `200`

Returns { token } (existing or newly generated)

- object

## Other responses

- `401` — Missing/invalid API key or session
- `403` — Authenticated but lacks write scope
- `404` — Intent not found in this workspace
- `500` — Failed to generate share link

## Changes

- **2026-08-23** `155c812b368b` — 4 info
  - added the optional property `details` to the response with the `401` status
  - added the optional property `details` to the response with the `403` status
  - added the optional property `details` to the response with the `404` status
  - added the optional property `details` to the response with the `500` status

[Change history](https://skmtc.dev/pathmode/apis/pathmode-api/changes/api/v1/intents/:id/share/post.md)

---

[API](https://skmtc.dev/pathmode/apis/pathmode-api.md) · [All operations](https://skmtc.dev/pathmode/apis/pathmode-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pathmode/pathmode-api/revisions/e419abb0a327/schema)
