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

MethodEndpointDescription
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

NameTypeRequiredDescription
emailstring (email)RequiredEmail 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]"}'
Response200 OK
json
{
  "detail": "Verification code sent to your email.",
  "organizations": [
    {
      "id": 1,
      "name": "Acme Corp",
      "uuid": "org-uuid"
    }
  ],
  "is_multi_org": false
}
Response400 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

NameTypeRequiredDescription
emailstring (email)RequiredSame email used in request-code.
codestringRequired6-digit verification code.
organization_idintegerOptionalRequired 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"}'
Response200 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"
  }
}
Response200 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"
    }
  ]
}
Response400 Bad Request
json
{
  "detail": "<error message>"
}

GET /v1/cli/auth/status/

GET/v1/cli/auth/status/API keyCLI Auth

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

POST /v1/cli/auth/logout/

POST/v1/cli/auth/logout/CLI Auth

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>"
Response200 OK
json
{
  "detail": "Successfully logged out."
}

POST /v1/cli/updates/

POST/v1/cli/updates/API keyCLI Auth

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

NameTypeRequiredDescription
messagestringOptionalFree-text update (mapped to check-in questions). Use when not sending done/doing/blocked.
donestringOptionalWhat was completed.
doingstringOptionalWhat is in progress.
blockedstringOptionalBlockers 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"
  }'
Response201 Created
json
{
  "attached_followups": [
    {
      "followup_name": "Daily Standup",
      "followup_uuid": "followup-id",
      "daily_uuid": "daily-uuid",
      "action": "created"
    }
  ],
  "followups_count": 1
}
Response400 Bad Request
json
{
  "detail": "<error message>"
}

GET /v1/cli/status/

GET/v1/cli/status/API keyCLI Auth

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>"
Response200 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
}