{"openapi":"3.1.0","info":{"title":"VOCE API","version":"1.0.0","summary":"Read-only public API for VOCE articles, authors, topics and community questions.","description":"A free, read-only API over public VOCE content. No API key is required: anonymous access is currently allowed. OAuth scopes are declared so clients can request least privilege once an authorization server is available; today they are informational. Every error is an RFC 9457 `application/problem+json` document with a stable `code` and a `resolution` hint.","contact":{"name":"VOCE developers","url":"https://voce.com/developers"}},"servers":[{"url":"https://voce.com/api/v1"}],"externalDocs":{"description":"Developer documentation","url":"https://voce.com/developers"},"tags":[{"name":"Status"},{"name":"Articles"},{"name":"Authors"},{"name":"Topics"},{"name":"Search"},{"name":"Q&A"}],"paths":{"/health":{"get":{"operationId":"getHealth","summary":"API health check","description":"Returns `ok` when the API can reach its data store. Use it to confirm the API is reachable before making other calls. Anonymous access is currently allowed.","tags":["Status"],"security":[{},{"oauth2":["articles:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/articles":{"get":{"operationId":"listArticles","summary":"List latest published articles","description":"Returns published articles newest first, one page at a time. Follow `nextCursor` until it is null. Anonymous access is currently allowed.","tags":["Articles"],"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page's `nextCursor`.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size, 1-50 (default 20).","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"security":[{},{"oauth2":["articles:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticlePage"}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/articles/{username}/{slug}":{"get":{"operationId":"getArticle","summary":"Get one article","description":"Returns a published article by its author's username and its slug, with the body as sanitized HTML. Add `format=markdown` to receive `text/markdown` instead of JSON. Anonymous access is currently allowed.","tags":["Articles"],"parameters":[{"name":"username","in":"path","required":true,"description":"Author username, without the leading @.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"slug","in":"path","required":true,"description":"Article slug.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"format","in":"query","required":false,"description":"`json` (default) or `markdown` for a text/markdown body.","schema":{"default":"json","type":"string","enum":["json","markdown"]}}],"security":[{},{"oauth2":["articles:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleEnvelope"}},"text/markdown":{"schema":{"type":"string","description":"The article as Markdown, when format=markdown."}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/authors/{username}":{"get":{"operationId":"getAuthor","summary":"Get an author profile","description":"Returns the public profile of an author by username. Anonymous access is currently allowed.","tags":["Authors"],"parameters":[{"name":"username","in":"path","required":true,"description":"Author username, without the leading @.","schema":{"type":"string","minLength":1,"maxLength":100}}],"security":[{},{"oauth2":["authors:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorEnvelope"}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/topics":{"get":{"operationId":"listTopics","summary":"List topics","description":"Returns every public topic articles are filed under, not a sample. Anonymous access is currently allowed.","tags":["Topics"],"security":[{},{"oauth2":["topics:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicList"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/topics/{slug}/articles":{"get":{"operationId":"listTopicArticles","summary":"List articles in a topic","description":"Returns the articles filed under a topic, one page at a time. Follow `nextCursor` until it is null. `complete: false` means the scan itself stopped early, so a null cursor is not a promise that no further articles exist. Get valid slugs from `GET /topics`. Anonymous access is currently allowed.","tags":["Topics"],"parameters":[{"name":"slug","in":"path","required":true,"description":"Topic slug from GET /topics.","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page's `nextCursor`.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size, 1-50 (default 20).","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"sort","in":"query","required":false,"description":"`recent` (default) or `popular`.","schema":{"default":"recent","type":"string","enum":["recent","popular"]}}],"security":[{},{"oauth2":["topics:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticlePage"}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/search":{"get":{"operationId":"search","summary":"Search articles or authors","description":"Full-text search over public content. `type` selects what is returned: articles (default) or authors. Anonymous access is currently allowed.","tags":["Search"],"parameters":[{"name":"q","in":"query","required":true,"description":"Search text, 1-200 characters.","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"type","in":"query","required":false,"description":"`articles` (default) or `authors`.","schema":{"default":"articles","type":"string","enum":["articles","authors"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1-50 (default 20).","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"security":[{},{"oauth2":["search:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/questions":{"get":{"operationId":"listQuestions","summary":"List community questions","description":"Returns public community Q&A questions, newest first or most upvoted. Anonymous access is currently allowed.","tags":["Q&A"],"parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page's `nextCursor`.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size, 1-50 (default 20).","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"sort","in":"query","required":false,"description":"`recent` (default) or `upvotes`.","schema":{"default":"recent","type":"string","enum":["recent","upvotes"]}}],"security":[{},{"oauth2":["qa:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionPage"}}}},"400":{"description":"A parameter is missing or invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"Method not allowed. This API is read-only: only GET, HEAD and OPTIONS are supported.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the Retry-After header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","description":"Declares the scopes this API recognizes. Anonymous access is currently allowed for every operation: send no Authorization header. No authorization server exists yet (tracked as VOC-2516), so the tokenUrl below is a reserved placeholder that does not issue tokens today: requesting it returns a 404 problem+json.","flows":{"clientCredentials":{"tokenUrl":"https://voce.com/api/v1/oauth/token","scopes":{"articles:read":"Read published articles.","authors:read":"Read public author profiles.","topics:read":"Read topics and the articles filed under them.","qa:read":"Read public community questions.","search:read":"Search public articles and authors."}}}}},"schemas":{"AuthorRef":{"type":"object","properties":{"name":{"type":"string","description":"Display name."},"username":{"description":"Handle; null when the author's account was deleted.","type":["string","null"]},"url":{"description":"Canonical profile URL on voce.com.","type":["string","null"]}},"required":["name","username","url"],"additionalProperties":false},"TopicRef":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string","description":"Use with GET /topics/{slug}/articles."}},"required":["name","slug"],"additionalProperties":false},"ArticleSummary":{"type":"object","properties":{"id":{"type":"string","description":"Stable article identifier."},"title":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","description":"Canonical article URL on voce.com. Cite this."},"excerpt":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"author":{"$ref":"#/components/schemas/AuthorRef"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/TopicRef"}}},"required":["id","title","slug","url","excerpt","imageUrl","publishedAt","author","topics"],"additionalProperties":false},"Article":{"type":"object","properties":{"id":{"type":"string","description":"Stable article identifier."},"title":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","description":"Canonical article URL on voce.com. Cite this."},"excerpt":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"author":{"$ref":"#/components/schemas/AuthorRef"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/TopicRef"}},"bodyHtml":{"type":"string","description":"Sanitized article body as HTML. Use ?format=markdown for Markdown."},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"}},"required":["name","slug"],"additionalProperties":false}}},"required":["id","title","slug","url","excerpt","imageUrl","publishedAt","author","topics","bodyHtml","tags"],"additionalProperties":false},"Author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"url":{"type":"string"},"title":{"description":"Professional title.","type":["string","null"]},"bio":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"location":{"type":["string","null"]}},"required":["name","username","url","title","bio","avatarUrl","location"],"additionalProperties":false},"Topic":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string","description":"Topic hub URL on voce.com."},"description":{"type":["string","null"]}},"required":["name","slug","url","description"],"additionalProperties":false},"Question":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"category":{"type":["string","null"]},"url":{"description":"Canonical Q&A page on voce.com.","type":["string","null"]},"upvotes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"answerCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["id","title","category","url","upvotes","answerCount","createdAt"],"additionalProperties":false},"ArticlePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ArticleSummary"}},"nextCursor":{"description":"Pass as `cursor` for the next page. Null means this response has no further page. See `complete`.","type":["string","null"]},"totalCount":{"description":"Articles in the loaded set, when the endpoint reports it.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"complete":{"description":"False when the scan stopped early. A null cursor is then not the end of the topic.","type":"boolean"}},"required":["data","nextCursor"],"additionalProperties":false},"QuestionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"nextCursor":{"description":"Pass as `cursor` for the next page. Null means this response has no further page. See `complete`.","type":["string","null"]},"totalCount":{"description":"Articles in the loaded set, when the endpoint reports it.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"complete":{"description":"False when the scan stopped early. A null cursor is then not the end of the topic.","type":"boolean"}},"required":["data","nextCursor"],"additionalProperties":false},"TopicList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Topic"}}},"required":["data"],"additionalProperties":false},"ArticleEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Article"}},"required":["data"],"additionalProperties":false},"AuthorEnvelope":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Author"}},"required":["data"],"additionalProperties":false},"SearchResults":{"type":"object","properties":{"type":{"type":"string","enum":["articles","authors"]},"query":{"type":"string"},"data":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/ArticleSummary"},{"$ref":"#/components/schemas/Author"}]}}},"required":["type","query","data"],"additionalProperties":false},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"version":{"type":"string"},"time":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["status","version","time"],"additionalProperties":false},"Problem":{"type":"object","properties":{"type":{"type":"string","description":"URI identifying the problem type."},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"detail":{"type":"string"},"code":{"type":"string","enum":["validation_error","not_found","method_not_allowed","rate_limited","internal_error","upstream_unavailable"],"description":"Stable machine-readable error code."},"resolution":{"type":"string","description":"What the caller should do next."},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string"},"message":{"type":"string"}},"required":["parameter","message"],"additionalProperties":false}}},"required":["type","title","status","detail","code","resolution"],"additionalProperties":false}}}}