Skip to content

Post a story

POST
/api/stories
curl --request POST \
--url http://localhost:3001/api/stories \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "allowed_list": [ "example" ], "blocked_list": [ "example" ], "content": "example", "duration": 1, "height": 1, "media_data": "example", "media_type": "example", "mime_type": "example", "privacy_level": "example", "width": 1 }'

Create a new story with media (image or video) that expires in 24 hours

Story creation request

Media typeapplication/json
object
allowed_list

Addresses allowed to view (for “custom” privacy)

Array<string>
blocked_list

Addresses blocked from viewing (for “custom” privacy)

Array<string>
content

Story caption/text

string
duration

Video duration in milliseconds (0 for images)

integer
height

Media height in pixels

integer
media_data

Base64-encoded media (image/video)

string
media_type

“image” or “video”

string
mime_type

MIME type (e.g., “image/jpeg”, “video/mp4”)

string
privacy_level

“all”, “contacts”, “custom”

string
width

Media width in pixels

integer
Examplegenerated
{
"allowed_list": [
"example"
],
"blocked_list": [
"example"
],
"content": "example",
"duration": 1,
"height": 1,
"media_data": "example",
"media_type": "example",
"mime_type": "example",
"privacy_level": "example",
"width": 1
}

OK

Media typeapplication/json
object
chunk_id

MeshStorage chunk ID

integer
expires_at

Expiration timestamp (Unix seconds)

integer
message
string
story_id

Story ID (hex-encoded)

string
success
boolean
Examplegenerated
{
"chunk_id": 1,
"expires_at": 1,
"message": "example",
"story_id": "example",
"success": true
}

Bad Request

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}

Unauthorized

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}

Internal Server Error

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}