Moekura API version 0.4.0
Read and change a Moekura site: search and upload posts, edit tags, moderate. Responses are JSON; errors look like {"error": {"status": 404, "message": "Not found"}}.
Send an API key (created in your account settings) as Authorization: Bearer <key>. Without one, requests are made as a logged-out visitor and can do what visitors can on the site.
Authentication
Create an API key on your API keys page and send it with every request:
curl -H "Authorization: Bearer mka_…" https://booru.desuwa.moe/api/v1/me
A key acts as you, with your role's permissions; while you're banned it can only read. The machine-readable description of everything below is at /api/v1/openapi.json (OpenAPI 3.1), for generating clients.
Posts
Searching, viewing and changing posts.
GET /posts
Search posts
Uses the same syntax as the site (see the search help). Blacklists aren't applied: clients filter as they like. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
tags | query | string | A search, written as in the site's search box ( |
page | query | string | A page number, or a cursor from a previous response's |
limit | query | integer | Posts per page, up to the site's maximum. Defaults to the site's page size. |
Responses
POST /posts
Upload a post
Needs upload. The post is pending when the site reviews uploads and you lack upload_without_approval. Thumbnails are made in the background: file.processed turns true when they're ready.
Request body
UploadRequest as multipart/form-data
Responses
GET /posts/{id}
Get a post
Needs view_posts. Pending posts are visible to their uploader and to moderators, deleted ones only to moderators.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
PATCH /posts/{id}
Edit a post
Needs edit_posts. Tag changes are applied to the post's tags as they are when the change is saved, so edits made meanwhile by others are kept. Every change is recorded in the post's history.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Request body
PostChanges as application/json
Responses
PUT /posts/{id}/favorite
Favorite a post
Needs favorite. Favoriting twice is harmless.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
DELETE /posts/{id}/favorite
Unfavorite a post
Needs favorite.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
POST /posts/{id}/flags
Flag a post for deletion
Needs flag. Moderators review flags; a post can't have two open flags from the same user.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Request body
NewFlag as application/json
Responses
204 | Flagged | |
400 | ErrorBody | No reason, or the post can't be flagged now |
GET /posts/{id}/versions
List a post's history
Newest first, at most 500 versions. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
200 | array of ApiVersion | OK |
404 | ErrorBody | Not Found |
PUT /posts/{id}/vote
Vote on a post
Needs vote. A new vote replaces your earlier one.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Request body
Vote as application/json
Responses
Users
Users and the account making the request.
GET /favorite-groups
List a user's favorite groups
Their public groups by name, or all of yours. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
user | query | string | Whose groups (a name); yours when left out. |
Responses
200 | array of ApiFavoriteGroup | OK |
404 | ErrorBody | Not Found |
POST /favorite-groups
Create a favorite group
Needs favorite; at most 100 each.
Request body
GroupInput as application/json
Responses
201 | ApiFavoriteGroupWithPosts | Created |
422 | ErrorBody | Unprocessable Entity |
GET /favorite-groups/{id}
Get a favorite group
Public groups, and your own private ones. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Group number |
Responses
200 | ApiFavoriteGroupWithPosts | OK |
404 | ErrorBody | Not Found |
PUT /favorite-groups/{id}
Change your favorite group
Fields left out stay as they are.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Group number |
Request body
GroupInput as application/json
Responses
200 | ApiFavoriteGroupWithPosts | OK |
403 | ErrorBody | Forbidden |
422 | ErrorBody | Unprocessable Entity |
DELETE /favorite-groups/{id}
Delete your favorite group
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Group number |
Responses
POST /favorite-groups/{id}/posts
Add a post to the end of your favorite group
Adding a post that's already there changes nothing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Group number |
Request body
GroupPost as application/json
Responses
200 | ApiFavoriteGroupWithPosts | OK |
404 | ErrorBody | Not Found |
DELETE /favorite-groups/{id}/posts/{post_id}
Take a post out of your favorite group
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Group number |
post_id required | path | integer | Post number |
Responses
204 | No Content | |
404 | ErrorBody | Not Found |
GET /me
Get your account
Needs authentication.
Responses
GET /saved-searches
Your saved searches
By query. Search them together with search:all or search:<label>.
Responses
200 | array of ApiSavedSearch | OK |
401 | ErrorBody | Unauthorized |
POST /saved-searches
Save a search
Saving a search you already saved replaces its labels. At most 100.
Request body
SavedSearchInput as application/json
Responses
200 | ApiSavedSearch | OK |
422 | ErrorBody | Unprocessable Entity |
PUT /saved-searches/{id}
Change a saved search
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Saved search number |
Request body
SavedSearchInput as application/json
Responses
200 | ApiSavedSearch | OK |
404 | ErrorBody | Not Found |
422 | ErrorBody | Unprocessable Entity |
DELETE /saved-searches/{id}
Remove a saved search
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Saved search number |
Responses
204 | No Content | |
404 | ErrorBody | Not Found |
GET /users/{name}
Get a user
Needs view_posts. Only users who can manage users see inactive accounts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name required | path | string | Case-insensitive |
Responses
Wiki
Wiki pages about tags, and their history.
GET /wiki-pages
List wiki pages
Most recently changed first, 50 per page. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
title | query | string | A title prefix, or a pattern with |
page | query | integer | 1-based. |
Responses
200 | WikiPageList | OK |
400 | ErrorBody | Bad Request |
GET /wiki-pages/{title}
Get a wiki page
Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
title required | path | string | The tag name the page is about |
Responses
200 | ApiWikiPage | OK |
404 | ErrorBody | Not Found |
PUT /wiki-pages/{title}
Create or change a wiki page
Needs edit_wiki. Saving the text the page already has changes nothing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
title required | path | string | The tag name the page is about |
Request body
WikiChanges as application/json
Responses
200 | ApiWikiPage | OK |
409 | ErrorBody | The page changed since |
422 | ErrorBody | The title isn't a valid tag name, or the text is empty or too long |
GET /wiki-pages/{title}/versions
A wiki page's history
Every version's text, newest first (at most 500). Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
title required | path | string | The tag name the page is about |
Responses
200 | array of ApiWikiVersion | OK |
404 | ErrorBody | Not Found |
Comments
Comments on posts, their votes and reports.
GET /comments
List comments
Newest first, 50 at a time, on posts you can see. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
post_id | query | integer | Only comments on this post. |
user | query | string | Only comments by this user (a name). |
before | query | integer | Only comments older than this one, for the next page. |
Responses
200 | CommentList | OK |
404 | ErrorBody | No such user |
GET /comments/{id}
Get a comment
Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Comment number |
Responses
200 | ApiComment | OK |
404 | ErrorBody | Not Found |
PUT /comments/{id}
Change your comment
Needs comment; only the author changes a comment.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Comment number |
Request body
CommentText as application/json
Responses
200 | ApiComment | OK |
403 | ErrorBody | Forbidden |
422 | ErrorBody | Unprocessable Entity |
DELETE /comments/{id}
Delete your comment
Needs comment; only the author deletes a comment this way (staff hide it instead).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Comment number |
Responses
POST /comments/{id}/report
Report a comment
Needs flag. Staff find reported comments under Moderation.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Comment number |
Request body
Reason as application/json
Responses
204 | No Content | |
400 | ErrorBody | No reason, or already reported |
PUT /comments/{id}/vote
Vote on a comment
Needs vote; not on your own comments.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Comment number |
Request body
CommentVote as application/json
Responses
200 | CommentScore | OK |
404 | ErrorBody | Not Found |
422 | ErrorBody | Unprocessable Entity |
POST /posts/{id}/comments
Comment on a post
Needs comment. Rate limited; deleted posts can't be commented on.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Request body
CommentText as application/json
Responses
201 | ApiComment | Created |
404 | ErrorBody | Not Found |
422 | ErrorBody | The text is empty or too long, or the post is deleted |
429 | ErrorBody | Too Many Requests |
Pools
Ordered collections of posts, and their history.
GET /pools
List pools
Most recently changed first, 50 per page. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name | query | string | A name prefix, or a pattern with |
category | query | string |
|
page | query | integer | 1-based. |
Responses
POST /pools
Create a pool
Needs edit_pools.
Request body
NewPool as application/json
Responses
201 | ApiPoolWithPosts | Created |
422 | ErrorBody | A bad or taken name, or posts that don't exist |
GET /pools/{id}
Get a pool
Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Pool number |
Responses
200 | ApiPoolWithPosts | OK |
404 | ErrorBody | Not Found |
PUT /pools/{id}
Change a pool
Needs edit_pools. Fields left out stay as they are.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Pool number |
Request body
PoolChanges as application/json
Responses
200 | ApiPoolWithPosts | OK |
409 | ErrorBody | The pool changed since |
422 | ErrorBody | Unprocessable Entity |
DELETE /pools/{id}
Delete a pool
Needs delete_posts; logged. It can be restored.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Pool number |
Responses
204 | No Content | |
404 | ErrorBody | Not Found |
POST /pools/{id}/posts
Add a post to the end of a pool
Needs edit_pools.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Pool number |
Request body
PoolPost as application/json
Responses
200 | ApiPoolWithPosts | OK |
422 | ErrorBody | Already in the pool, deleted, or the pool is full |
POST /pools/{id}/restore
Restore a deleted pool
Needs delete_posts; logged.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Pool number |
Responses
204 | No Content | |
404 | ErrorBody | Not Found |
GET /pools/{id}/versions
A pool's history
Every version, newest first (at most 500). Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Pool number |
Responses
200 | array of ApiPoolVersion | OK |
404 | ErrorBody | Not Found |
Notes
Notes (translations) on posts' images, and their history.
GET /notes/{id}
Get a note
Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Note number |
Responses
PUT /notes/{id}
Change a note
Needs edit_notes. Fields left out stay as they are.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Note number |
Request body
NoteChanges as application/json
Responses
DELETE /notes/{id}
Delete a note
Needs edit_notes. It stays in the history and can be restored.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Note number |
base_version | query | integer | Refuse with 409 if the note changed since this version. |
Responses
GET /notes/{id}/versions
A note's history
Every version, newest first (at most 500). Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Note number |
Responses
200 | array of ApiNoteVersion | OK |
404 | ErrorBody | Not Found |
GET /posts/{id}/notes
A post's notes
Oldest first. Needs view_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
include_deleted | query | boolean | Deleted notes too (for those who may edit notes). |
Responses
POST /posts/{id}/notes
Add a note to a post
Needs edit_notes. Not on deleted posts; at most 500 per post.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Request body
NewNote as application/json
Responses
Moderation
Reviewing posts and flags, deciding tag relations, bans and the moderation log.
GET /bans
List active bans
Needs ban_users.
Responses
POST /comments/{id}/hide
Hide a comment
Needs moderate_comments. Upholds the comment's open reports; logged.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Comment number |
Request body
Reason as application/json
Responses
200 | ApiComment | OK |
400 | ErrorBody | Already hidden |
POST /comments/{id}/restore
Restore a hidden or deleted comment
Needs moderate_comments; logged.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Comment number |
Responses
200 | ApiComment | OK |
400 | ErrorBody | Not hidden |
GET /flags
List open flags
Needs approve_posts. The posts whose flags have waited longest, by post number, each with its open flags.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Posts to return, up to 100. |
Responses
200 | array of FlaggedPost | OK |
403 | ErrorBody | You can't review flags |
GET /moderation/log
Read the moderation log
Needs view_audit_log.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
action | query | string | Only this kind of action ( |
actor | query | string | Only actions by this user. |
post_id | query | integer | Only actions on this post. |
user | query | string | Only actions on this user. |
before | query | integer | Entries older than this id: a previous page's |
Responses
POST /network-bans
Ban a network
Needs ban_users. Requests from the network can read but not change anything, and it can't register or log in.
Request body
NewNetworkBan as application/json
Responses
201 | ApiNetworkBan | Created |
400 | ErrorBody | The range isn't valid, is too wide, or includes your address |
DELETE /network-bans/{id}
Lift a network ban
Needs ban_users.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Network ban id |
Responses
204 | Lifted | |
404 | ErrorBody | Not Found |
POST /posts/{id}/approve
Approve a pending post
Needs approve_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
POST /posts/{id}/delete
Delete a post
Needs delete_posts. Deleted posts stay visible to moderators and can be restored; open flags on the post are upheld.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Request body
Reason as application/json
Responses
POST /posts/{id}/flags/dismiss
Dismiss a post's flags
Needs approve_posts. The post stays, and is no longer flagged.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
POST /posts/{id}/purge
Purge a deleted post
Needs purge_posts. The post, its files and its history are removed for good by a background job shortly after.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
202 | The purge is queued | |
400 | ErrorBody | Only deleted posts can be purged |
POST /posts/{id}/reject
Reject a pending post
Needs approve_posts. The post is deleted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Request body
Reason as application/json
Responses
POST /posts/{id}/restore
Restore a deleted post
Needs delete_posts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Post number |
Responses
DELETE /tag-relations/{id}
Remove a tag relation
Ends an active relation (needs manage_tags; posts keep their tags), or withdraws a pending request (its creator may too).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Relation id |
Responses
200 | ApiRelation | OK |
403 | ErrorBody | Forbidden |
POST /tag-relations/{id}/approve
Approve a tag relation
Needs manage_tags. It's then applied to existing posts in the background.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Relation id |
Responses
200 | ApiRelation | OK |
422 | ErrorBody | It isn't pending, or it conflicts with active relations |
POST /tag-relations/{id}/reject
Reject a tag relation
Needs manage_tags.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | integer | Relation id |
Responses
200 | ApiRelation | OK |
422 | ErrorBody | It isn't pending |
POST /users/{name}/ban
Ban a user
Needs ban_users and a role ranked above the user's. Banned users can look around as visitors do, but can't change anything.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name required | path | string | Case-insensitive |
Request body
NewBan as application/json
Responses
204 | Banned | |
403 | ErrorBody | You can't ban this user |
DELETE /users/{name}/ban
Lift a user's ban
Needs ban_users and a role ranked above the user's.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name required | path | string | Case-insensitive |
Responses
204 | Lifted | |
400 | ErrorBody | The user isn't banned |
Schemas
ApiActiveBan
| Field | Type | Description |
|---|---|---|
reason required | string | |
expires_at | date-time string or null |
|
ApiBan
| Field | Type | Description |
|---|---|---|
id required | integer | |
user required | string | |
reason required | string | |
banner | string or null | |
created_at required | date-time string | |
expires_at | date-time string or null |
|
ApiComment
| Field | Type | Description |
|---|---|---|
id required | integer | |
post_id required | integer | |
creator | string or null | The author's name, unless their account is gone. |
body required | string | The text, in the site's wiki markup. |
html required | string |
|
score required | integer | |
is_deleted required | boolean | Only staff see deleted comments. |
created_at required | date-time string | |
edited_at | date-time string or null |
ApiCount
How many posts match. Large counts are estimated.
| Field | Type | Description |
|---|---|---|
value required | integer | |
accuracy required | string |
|
ApiFavoriteGroup
| Field | Type | Description |
|---|---|---|
id required | integer | |
creator required | string | |
name required | string | Spaces are underscores. |
is_public required | boolean | |
post_count required | integer | All its posts, including those you can't see. |
created_at required | date-time string | |
updated_at required | date-time string |
ApiFavoriteGroupWithPosts
any
ApiFile
The original file.
| Field | Type | Description |
|---|---|---|
url required | string | On private sites this link expires after an hour or two. |
media_type required | string |
|
width required | integer | |
height required | integer | |
size required | integer | In bytes. |
duration_ms | integer or null | |
frames required | integer | More than 1 for animations. |
has_audio required | boolean | |
sha256 required | string | Hex. |
md5 required | string | Hex. |
processed required | boolean | Whether thumbnails and the perceptual hash are done. |
ApiFlag
| Field | Type | Description |
|---|---|---|
creator | string or null | |
reason required | string | |
created_at required | date-time string |
ApiMe
The account making the request.
| Field | Type | Description |
|---|---|---|
name required | string | |
role required | string | |
permissions required | array of string | What this account may do now ( |
settings required | ApiSettings | |
ban | ApiActiveBan or null | Set while banned. |
uploads required | ApiUploadAllowance |
ApiNetworkBan
| Field | Type | Description |
|---|---|---|
id required | integer | |
network required | string | A CIDR range. |
reason required | string | |
banner | string or null | |
created_at required | date-time string | |
expires_at | date-time string or null |
ApiNote
| Field | Type | Description |
|---|---|---|
id required | integer | |
post_id required | integer | |
x required | integer | The box, in the original image's pixels. |
y required | integer | |
width required | integer | |
height required | integer | |
body required | string | In the site's wiki markup. |
html required | string |
|
is_active required | boolean | False once deleted. |
version required | integer | Counts up with every change; send it back when changing the note. |
updater | string or null | |
created_at required | date-time string | |
updated_at required | date-time string |
ApiNoteVersion
| Field | Type | Description |
|---|---|---|
note_id required | integer | |
post_id required | integer | |
version required | integer | |
updater | string or null | |
x required | integer | |
y required | integer | |
width required | integer | |
height required | integer | |
body required | string | |
is_active required | boolean | |
created_at required | date-time string |
ApiPool
| Field | Type | Description |
|---|---|---|
id required | integer | |
name required | string | Spaces are underscores. |
description required | string | In the site's wiki markup. |
category required | string |
|
is_deleted required | boolean | |
version required | integer | Counts up with every change; send it back when saving. |
updater | string or null | |
post_count required | integer | All its posts, including those you can't see. |
created_at required | date-time string | |
updated_at required | date-time string |
ApiPoolVersion
| Field | Type | Description |
|---|---|---|
version required | integer | |
updater | string or null | |
name required | string | |
description required | string | |
category required | string | |
is_deleted required | boolean | |
post_ids required | array of integer | |
created_at required | date-time string |
ApiPoolWithPosts
any
ApiPost
A post with its tags and files.
| Field | Type | Description |
|---|---|---|
id required | integer | |
rating required | string |
|
status required | string |
|
source required | string | |
description required | string | |
parent_id | integer or null | |
score required | integer | |
fav_count required | integer | |
comment_count required | integer | Comments that aren't deleted. |
last_commented_at | date-time string or null | When the newest of those was written. |
note_count required | integer | Notes that aren't deleted. |
last_noted_at | date-time string or null | When a note was last changed. |
uploader | string or null | The uploader's name, unless their account is gone. |
created_at required | date-time string | |
tags required | array of PostTag | Sorted by name. |
file required | ApiFile | |
variants required | array of ApiVariant | Smaller renditions ( |
ApiRelation
| Field | Type | Description |
|---|---|---|
id required | integer | |
kind required | string |
|
antecedent required | string | |
consequent required | string | |
status required | string |
|
reason required | string | Why it was requested. |
creator | string or null | |
approver | string or null | |
created_at required | date-time string | |
updated_at required | date-time string |
ApiSavedSearch
| Field | Type | Description |
|---|---|---|
id required | integer | |
query required | string | Normalised. |
labels required | array of string | |
created_at required | date-time string |
ApiSettings
| Field | Type | Description |
|---|---|---|
per_page | integer or null | Posts per page on the site; |
theme required | string |
|
blacklist required | string | The blacklist in effect: the account's own, or the site's default. |
ApiTag
| Field | Type | Description |
|---|---|---|
id required | integer | |
name required | string | |
category required | string | |
post_count required | integer | |
deprecated required | boolean | Deprecated tags can't be added to posts. |
created_at required | date-time string |
ApiUploadAllowance
How many more posts the account may upload now.
| Field | Type | Description |
|---|---|---|
refused | string or null | Why uploading is refused now, if it is. |
pending_left | integer or null | Uploads left before the approval queue's limit; |
today_left | integer or null | Uploads left today; |
ApiUser
| Field | Type | Description |
|---|---|---|
name required | string | |
role | string or null | |
status required | string |
|
created_at required | date-time string | |
uploads required | integer | |
favorites required | integer |
ApiVariant
| Field | Type | Description |
|---|---|---|
kind required | string | |
url required | string | |
format required | string | |
width required | integer | |
height required | integer | |
size required | integer |
ApiVersion
One version of a post.
| Field | Type | Description |
|---|---|---|
version required | integer | 1 for the upload, counting up. |
updater | string or null | Who made the change. |
relation | VersionRelation or null | Set when a tag alias or implication made the change. |
tags required | array of string | All tags after the change, sorted. |
added required | array of string | |
removed required | array of string | |
rating required | string | |
source required | string | |
description required | string | |
parent_id | integer or null | |
created_at required | date-time string |
ApiWikiPage
| Field | Type | Description |
|---|---|---|
title required | string | The tag name the page is about. |
body required | string | The page's text, in the site's wiki markup. |
html required | string |
|
version required | integer | Counts up with every change; send it back when saving. |
updater | string or null | Who made the latest change. |
created_at required | date-time string | |
updated_at required | date-time string |
ApiWikiSummary
| Field | Type | Description |
|---|---|---|
title required | string | |
version required | integer | |
updater | string or null | |
updated_at required | date-time string |
ApiWikiVersion
| Field | Type | Description |
|---|---|---|
version required | integer | |
updater | string or null | |
body required | string | |
created_at required | date-time string |
BanList
| Field | Type | Description |
|---|---|---|
users required | array of ApiBan | Active user bans, newest first (at most 200). |
networks required | array of ApiNetworkBan | Active network bans. |
CommentList
| Field | Type | Description |
|---|---|---|
comments required | array of ApiComment | Newest first. |
next_before | integer or null |
|
CommentScore
A comment's score and the viewer's vote.
| Field | Type | Description |
|---|---|---|
score required | integer | |
vote required | integer | Your vote: 1, -1, or 0 for none. |
CommentText
| Field | Type | Description |
|---|---|---|
body required | string | In the site's wiki markup; at most 10,000 characters. |
CommentVote
| Field | Type | Description |
|---|---|---|
score required | integer | 1, -1, or 0 to take your vote back. |
Dismissed
| Field | Type | Description |
|---|---|---|
dismissed required | integer | How many open flags were dismissed. |
ErrorBody
The API's error body.
| Field | Type | Description |
|---|---|---|
error required | ErrorDetail |
ErrorDetail
| Field | Type | Description |
|---|---|---|
status required | integer | The HTTP status code again. |
message required | string | What went wrong, for people. |
post_id | integer or null | For a duplicate upload, the post that already has the file. |
FlaggedPost
| Field | Type | Description |
|---|---|---|
post_id required | integer | |
flags required | array of ApiFlag |
GroupInput
| Field | Type | Description |
|---|---|---|
name | string or null | |
is_public | boolean or null | Public (the default) or private. |
post_ids | array of integer or null | All of its posts, in order. |
GroupPost
| Field | Type | Description |
|---|---|---|
post_id required | integer |
LogEntry
| Field | Type | Description |
|---|---|---|
id required | integer | |
actor | string or null | Who did it; |
action required | string | |
post_id | integer or null | |
user | string or null | The user acted on. |
reason required | string | |
details required | object | Anything else recorded, depending on the action. |
created_at required | date-time string |
LogPage
| Field | Type | Description |
|---|---|---|
entries required | array of LogEntry | Newest first, 50 per page. |
next_before | integer or null |
|
NewBan
| Field | Type | Description |
|---|---|---|
reason required | string | Shown to the user while banned. |
days | integer or null | How long, in days; leave out for until lifted. |
NewFlag
| Field | Type | Description |
|---|---|---|
reason required | string | Why the post should be deleted. |
NewNetworkBan
| Field | Type | Description |
|---|---|---|
network required | string | An address, or a range like |
reason required | string | |
days | integer or null | How long, in days; leave out for until lifted. |
NewNote
| Field | Type | Description |
|---|---|---|
x required | integer | The box, in the original image's pixels; trimmed to the image. |
y required | integer | |
width required | integer | |
height required | integer | |
body required | string | In the site's wiki markup; at most 10,000 characters. |
NewPool
| Field | Type | Description |
|---|---|---|
name required | string | |
description | string | |
category | string or null |
|
post_ids | array of integer | In order. |
NewRelation
| Field | Type | Description |
|---|---|---|
kind required | one of alias, implication | |
antecedent required | string | The tag that's aliased, or that implies the other. |
consequent required | string | The tag it's aliased to, or that it implies. |
reason | string | Why, for whoever reviews the request. |
NoteChanges
| Field | Type | Description |
|---|---|---|
x | integer or null | A new box: all four or none. |
y | integer or null | |
width | integer or null | |
height | integer or null | |
body | string or null | |
is_active | boolean or null |
|
base_version | integer or null | The version the changes were based on. If someone has changed the note since, the change is refused with 409. Leave it out to change whatever is there. |
PoolChanges
| Field | Type | Description |
|---|---|---|
name | string or null | |
description | string or null | |
category | string or null | |
post_ids | array of integer or null | All of the pool's posts, in order. |
base_version | integer or null | The version the changes were based on. If someone has changed the pool since, the save is refused with 409. Leave it out to save over whatever is there. |
PoolList
| Field | Type | Description |
|---|---|---|
pools required | array of ApiPool | |
next_page | integer or null |
|
PoolPost
| Field | Type | Description |
|---|---|---|
post_id required | integer |
PostChanges
Changes to a post. Fields left out stay as they are.
| Field | Type | Description |
|---|---|---|
rating | string or null |
|
source | string or null | |
description | string or null | |
parent_id | integer or null | Another post's number, or |
tags | array of string or null | The complete new list of tags. A category prefix ( |
add_tags | array of string | Tags to add, keeping the others. |
remove_tags | array of string | Tags to take off, keeping the others. |
PostPage
A page of search results.
PostTag
| Field | Type | Description |
|---|---|---|
name required | string | |
category required | string |
|
Reactions
A post's counts and the viewer's part in them.
| Field | Type | Description |
|---|---|---|
fav_count required | integer | |
favorited required | boolean | Whether you have favorited the post. |
score required | integer | |
vote required | integer | Your vote: 1, -1, or 0 for none. |
Reason
| Field | Type | Description |
|---|---|---|
reason | string | Shown on the post and in the moderation log. |
RelationPage
| Field | Type | Description |
|---|---|---|
relations required | array of ApiRelation | |
next_page | integer or null |
|
SavedSearchInput
| Field | Type | Description |
|---|---|---|
query required | string | |
labels | array of string | Letters, digits, |
Suggestion
A tag suggested for what was typed so far.
| Field | Type | Description |
|---|---|---|
name required | string | |
category required | string | |
post_count required | integer | |
antecedent | string or null | The alias that matched, when |
TagChanges
Changes to a tag. Fields left out stay as they are.
| Field | Type | Description |
|---|---|---|
category | string or null | The category's name ( |
deprecated | boolean or null | Deprecated tags can't be added to posts. |
TagPage
| Field | Type | Description |
|---|---|---|
tags required | array of ApiTag | |
next_page | integer or null |
|
UploadRequest
The fields of an upload, for the description only: the handler reads the multipart body as the upload form does.
| Field | Type | Description |
|---|---|---|
file | file or null | The file. Send either this or |
url | string or null | A link to download the file from, instead of sending it. It also becomes the source when none is given. |
rating required | string |
|
tags | string or null | Whitespace-separated. A category prefix ( |
source | string or null | |
description | string or null |
VersionRelation
| Field | Type | Description |
|---|---|---|
kind required | string |
|
antecedent | string or null | |
consequent | string or null |
Vote
| Field | Type | Description |
|---|---|---|
score required | integer | 1 (up), -1 (down), or 0 to take your vote back. |
WikiChanges
| Field | Type | Description |
|---|---|---|
body required | string | The new text, in the site's wiki markup. |
base_version | integer or null | The version the text was based on, 0 for a new page. If someone has changed the page since, the save is refused with 409. Leave it out to save over whatever is there. |
WikiPageList
| Field | Type | Description |
|---|---|---|
pages required | array of ApiWikiSummary | |
next_page | integer or null |
|