Skip to main content

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 REQUIRED

Account email address, for authentication

X-API-Key string REQUIRED

API key owned by the user (email), for authentication

Request Body REQUIRED
text string

The 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 uri

URL pointing to content (plain text, Markdown, HTML, JSON, or PDF) to be analyzed.

Responses
200

Successful 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 /commentscore API.

Schema OPTIONAL
article_id uuid

A UUID that uniquely identifies the analyzed article or content. Store this UUID for future use when calling the /commentscore API, so that the comment is analyzed in context.

400

Bad Request - Missing or invalid parameters. This can occur if both text and url are present at the same time; one and only one is required.

401

Unauthorized - Missing or incorrect authentication

415

Unsupported 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 text/html) content was found but it could not be parsed to extract info. This can occur when the HTML lacks structural markup like paragraph or article tags. This is very rare.