Initialize Topic
Analyzes an article, blog post, or any text or online resource so that in future, Respectify can evaluate comments made on it in an informed manner.
This is required to call before you start evaluating comments: it gives you an ID, which is used as context when calling the /commentscore API. There is an implicit assumption that no comments are standalone but all are in response to or in the context of a known topic (a post, article, blog, any text.) Use this API to tell Respectify about that topic.
Pass text or Markdown directly, or an URL containing content. Use an URL when parsing a webpage plus many more formats including PDF.
| Header Parameters |
|---|
X-User-Email email — REQUIREDAccount email address, for authentication |
X-API-Key string — REQUIREDAPI key owned by the user (email), for authentication |
| Request Body — REQUIRED |
|---|
text stringThe text content to be analyzed. Can be any length of text, Markdown, etc. It is completely reasonable to send this the text of an entire essay or article. It's recommended to use this only when the content is not available at a URL. This must be a 'plain text'-like format. You can pass HTML if your HTML is truly not available at an URL but it is not recommended. |
url uriURL pointing to content (plain text, Markdown, HTML, JSON, or PDF) to be analyzed. |
| Responses | ||
|---|---|---|
200Successful response - this returns JSON containing a UUID. This UUID identifies the article (or more accurately, identifies Respectify's understanding of the content and meaning of whatever text or URL you gave it.) You must store this UUID for future use and use it when calling the
| ||
400Bad Request - Missing or invalid parameters. This can occur if both | ||
401Unauthorized - Missing or incorrect authentication | ||
415Unsupported Media Type The URL's content-type is not supported. Usually this means the URL pointed at something that we cannot parse. Check what the content-type is of the content at the URL. Possibly, valid HTML (response type |