コンテンツにスキップ

/v0/notes

POST
/v0/notes
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": "" }'
Media type application/json
object
content
required

Note content (max 3000 characters/if attachment file exists, allow 0 character)

string
"" <= 3000 characters
Example
hello world!
visibility
required

Note visibility (PUBLIC/HOME/FOLLOWERS/DIRECT)

string
default: PUBLIC
Example
PUBLIC
attachment_file_ids
required

Attachment file IDs (max 16 files)

Array<string>
default: <= 16 items
Example
[
"38477395",
"38477396"
]
contents_warning_comment
required

Contents warning comment (max 256 characters)

string
"" <= 256 characters
Example
This note contains sensitive content
send_to

Send to account ID (if visibility is DIRECT)

string
""
Example
38477395

OK

Media type application/json
object
id
required

Note ID

string
content
required

Note content

string
visibility
required

Note visibility

string
contents_warning_comment
required

Contents warning comment

string
send_to

Send to account ID

string
author_id
required

Author account ID

string
created_at
required

Note created date

string
attachment_files
required

Note Attachment Media

Array<object>
<= 16 items
object
id
required

Attachment Medium id

string
name
required

Attachment filename

string
author_id
required

Attachment author account id

string
hash
required

Attachment medium blurhash

string
mime
required

Attachment medium mime type

string
nsfw
required

If true, attachment is nsfw

boolean
url
required

Attachment medium url

string format: uri
thumbnail
required

Attachment thumbnail url

string
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

Media type application/json
object
error
required
Any of:

This note has too many attachments

string
Allowed values: TOO_MANY_ATTACHMENTS
Example
{
"error": "TOO_MANY_ATTACHMENTS"
}

You are silenced

Media type application/json

You can’t set note visibility to PUBLIC

object
error
required

You are silenced (You cannot set visibility to public

string
Allowed values: YOU_ARE_SILENCED
Example
{
"error": "YOU_ARE_SILENCED"
}

Not Found

Media type application/json
object
error
required
Any of:

Attachment not found

string
Allowed values: ATTACHMENT_NOT_FOUND
Example
{
"error": "ATTACHMENT_NOT_FOUND"
}

Internal Server Error

Media type application/json

Internal Error

object
error
required

Internal Error

string
Allowed values: INTERNAL_ERROR
Example
{
"error": "INTERNAL_ERROR"
}