---
title: "Log in"
---

> Documentation Index
> Fetch the complete documentation index at: https://simplcron.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Log in

Path: Simplcron API › Session

`POST /auth/login`

Start a console session using an email address and password.

## Request body

_Required._

- `email` (`login.email`; string, required)
  - format: `email`
- `password` (`login.password`; string, required)
  - format: `password` · minLength: `15`

## Example request

```json
{
  "email": "user@example.com",
  "password": "pa$$word_qwerty"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/auth/login' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "user@example.com",
  "password": "pa$$word_qwerty"
}
'
```

### TypeScript

```typescript
const url = '<base-url>/auth/login';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({email: 'user@example.com', password: 'pa$$word_qwerty'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/auth/login"

payload = {
    "email": "user@example.com",
    "password": "pa$$word_qwerty"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

New session cookie and account scope

#### Example

```json
{
  "user": {
    "id": "string",
    "email": "user@example.com"
  },
  "workspace": {
    "id": "string",
    "name": "string"
  },
  "project": {
    "id": "string",
    "name": "string"
  },
  "environment": "production"
}
```

- `user` (`login.response.200.user`; object, required)
  - `id` (`login.response.200.user.id`; string, required)
  - `email` (`login.response.200.user.email`; string, required)
    - format: `email`
- `workspace` (`login.response.200.workspace`; object, required)
  - `id` (`login.response.200.workspace.id`; string, required)
  - `name` (`login.response.200.workspace.name`; string, required)
    - maxLength: `80` · minLength: `1`
- `project` (`login.response.200.project`; object, required)
  - `id` (`login.response.200.project.id`; string, required)
  - `name` (`login.response.200.project.name`; string, required)
    - maxLength: `80` · minLength: `1`
- `environment` (`login.response.200.environment`; string, required)
  - one of `"production"`, `"development"`

### 400

Invalid input

#### Example

```json
{
  "error": "string"
}
```

- `error` (`login.response.400.error`; string, required)

### 401

Invalid credentials

#### Example

```json
{
  "error": "string"
}
```

- `error` (`login.response.401.error`; string, required)

### 429

Too many attempts

#### Example

```json
{
  "error": "string"
}
```

- `error` (`login.response.429.error`; string, required)


Source: https://simplcron.dev/docs/api/login/index.md
