Requires posts:read.
Authorization
bearerAuth API key starting with fh_
In: header
Path Parameters
Media id
^med_[0-9a-fA-F]{32}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://feedhorizon.com/api/v1/media/med_0195f0a27b3c7d4e8f5a1b2c3d4e5f60"{
"data": {
"id": "med_0195f0a27b3c7d4e8f5a1b2c3d4e5f60",
"url": "string",
"filename": "string",
"mimeType": "string",
"sizeBytes": 0,
"createdAt": "2019-08-24T14:15:22Z"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}{
"error": {
"type": "invalid_request_error",
"code": "string",
"message": "string",
"param": "string",
"details": [
{
"param": "string",
"code": "string",
"message": "string"
}
],
"docUrl": "http://example.com",
"requestId": "string"
}
}List media files GET
Newest first. Requires `posts:read`.
Add a media file POST
Two ways to add a file, then pass its `id` in `mediaIds` when creating or updating a post. - **Import from a URL**: send `url` (public https, up to 100 MB). FeedHorizon downloads it and answers when it is stored. Easiest for agents and scripts. - **Upload**: send `filename`, `mimeType` and `sizeBytes` (up to 5 GB). The answer carries `upload.url`; `PUT` the raw bytes there with the same `Content-Type` within two hours. No API key is needed for that request. Supported types: image/jpeg, image/png, image/gif, image/webp, video/mp4, video/quicktime, video/webm, application/pdf. Which platform takes which type is listed under `GET /platforms`. Requires `posts:write`.