EndpointsAuthenticationAuthLogin
Sign in a native client with a local account
The API runs on your application instance. Schemas and field names come directly from the OpenAPI specification. Session-authenticated requests require a session on that instance.
POST
application/json- body
email*stringFormat
emailLength
length <= 320password*stringFormat
passwordLength
1 <= length <= 72deviceName?stringLength
1 <= length <= 80Default
"iOS"organizationId?stringOptional membership to select when signing in. The first membership is used when omitted.
Format
uuidSigned in and issued a revocable user-bound bearer token
application/json- response
token*stringOpaque secret returned only once.
user*scopes*array<>expiresAt*stringFormat
date-timeorganization*organizations*array<>Items
1 <= itemscurl -X POST 'https://inventory.example.com/api/v1/auth/login' \ -H 'Content-Type: application/json' \ -d '{ "email": "user@example.com", "password": "pa$$word"}'Example Response
{ "token": "string", "user": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "email": "user@example.com", "role": "editor" }, "scopes": [ "read" ], "expiresAt": "2019-08-24T14:15:22Z", "organization": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string", "role": "string", "roleName": "string", "isReadOnly": true, "allowNegativeStock": true, "canManage": true }, "organizations": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string", "role": "string", "roleName": "string", "isReadOnly": true, "allowNegativeStock": true, "canManage": true } ]}