質問
質問の送信・受信・回答・削除を行うエンドポイントです。
POST
/api/v1/questionsユーザーに質問を送信します。API キーで認証している場合、CAPTCHA は不要です。
認証
認証不要。CAPTCHA をスキップするには API キーを推奨。
リクエストボディ
{
"recipientId": "user-id-string",
"content": "Hello! (max 2000 chars)",
"type": "normal",
"isAnonymous": true
}| パラメータ | 型 | 説明 |
|---|---|---|
| type | string | 質問のタイプ。normal (通常) / topic (お題) / request (リクエスト)。省略時は normal。 |
受信者が acceptedQuestionTypes で許可していないタイプを指定すると 403 (questionTypeNotAccepted) が返ります。
GET
/api/v1/questions/:idID で単一の質問を取得します。
認証
認証不要(公開エンドポイント)
GET
/api/v1/questions/inbox認証済みユーザーが受信した質問一覧を取得します。
認証
questions:readクエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
| page | number | ページ番号(デフォルト: 1) |
| limit | number | ページごとの件数(デフォルト: 20、最大: 50) |
| type | string | タイプでフィルタリング。normal / topic / request。省略時は全件返します。 |
| folder | string | 取得するフォルダ。inbox (受信箱・デフォルト) / trash (ゴミ箱・30日以内に削除したもの)。 |
GET
/api/v1/questions/sent認証済みユーザーが送信した質問一覧を取得します。
認証
questions:readクエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
| page | number | ページ番号(デフォルト: 1) |
| limit | number | ページごとの件数(デフォルト: 20、最大: 50) |
| type | string | タイプでフィルタリング。normal / topic / request。省略時は全件返します。 |
GET
/api/v1/questions/user/:handleユーザーの公開ページ用の回答済み質問一覧を取得します。
認証
認証不要(公開エンドポイント)
パスパラメータ
| パラメータ | 説明 |
|---|---|
| handle | @user@instance.example 形式のユーザーハンドル |
クエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
| cursor | string | 前のレスポンスからのページネーションカーソル(質問 ID) |
| limit | number | ページごとの件数(デフォルト: 20、最大: 50) |
POST
/api/v1/questions/:id/answer質問に回答を送信します。受信者のみ回答できます。
認証
questions:writeリクエストボディ
{
"answer": "My answer text (max 3000 chars)",
"requireLoginToView": false,
"postToMisskey": false, // optional: also post to Misskey
"noteVisibility": "public", // public, home, followers
"useCW": false, // content warning
"attachImage": false, // attach OGP image to note
"attachments": [ // optional: attachment keys (max 10)
"attachments/answer/<userId>/<uuid>.webp"
],
"mentionSender": false, // mention sender (non-anonymous only)
"localOnly": false, // local only (no federation)
}POST
/api/v1/questions/:id/delete質問をゴミ箱に移動します。受信者のみ操作できます。30日後に完全に削除されます。
認証
questions:writePOST
/api/v1/questions/:id/restoreゴミ箱内の質問を受信箱に復元します。削除から30日以内のみ復元可能です。
認証
questions:write