Public API
Public Markdown API
Approved API consumers can retrieve the current public version of a published SOP as Markdown.
Overview
The endpoint returns only SOPs that are currently published publicly. Private, archived, internal-only and unavailable SOPs are not exposed through this interface.
Authentication Header
Send a public Markdown API key in the request header. Do not place keys in URLs, screenshots, logs or browser-based tools.
X-StoryCrumb-Api-Key: YOUR_API_KEY
Path Parameter
| Name | Description |
|---|---|
| slug | The public SOP slug shown in the public SOP URL. |
Example Request
curl --request GET \
--header "X-StoryCrumb-Api-Key: YOUR_API_KEY" \
--header "Accept: text/markdown" \
"https://PUBLIC_HOST/api/public/sops/example-sop/markdown"
PUBLIC_HOST and YOUR_API_KEY are placeholders.
Successful Response
HTTP/1.1 200 OK
Content-Type: text/markdown; charset=utf-8
# Example SOP
Summary for the public SOP.
## 1. First step
Step instructions.
Error Responses
| Status | When |
|---|---|
| 401 | The API key is missing, invalid, expired, revoked or not scoped for public Markdown reads. |
| 404 | The public SOP is unavailable. This response does not reveal whether a private SOP exists. |
| 406 | The request does not accept text/markdown. |
| 429 | The public API-key rate limit has been exceeded. |
Error bodies use the StoryCrumb safe error contract and include a correlation identifier.
Key Security
- Keys are secrets and are shown once when created by an administrator.
- Store keys in a secret manager or protected server-side configuration.
- Rotate or revoke keys when access is no longer required.
- Do not embed keys in client-side JavaScript or third-party documentation consoles.
Rate Limit
The current implementation permits 120 requests per minute per API-key header value.