---
title: "Create Share Link"
method: POST
path: "/api/share-links"
tags: ["Share Links"]
---

# Create Share Link

`POST /api/share-links`

## Request

- Base URL: `https://api.flagpost.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flagpost.ai/api/share-links`
- Auth: HTTP bearer

Create a shareable link for a business's data collection portal.

Sellers can use this link to upload documents without logging in.
Optionally restrict to specific email addresses via allowed_emails.

## Request body

- CreateShareLinkRequest: Request to create a share link.
  - `business_id` string, required
  - `expires_in_days` integer, nullable
  - `max_uses` integer, nullable
  - `allowed_emails` string[], required
  - `request_list_id` string, nullable

## Response `200`

Successful Response

- ShareLinkResponse: Share link details.
  - `id` string, required
  - `business_id` string, required
  - `token` string, required
  - `url` string, required
  - `expires_at` string, nullable, required
  - `max_uses` integer, nullable, required
  - `use_count` integer, required
  - `is_active` boolean, required
  - `created_at` string, required
  - `allowed_emails` string[], required
  - `request_list_id` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/flagpost/apis/flagpost-api.md) - [All operations](https://skmtc.dev/flagpost/apis/flagpost-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flagpost/apis/flagpost-api/revisions/0308cef485ca?raw)
