-
Notifications
You must be signed in to change notification settings - Fork 0
Textric API Reference
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).
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
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.
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; upon receiving this code, clients SHOULD discard the given handle. If successful, an account is created and an HTTP 204 response is sent.
This endpoint updates a user's password. It accepts a JSON-formatted payload with the following shape:
{
"handle": "string",
"oldPassword": "string",
"newPassword": "string"
}If accepted, an HTTP 204 response is sent; otherwise, an HTTP 404 response is sent.
Note that password resets also cause the server to forget all previous devices.
This endpoint deletes a user. It accepts a JSON-formatted payload with the following shape:
{
"handle": "string",
"hash": "string"
}Upon success, an HTTP 204 response is sent; otherwise, an HTTP 404 response is sent.