Skip to content

Authentication

Information Circle

Your API tokens carry many privileges, so be sure to keep them secure! Do not share your API tokens in publicly accessible areas such as GitHub, client-side code, and so forth.

The Lettria API uses API tokens to authenticate requests. You can view and manage your projects API tokens in the Lettria App.

Authentication to the API is performed via HTTPS Basic Auth. Provide your API token as the Authorization header value.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

POST / HTTP/1.1
Host: api.lettria.com/nls/classification
Authorization: LettriaProKey $API_TOKEN
Content-Type: application/json
{
    "documents": [
       "First document to analyse"
    ]
}

Next steps