Documentation menu
Media
Upload and remove images and videos used in posts.
POST /media
Requires Authorization: Bearer <token>.
Request body (multipart/form-data)
| Field | Type | Notes |
|---|---|---|
file | string | max 8192format: binary |
url | string | format: uri |
alt_text | stringnullable | max 1000 |
Example request
curl -X POST 'https://app.shoutrrr.com/api/v1/media' \
-H 'Authorization: Bearer <token>' \
-F 'file=@/path/to/file' \
-F 'url=https://example.com/image.jpg' \
-F 'alt_text=string' const form = new FormData();
form.append('file', fileInput.files[0]); // @/path/to/file
form.append('url', "https://example.com/image.jpg");
form.append('alt_text', "string");
const res = await fetch('https://app.shoutrrr.com/api/v1/media', {
method: 'POST',
headers: {
'Authorization': 'Bearer <token>',
},
body: form,
});
const data = await res.json(); import requests
res = requests.post(
'https://app.shoutrrr.com/api/v1/media',
headers={'Authorization': 'Bearer <token>'},
files={'file': open('/path/to/file', 'rb')},
data={'url': 'https://example.com/image.jpg', 'alt_text': 'string'},
)
data = res.json() <?php
$ch = curl_init('https://app.shoutrrr.com/api/v1/media');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => [
'file' => new CURLFile('/path/to/file'),
'url' => 'https://example.com/image.jpg',
'alt_text' => 'string',
],
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$data = json_decode(curl_exec($ch), true); Responses
201
| Field | Type | Notes |
|---|---|---|
idrequired | string | — |
mimerequired | string | — |
widthrequired | integernullable | — |
heightrequired | integernullable | — |
alt_textrequired | stringnullable | — |
401 Unauthenticated
| Field | Type | Notes |
|---|---|---|
messagerequiredError overview. | string | — |
403 Authorization error
| Field | Type | Notes |
|---|---|---|
messagerequiredError overview. | string | — |
422 Validation error
| Field | Type | Notes |
|---|---|---|
messagerequiredErrors overview. | string | — |
errorsrequiredA detailed description of each field that failed validation. | object | — |
DELETE /media/{mediaId}
Requires Authorization: Bearer <token>.
Path parameters
| Field | Type | Notes |
|---|---|---|
mediaIdrequired | string | — |
Example request
curl -X DELETE 'https://app.shoutrrr.com/api/v1/media/{mediaId}' \
-H 'Authorization: Bearer <token>' const res = await fetch('https://app.shoutrrr.com/api/v1/media/{mediaId}', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>',
},
});
const data = await res.json(); import requests
res = requests.delete(
'https://app.shoutrrr.com/api/v1/media/{mediaId}',
headers={'Authorization': 'Bearer <token>'},
)
data = res.json() <?php
$ch = curl_init('https://app.shoutrrr.com/api/v1/media/{mediaId}');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$data = json_decode(curl_exec($ch), true); Responses
200
| Field | Type | Notes |
|---|---|---|
deletedrequired | boolean | — |
idrequired | string | — |
401 Unauthenticated
| Field | Type | Notes |
|---|---|---|
messagerequiredError overview. | string | — |