/v0/notes
const url = 'http://localhost:3000/v0/notes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"content":"","visibility":"PUBLIC","attachment_file_ids":[],"contents_warning_comment":"","send_to":""}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/v0/notes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "content": "", "visibility": "PUBLIC", "attachment_file_ids": [], "contents_warning_comment": "", "send_to": "" }'Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”object
Note content (max 3000 characters/if attachment file exists, allow 0 character)
Example
hello world!Note visibility (PUBLIC/HOME/FOLLOWERS/DIRECT)
Example
PUBLICAttachment file IDs (max 16 files)
Example
[ "38477395", "38477396"]Contents warning comment (max 256 characters)
Example
This note contains sensitive contentSend to account ID (if visibility is DIRECT)
Example
38477395Responses
Section titled “ Responses ”OK
object
Note ID
Note content
Note visibility
Contents warning comment
Send to account ID
Author account ID
Note created date
Note Attachment Media
object
Attachment Medium id
Attachment filename
Attachment author account id
Attachment medium blurhash
Attachment medium mime type
If true, attachment is nsfw
Attachment medium url
Attachment thumbnail url
Example
{ "id": "38477395", "content": "hello world!", "visibility": "PUBLIC", "contents_warning_comment": "This note contains sensitive content", "send_to": "38477395", "author_id": "38477395", "created_at": "2021-01-01T00:00:00Z", "attachment_files": [ { "id": "39783475", "name": "image.jpg", "author_id": "309823457", "hash": "e9f*5oin{dn", "mime": "image/jpeg", "nsfw": false, "url": "https://images.example.com/image.webp", "thumbnail": "https://images.example.com/image_thumbnail.webp" } ]}Bad Request
You are silenced
You can’t set note visibility to PUBLIC
object
You are silenced (You cannot set visibility to public
Example
{ "error": "YOU_ARE_SILENCED"}Not Found
Internal Server Error
Internal Error
object
Internal Error
Example
{ "error": "INTERNAL_ERROR"}