Posts
5 Posts routes on the FLAM API.
Base URL https://api.flam.fashion. Send Authorization: Bearer flam_sk_… on every call; a handful of routes are session-only and say so. How keys and roles work.
GET /posts
Responses
| Status | Meaning |
|---|---|
200 | All posts |
200 returns:
[
{
"id": "p_abc123",
"title": "Hello world",
"body": "My first post.",
"authorId": "u_abc123",
"createdAt": "2026-07-01T12:00:00.000Z",
"updatedAt": "2026-07-01T12:00:00.000Z"
}
]Call it
curl -X GET "https://api.flam.fashion/posts" \
-H "Authorization: Bearer $FLAM_API_KEY"POST /posts
Request body — application/json
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | yes | — |
body | string | yes | — |
{
"title": "string",
"body": "string"
}Responses
| Status | Meaning |
|---|---|
201 | Created post |
401 | Unauthorized |
201 returns:
{
"id": "p_abc123",
"title": "Hello world",
"body": "My first post.",
"authorId": "u_abc123",
"createdAt": "2026-07-01T12:00:00.000Z",
"updatedAt": "2026-07-01T12:00:00.000Z"
}Call it
curl -X POST "https://api.flam.fashion/posts" \
-H "Authorization: Bearer $FLAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"string","body":"string"}'DELETE /posts/{id}
Parameters
| In | Name | Type | Required | Notes |
|---|---|---|---|---|
| path | id | string | yes | — |
Responses
| Status | Meaning |
|---|---|
204 | Deleted |
401 | Unauthorized |
403 | Forbidden — not the author |
404 | Not found |
Call it
curl -X DELETE "https://api.flam.fashion/posts/{id}" \
-H "Authorization: Bearer $FLAM_API_KEY"GET /posts/{id}
Parameters
| In | Name | Type | Required | Notes |
|---|---|---|---|---|
| path | id | string | yes | — |
Responses
| Status | Meaning |
|---|---|
200 | The post |
404 | Not found |
200 returns:
{
"id": "p_abc123",
"title": "Hello world",
"body": "My first post.",
"authorId": "u_abc123",
"createdAt": "2026-07-01T12:00:00.000Z",
"updatedAt": "2026-07-01T12:00:00.000Z"
}Call it
curl -X GET "https://api.flam.fashion/posts/{id}" \
-H "Authorization: Bearer $FLAM_API_KEY"PATCH /posts/{id}
Parameters
| In | Name | Type | Required | Notes |
|---|---|---|---|---|
| path | id | string | yes | — |
Request body — application/json
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | no | — |
body | string | no | — |
{
"title": "string",
"body": "string"
}Responses
| Status | Meaning |
|---|---|
200 | Updated post |
401 | Unauthorized |
403 | Forbidden — not the author |
404 | Not found |
200 returns:
{
"id": "p_abc123",
"title": "Hello world",
"body": "My first post.",
"authorId": "u_abc123",
"createdAt": "2026-07-01T12:00:00.000Z",
"updatedAt": "2026-07-01T12:00:00.000Z"
}Call it
curl -X PATCH "https://api.flam.fashion/posts/{id}" \
-H "Authorization: Bearer $FLAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"string","body":"string"}'