# Request question research

Source: https://musicnerd-docs.vercel.app/api-reference/research/question

Request question-directed research

## POST /api/artist/{id}/research/questions

Full OpenAPI specification: https://musicnerd-docs.vercel.app/spec/question-research.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://musicnerd-docs.vercel.app/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Question-directed artist research",
    "version": "0.1.0",
    "description": "Preview contract. Apply the Web-owned research schema before enabling the matching API implementation."
  },
  "servers": [
    {
      "url": "https://musicnerd-api.vercel.app"
    }
  ],
  "paths": {
    "/api/artist/{id}/research/questions": {
      "post": {
        "summary": "Request question-directed research",
        "description": "Enqueue or reuse bounded public-evidence research. Checks saved originals first. No scraping in enqueue. Never approves Lore or attaches a profile.",
        "security": [
          {
            "PrivyAuth": []
          },
          {
            "ResearchService": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Persisted acknowledgement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Current claimant/admin required for private operations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable artist, job or evidence",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "State or revision changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Evidence exceeds supported bounds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Research quota or active-work limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Storage, credential or provider unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Request"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Status": {
        "type": "object",
        "required": [
          "status",
          "jobId",
          "stage",
          "message",
          "updatedAt",
          "references",
          "limitations"
        ],
        "properties": {
          "status": {
            "const": "ok"
          },
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "stage": {
            "type": "string",
            "enum": [
              "checking_saved",
              "searching",
              "reading",
              "transcribing",
              "waiting_provider",
              "complete",
              "unresolved",
              "failed",
              "cancelled"
            ]
          },
          "message": {
            "type": "string"
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reused": {
            "type": "boolean"
          },
          "references": {
            "type": "array",
            "maxItems": 6,
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "status",
          "error",
          "code"
        ],
        "properties": {
          "status": {
            "const": "error"
          },
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "Request": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "topic",
          "evidenceNeed"
        ],
        "properties": {
          "topic": {
            "type": "string",
            "minLength": 3,
            "maxLength": 160,
            "description": "Neutral public work/topic terms, not private visitor chat."
          },
          "evidenceNeed": {
            "type": "string",
            "enum": [
              "reporting",
              "release_date",
              "credits",
              "social_caption",
              "spoken_content"
            ]
          },
          "freshness": {
            "type": "string",
            "enum": [
              "stored",
              "recent"
            ],
            "default": "stored"
          },
          "targetUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "platform": {
            "type": "string",
            "enum": [
              "instagram",
              "tiktok",
              "x"
            ]
          },
          "fromDate": {
            "type": "string",
            "format": "date"
          },
          "toDate": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "Reference": {
        "type": "object",
        "required": [
          "sourceId",
          "revision",
          "start",
          "end",
          "text",
          "url",
          "curation"
        ],
        "properties": {
          "sourceId": {
            "type": "string"
          },
          "revision": {
            "type": "string"
          },
          "start": {
            "type": "integer",
            "minimum": 0
          },
          "end": {
            "type": "integer",
            "minimum": 0
          },
          "text": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "curation": {
            "type": "string",
            "enum": [
              "approved",
              "pending"
            ]
          },
          "evidenceKind": {
            "type": "string",
            "enum": [
              "original_text",
              "caption",
              "provider_transcript"
            ]
          },
          "speaker": {
            "type": "string",
            "enum": [
              "not_applicable",
              "unverified"
            ]
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "retrievedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "truncated": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "PrivyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Current artist claimant or administrator Privy access token."
      },
      "ResearchService": {
        "type": "apiKey",
        "in": "header",
        "name": "X-MusicNerd-Research-Key",
        "description": "Server-only MUSICNERD_RESEARCH_API_KEY. Public evidence research only; never grants review or interview-history access."
      }
    }
  }
}
```
