Skip to content

Textric API Reference

Alex Rao edited this page Jun 6, 2021 · 5 revisions

This document defines the public-facing Textric API. Unless otherwise stated, it is assumed that all communication happens over TLS (i.e., HTTPS or WSS for websockets).

User Accounts

The User Account RESTful API handles HTTP requests concerning account management; creation, maintenance, and deletion. Given the private nature of Textric, it should not be surprising that there is little information associated with a user account.

For more information on User Enrollment, see the User Enrollment API

GET /api/users

This endpoint accepts no parameters, and returns a viable user handle. This handle will remain viable for at least five minutes. The client SHOULD NOT cache this; successive calls will return different handles.

Note that the unavailability of a handle DOES NOT imply the existence of said handle; a handle MUST be requested before it can be used.

POST /api/users

This endpoint creates a new user. It accepts a JSON-formatted payload with the following shape:

{
  "handle": "string",
  "password": "string"
}

If the handle is not viable, an HTTP 404 message is sent; otherwise, an account is created and an HTTP 204 response is sent.

Clone this wiki locally