TWIN Supply Chain Docs
API ReferenceAuthentication

Login

POST/authentication/login

Request Body

application/json

Perform a login on the server.

TypeScript Definitions

Use the request body type in TypeScript.

The login details.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/authentication/login" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com",    "password": "MyPassword123!"  }'
{  "expiry": 1722514341067}
{  "name": "GeneralError",  "message": "errorMessage",  "properties": {    "foo": "bar"  }}
{  "name": "UnauthorizedError",  "message": "errorMessage"}
{  "name": "InternalServerError",  "message": "errorMessage"}

Exchanges email and password for a JWT. The token is delivered via Set-Cookie, never in the response body — the body only carries expiry, in milliseconds since the Unix epoch.