Skip to content

CLI

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>.

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/

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) Required Email address to receive the code.
Request
curl -X POST "https://api.dailybot.com/v1/cli/auth/request-code/" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'
Response 200 OK
json
{
  "detail": "Verification code sent to your email.",
  "organizations": [
    {
      "id": 1,
      "name": "Acme Corp",
      "uuid": "org-uuid"
    }
  ],
  "is_multi_org": false
}
Response 400 Bad Request
json
{
  "detail": "<error message>"
}

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

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) Required Same email used in request-code.
code string Required 6-digit verification code.
organization_id integer Optional Required when the user belongs to multiple organizations.
Request
curl -X POST "https://api.dailybot.com/v1/cli/auth/verify-code/" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "code": "123456"}'
Response 200 OK — Single organization or organization_id provided
json
{
  "requires_organization_selection": false,
  "token": "cli-auth-token-string",
  "user": {
    "uuid": "user-uuid",
    "email": "[email protected]",
    "full_name": "Jane Smith"
  },
  "organization": {
    "id": 1,
    "name": "Acme Corp",
    "uuid": "org-uuid"
  }
}
Response 200 OK — Multiple organizations, no organization_id
json
{
  "requires_organization_selection": true,
  "organizations": [
    {
      "id": 1,
      "name": "Acme Corp",
      "uuid": "org-uuid"
    },
    {
      "id": 2,
      "name": "Other Org",
      "uuid": "org-uuid-2"
    }
  ]
}
Response 400 Bad Request
json
{
  "detail": "<error message>"
}

GET /v1/cli/auth/status/

GET /v1/cli/auth/status/

Returns the current CLI authentication status. Requires CLI token.

Request
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": "[email protected]",
    "full_name": "Jane Smith"
  },
  "organization": {
    "id": 1,
    "name": "Acme Corp",
    "uuid": "org-uuid"
  }
}
Response 401 Unauthorized
json
{
  "detail": "Authentication credentials were not provided."
}

POST /v1/cli/auth/logout/

POST /v1/cli/auth/logout/

Revokes the current CLI token. Requires CLI token.

Request
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/

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 Optional Free-text update (mapped to check-in questions). Use when not sending done/doing/blocked.
done string Optional What was completed.
doing string Optional What is in progress.
blocked string Optional Blockers or issues.
Request
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
}
Response 400 Bad Request
json
{
  "detail": "<error message>"
}

GET /v1/cli/status/

GET /v1/cli/status/

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

Request
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
}