---
title: "Login to view API keys"
method: POST
path: "/auth/login"
tags: ["Auth"]
---

# Login to view API keys

`POST /auth/login`

## Request

- Base URL: `https://api.companystack.co.uk`
- URL: `https://api.companystack.co.uk/auth/login`
- Auth: none required

Sign in with the account's email address and password. The reply holds the account and its API keys. A wrong password and an unknown address get the same 401 (`code: invalid_login`). The right password for an address that has not been confirmed yet gets 403 `code: email_not_confirmed`, and a new confirmation link is sent. Repeated wrong passwords for one address are held back with `code: login_backoff` and `retry_after_seconds`. An account with two-factor sign-in gets `two_factor_required: true` and a `challenge` to complete on the website.

## Request body

- object
  - `email` string, required
  - `password` string, required

## Response `200`

Account details and API keys

## Other responses

- `400`: Email and password required
- `401`: Wrong email or password (`code: invalid_login`): the same answer whether or not the address has an account
- `403`: The password is right but the address has not been confirmed yet (`code: email_not_confirmed`; a new confirmation link is sent), or the account is disabled
- `429`: Too many attempts from this IP address, or too many wrong passwords for this address (Retry-After says when to try again)

---

[API](https://skmtc.dev/companystack/apis/companystack-api.md) · [All operations](https://skmtc.dev/companystack/apis/companystack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/companystack/apis/companystack-api/revisions/8f3234237d2d?raw)
