Skip to content

Media

Upload media first, then attach it to a post using the id and path returned.

POST /public/v1/upload

Send the file as multipart/form-data in a field named file:

Terminal window
curl https://app.beeive.com/public/v1/upload \
-X POST \
-H "Authorization: YOUR_API_KEY" \
-F "file=@./photo.jpg"

The response includes the new media’s id and path:

{
"id": "clx5m6n7o0001",
"name": "photo.jpg",
"path": "https://..."
}
POST /public/v1/upload-from-url

Beeive downloads the file from a public URL and saves it to your media library.

Terminal window
curl https://app.beeive.com/public/v1/upload-from-url \
-X POST \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/photo.jpg" }'

The response has the same id and path as a file upload. If Beeive can’t download the file, you get 400 Failed to fetch URL.

Pass the id and path in the post’s image array:

"value": [
{
"content": "Look at this!",
"image": [{ "id": "clx5m6n7o0001", "path": "https://..." }]
}
]

See Create a post.