Signs into the Enigma Public API server using the email address and password provided. The server returns the user model for the specified user. The response headers include a session cookie you can use for future API requests (see the example below).

Query parameters

None

Body parameters

Name Type Description Required?
user string The user’s email address. Yes
password string The user’s password. Yes

Responses

Code Returns
200 The user model for the specified user.
401 Unauthorized (invalid user ID or password).

Example

This example writes the session cookie from the response to a file in the current directory.

$ curl -X POST 'https://public.enigma.com/api/account/login' -H 'Content-Type: application/json' -d '{"user":"test@enigma.com","password":"password123"}' -c cookies.txt

You can then use the stored cookie to authenticate future API requests, for example:

curl -X GET 'https://public.enigma.com/api/collections/' -b cookies.txt