# CLI

> CLI authentication and check-in update submission.

Language: en
Canonical: https://www.dailybot.com/developers/api/cli
Markdown: send header `Accept: text/markdown` on any URL to receive Markdown instead of HTML.
Last Updated: 2026-04-06

---

# CLI API

Public API endpoints for CLI authentication (email OTP), status, logout, and for submitting check-in updates and fetching pending check-ins. `request-code` and `verify-code` do not require authentication; the rest require **CLI token** via `Authorization: Bearer <cli_token>`.

## Endpoints summary

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/v1/cli/auth/request-code/` | Send 6-digit verification code to email (no auth) |
| POST | `/v1/cli/auth/verify-code/` | Verify code and return CLI token (no auth) |
| GET | `/v1/cli/auth/status/` | Get current CLI auth status (requires CLI token) |
| POST | `/v1/cli/auth/logout/` | Revoke CLI token (requires CLI token) |
| POST | `/v1/cli/updates/` | Submit update to pending daily check-ins (requires CLI token) |
| GET | `/v1/cli/status/` | Get pending daily check-ins for today (requires CLI token) |

---

## POST /v1/cli/auth/request-code/

Sends a 6-digit verification code to the given email. No authentication required. Rate limited.

### Body parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `email` | string (email) | Yes | Email address to receive the code. |

```bash
curl -X POST "https://api.dailybot.com/v1/cli/auth/request-code/" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'
```

**Response (200 OK):**

```json
{
  "detail": "Verification code sent to your email.",
  "organizations": [
    { "id": 1, "name": "Acme Corp", "uuid": "org-uuid" }
  ],
  "is_multi_org": false
}
```

---

## POST /v1/cli/auth/verify-code/

Verifies the 6-digit code and returns a CLI auth token. No authentication required. Rate limited.

### Body parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `email` | string (email) | Yes | Same email used in request-code. |
| `code` | string | Yes | The 6-digit verification code. |
| `organization_id` | integer | No | Organization ID if multi-org. |

```bash
curl -X POST "https://api.dailybot.com/v1/cli/auth/verify-code/" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "code": "123456"}'
```

**Response (200 OK — single organization):**

```json
{
  "requires_organization_selection": false,
  "token": "cli-auth-token-string",
  "user": {
    "uuid": "user-uuid",
    "email": "user@example.com",
    "full_name": "Jane Smith"
  },
  "organization": {
    "id": 1,
    "name": "Acme Corp",
    "uuid": "org-uuid"
  }
}
```

**Response (200 OK — multiple organizations):**

```json
{
  "requires_organization_selection": true,
  "organizations": [
    { "id": 1, "name": "Acme Corp", "uuid": "org-uuid" },
    { "id": 2, "name": "Other Org", "uuid": "org-uuid-2" }
  ]
}
```

---

## GET /v1/cli/auth/status/

Returns the current CLI authentication status. Requires CLI token.

```bash
curl -X GET "https://api.dailybot.com/v1/cli/auth/status/" \
  -H "Authorization: Bearer <cli_token>"
```

**Response (200 OK):**

```json
{
  "authenticated": true,
  "user": {
    "uuid": "user-uuid",
    "email": "user@example.com",
    "full_name": "Jane Smith"
  },
  "organization": {
    "id": 1,
    "name": "Acme Corp",
    "uuid": "org-uuid"
  }
}
```

---

## POST /v1/cli/auth/logout/

Revokes the current CLI token. Requires CLI token.

```bash
curl -X POST "https://api.dailybot.com/v1/cli/auth/logout/" \
  -H "Authorization: Bearer <cli_token>"
```

**Response (200 OK):**

```json
{ "detail": "Successfully logged out." }
```

---

## POST /v1/cli/updates/

Submits an update to the user's pending daily check-ins for today. Requires CLI token. Either a free-text `message` (processed and mapped to questions) or structured `done` / `doing` / `blocked` can be provided.

### Body parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `message` | string | No | Free-text update, mapped to check-in questions automatically. |
| `done` | string | No | What you completed. |
| `doing` | string | No | What you're working on. |
| `blocked` | string | No | Current blockers. |

```bash
curl -X POST "https://api.dailybot.com/v1/cli/updates/" \
  -H "Authorization: Bearer <cli_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "done": "Finished the API integration",
    "doing": "Starting frontend work",
    "blocked": "No blockers"
  }'
```

**Response (201 Created):**

```json
{
  "attached_followups": [
    {
      "followup_name": "Daily Standup",
      "followup_uuid": "followup-id",
      "daily_uuid": "daily-uuid",
      "action": "created"
    }
  ],
  "followups_count": 1
}
```

---

## GET /v1/cli/status/

Returns the user's pending daily check-ins for today. Requires CLI token.

```bash
curl -X GET "https://api.dailybot.com/v1/cli/status/" \
  -H "Authorization: Bearer <cli_token>"
```

**Response (200 OK):**

```json
{
  "pending_checkins": [
    {
      "followup_name": "Daily Standup",
      "followup_uuid": "followup-id",
      "template_questions": [
        {
          "uuid": "question-uuid",
          "question": "What did you do?",
          "question_type": "text_field",
          "is_blocker": false
        }
      ]
    }
  ],
  "count": 1
}
```

## Endpoints in this group

CLI-only endpoints — the OTP login flow, chat completions, and status pings. Only callable with a CLI Bearer token (except the anonymous OTP endpoints).

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/v1/cli/chat/completions/` | CLI chat completions (CLI Bearer only) |
| POST | `/v1/cli/updates/` | CLI updates (CLI Bearer only) |
| GET | `/v1/cli/status/` | CLI status (anonymous) |
| POST | `/v1/cli/auth/request-code/` | Request an email OTP code (anonymous) |
| POST | `/v1/cli/auth/verify-code/` | Verify an OTP code and return CLI Bearer tokens (anonymous) |
| GET | `/v1/cli/auth/status/` | Check CLI Bearer status |
| POST | `/v1/cli/auth/logout/` | End CLI Bearer session |

### POST `/v1/cli/chat/completions/`

**CLI chat completions (CLI Bearer only)**

Body: message, history, session_id, reset_thread, available_commands.

- **Auth:** CLI Bearer (write)
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Error codes

| Status | When |
|--------|------|
| `401` | Missing/invalid/expired credential |
| `403` | Authenticated but not permitted |
| `429` | Throttled - Retry-After header set |
| `400` | Validation error |

#### Example (curl)

```bash
curl -sS -X POST 'https://api.dailybot.com/v1/cli/chat/completions/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### POST `/v1/cli/updates/`

**CLI updates (CLI Bearer only)**

CLI updates (CLI Bearer only)

- **Auth:** CLI Bearer (write)
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Error codes

| Status | When |
|--------|------|
| `401` | Missing/invalid/expired credential |
| `403` | Authenticated but not permitted |
| `429` | Throttled - Retry-After header set |

#### Example (curl)

```bash
curl -sS -X POST 'https://api.dailybot.com/v1/cli/updates/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### GET `/v1/cli/status/`

**CLI status (anonymous)**

CLI status (anonymous)

- **Auth:** Anonymous
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Error codes

| Status | When |
|--------|------|
| `401` | Missing/invalid/expired credential |
| `403` | Authenticated but not permitted |
| `429` | Throttled - Retry-After header set |

#### Example (curl)

```bash
curl -sS -X GET 'https://api.dailybot.com/v1/cli/status/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### POST `/v1/cli/auth/request-code/`

**Request an email OTP code (anonymous)**

Body: email; optional organization_uuid on multi-org resend.

- **Auth:** Anonymous
- **Rate limit:** `anon_strict_auth`
- **Pagination:** No pagination

#### Error codes

| Status | When |
|--------|------|
| `401` | Missing/invalid/expired credential |
| `403` | Authenticated but not permitted |
| `429` | Throttled - Retry-After header set |
| `400` | Validation error |

#### Example (curl)

```bash
curl -sS -X POST 'https://api.dailybot.com/v1/cli/auth/request-code/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### POST `/v1/cli/auth/verify-code/`

**Verify an OTP code and return CLI Bearer tokens (anonymous)**

Body: email, code. Response: access_token, refresh_token, token_type, expires_in, user, organization.

- **Auth:** Anonymous
- **Rate limit:** `anon_strict_auth`
- **Pagination:** No pagination

#### Error codes

| Status | When |
|--------|------|
| `401` | Missing/invalid/expired credential |
| `403` | Authenticated but not permitted |
| `429` | Throttled - Retry-After header set |
| `400` | Validation error |

#### Example (curl)

```bash
curl -sS -X POST 'https://api.dailybot.com/v1/cli/auth/verify-code/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### GET `/v1/cli/auth/status/`

**Check CLI Bearer status**

Check CLI Bearer status

- **Auth:** CLI Bearer (write)
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Error codes

| Status | When |
|--------|------|
| `401` | Missing/invalid/expired credential |
| `403` | Authenticated but not permitted |
| `429` | Throttled - Retry-After header set |

#### Example (curl)

```bash
curl -sS -X GET 'https://api.dailybot.com/v1/cli/auth/status/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### POST `/v1/cli/auth/logout/`

**End CLI Bearer session**

End CLI Bearer session

- **Auth:** CLI Bearer (write)
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Error codes

| Status | When |
|--------|------|
| `401` | Missing/invalid/expired credential |
| `403` | Authenticated but not permitted |
| `429` | Throttled - Retry-After header set |

#### Example (curl)

```bash
curl -sS -X POST 'https://api.dailybot.com/v1/cli/auth/logout/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

---

## Developer portal navigation

**Getting Started**

- [Overview](/developers)
- [Quick start](/developers/getting-started)
- [Authentication](/developers/authentication)

**API Reference**

- [API Overview](/developers/api)
- [Users](/developers/api/users)
- [Organization](/developers/api/organization)
- [Teams](/developers/api/teams)
- [Invitations](/developers/api/invitations)
- [Check-ins](/developers/api/check-ins)
- [Forms](/developers/api/forms)
- [Report channels](/developers/api/report-channels)
- [Templates](/developers/api/templates)
- [Kudos](/developers/api/kudos)
- [Mood tracking](/developers/api/mood)
- [Important dates](/developers/api/important-dates)
- [Messaging](/developers/api/messaging)
- [Automations](/developers/api/workflows)
- [Webhooks](/developers/api/webhooks)
- [Commands platform](/developers/api/commands-platform)
- [Agents](/developers/api/agents)
- [OAuth2](/developers/api/oauth2)
- [Integrations](/developers/api/integrations)
- [CLI](/developers/api/cli) (this page)

**API guides**

- [Errors & Status Codes](/developers/errors)
- [Rate Limits](/developers/rate-limits)
- [Conventions](/developers/conventions)
- [API Changelog](/developers/api-changelog)
- [Recipes](/developers/recipes)

**Developer Features**

- [Custom commands](/developers/custom-commands)
- [Serverless commands](/developers/serverless)
- [Webhooks & events](/developers/webhooks)
- [Automation API trigger](/developers/workflow-trigger)
- [Activity API](/developers/activity-api)

**CLI**

- [Overview](/developers/cli)
- [Authentication](/developers/cli-authentication)
- [Command reference](/developers/cli-reference)
- [CI/CD recipes](/developers/cli-ci-cd)
- [Configuration](/developers/cli-configuration)
- [Troubleshooting](/developers/cli-troubleshooting)

**Agent Skill**

- [Overview](/developers/agent-skill)
- [Skills catalog](/skills)

---

## Site navigation

**Product:**
- [Home](/)
- [Product](/product)
- [Pricing](/pricing)
- [Enterprise](/enterprise)
- [Integrations](/integrations)
- [Templates](/templates)

**Resources:**
- [Blog](/blog)
- [Academy](/academy)
- [Changelog](/changelog)
- [Help Center](/help)
- [Developers](/developers)
- [Agents](/agents)

**Company:**
- [About](/about)
- [Careers](/careers)
- [Security](/security)
- [Contact Sales](/demo)

**Connect:**
- [LinkedIn](https://www.linkedin.com/company/dailybot/)
- [X/Twitter](https://twitter.com/dailybot)
- [GitHub](https://github.com/Dailybot-Inc)
- [YouTube](https://www.youtube.com/channel/UC3uM9V52vwX7e3vQpCc4qvA)

