media
Attach media to authored statuses.
Upload media as attachment
POST
https://mastodon.example/api/v1/media
Creates an attachment to be used with a new status.
Returns: Attachment
OAuth: User token + write:media
Version history:
0.0.0 - added
2.3.0 - add focus
parameter
Headers
Authorization
string
Bearer <user token>
Request Body
file
object
The file to be attached, using multipart form data.
description
string
A plain-text description of the media, for accessibility purposes.
focus
string
Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0
Update attachment
PUT
https://mastodon.example/api/v1/media/:id
Update an Attachment, before it is attached to a status and posted.
Returns: Attachment
OAuth: User token + write:media
Version history:
0.0.0 - added
Path Parameters
:id
string
The id of the Attachment entity to be updated
Headers
Authorization
string
Bearer <user token>
Request Body
file
object
The file to be attached, using multipart form data.
description
string
A plain-text description of the media, for accessibility purposes.
focus
string
Two floating points (x,y), comma-delimited ranging from -1.0 to 1.0
Focal points
Last updated
Was this helpful?