Flambe docs

Create a share link

Mints an unlisted public URL for one resource. Anyone with the link can view it without signing in, so treat the token as a secret. Share links are deliberately excluded from `sitemap.xml` and disallowed in `robots.txt`.

POST
/api/share-links

Mints an unlisted public URL for one resource. Anyone with the link can view it without signing in, so treat the token as a secret. Share links are deliberately excluded from sitemap.xml and disallowed in robots.txt.

Authorization

bearerAuth
AuthorizationBearer <token>

A Clerk session JWT. Obtain one with a Clerk frontend SDK (session.getToken()) or, for server-to-server use, with a Clerk machine token. The token's sub claim is the Flambe user id that scopes every request.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/share-links" \  -H "Content-Type: application/json" \  -d '{    "resource_type": "recipe",    "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "token": "string",  "resource_type": "recipe",  "resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",  "created_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z"}