# Commands platform

> Scheduling, storage, events, activity, and exchange tokens for the Dailybot commands platform.

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

---

# Commands platform

Public API endpoints for scheduled command execution, storage, event subscription, activity tracking, and fetching an exchange token. All require `X-API-KEY` header. Many endpoints require an exchange token (from command context or `POST /v1/auth/fetch-command-exchange-token/`).

## Endpoints summary

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/v1/scheduler/` | Schedule a command to run at a future time |
| GET | `/v1/scheduler/` | List scheduled command jobs |
| GET | `/v1/scheduler/{id}/` | Get a scheduled job |
| DELETE | `/v1/scheduler/{id}/` | Cancel a scheduled job |
| POST | `/v1/storage/` | Write a key-value pair |
| GET | `/v1/storage/{key}/` | Read a key-value pair |
| DELETE | `/v1/storage/{key}/` | Delete a key-value pair |
| POST | `/v1/events/subscribe/` | Subscribe to an event |
| DELETE | `/v1/events/subscribe/{id}/` | Unsubscribe from an event |
| POST | `/v1/activity/` | Submit an activity entry |
| POST | `/v1/auth/fetch-command-exchange-token/` | Fetch an exchange token for a user |

---

## Scheduling

### POST /v1/scheduler/

Schedules a command to run at a future time.

```bash
curl -X POST "https://api.dailybot.com/v1/scheduler/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "command_intent": "send_report",
    "run_at": "2026-04-10T09:00:00Z",
    "user_uuid": "user-uuid",
    "params": { "report_type": "weekly" }
  }'
```

**Response (201 Created):**

```json
{
  "id": "job-uuid",
  "command_intent": "send_report",
  "run_at": "2026-04-10T09:00:00Z",
  "status": "scheduled"
}
```

### GET /v1/scheduler/

Lists all scheduled command jobs for the organization.

```bash
curl -X GET "https://api.dailybot.com/v1/scheduler/" \
  -H "X-API-KEY: your_api_key"
```

### DELETE /v1/scheduler/{id}/

Cancels a scheduled job.

```bash
curl -X DELETE "https://api.dailybot.com/v1/scheduler/job-uuid/" \
  -H "X-API-KEY: your_api_key"
```

---

## Storage

### POST /v1/storage/

Writes a key-value pair. Data is scoped to the user and organization.

```bash
curl -X POST "https://api.dailybot.com/v1/storage/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"key": "user_preferences", "value": {"theme": "dark"}}'
```

### GET /v1/storage/{key}/

Reads a key-value pair.

```bash
curl -X GET "https://api.dailybot.com/v1/storage/user_preferences/" \
  -H "X-API-KEY: your_api_key"
```

**Response (200 OK):**

```json
{ "key": "user_preferences", "value": { "theme": "dark" } }
```

### DELETE /v1/storage/{key}/

Deletes a key-value pair.

```bash
curl -X DELETE "https://api.dailybot.com/v1/storage/user_preferences/" \
  -H "X-API-KEY: your_api_key"
```

---

## Event subscription

### POST /v1/events/subscribe/

Subscribes to an event type for the authenticated user.

```bash
curl -X POST "https://api.dailybot.com/v1/events/subscribe/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"event_type": "check_in.completed", "webhook_url": "https://your-app.com/events"}'
```

### DELETE /v1/events/subscribe/{id}/

Unsubscribes from an event.

```bash
curl -X DELETE "https://api.dailybot.com/v1/events/subscribe/sub-uuid/" \
  -H "X-API-KEY: your_api_key"
```

---

## Activity

### POST /v1/activity/

Submits an activity entry linked to the authenticated user.

```bash
curl -X POST "https://api.dailybot.com/v1/activity/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "activity_type": "commit",
    "description": "Pushed 3 commits to main",
    "metadata": { "repo": "my-repo", "commits": 3 }
  }'
```

**Response (201 Created):**

```json
{
  "id": "activity-uuid",
  "activity_type": "commit",
  "description": "Pushed 3 commits to main",
  "created_at": "2026-04-06T10:00:00Z"
}
```

---

## POST /v1/auth/fetch-command-exchange-token/

Fetches an exchange token that allows making API calls on behalf of a specific user. Requires your API key to have the necessary permissions.

```bash
curl -X POST "https://api.dailybot.com/v1/auth/fetch-command-exchange-token/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"user_uuid": "target-user-uuid"}'
```

**Response (200 OK):**

```json
{
  "exchange_token": "eyJ...",
  "expires_at": "2026-04-06T11:00:00Z"
}
```

> Exchange Token authentication is disabled by default. [Contact support](https://app.dailybot.com/forms/86a5b53f-8bc9-4b84-b78f-7c51b805d674/responses/create) to enable it for your organization.

## Endpoints in this group

The command platform (scheduling, storage, events, activity). All endpoints are API-key + Exchange-Token only.

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/v1/auth/fetch-command-exchange-token/` | Mint an exchange token for command-platform calls |
| GET | `/v1/platform/scheduling/` | List scheduled command runs |
| POST | `/v1/platform/scheduling/` | Schedule a command run |
| GET | `/v1/platform/scheduling/{pk}/` | Retrieve a scheduled run |
| PUT | `/v1/platform/scheduling/{pk}/` | Replace a scheduled run |
| DELETE | `/v1/platform/scheduling/{pk}/` | Cancel a scheduled run |
| GET | `/v1/platform/storage/` | Read command-scoped storage |
| POST | `/v1/platform/storage/` | Write command-scoped storage |
| DELETE | `/v1/platform/storage/` | Clear command-scoped storage |
| GET | `/v1/platform/event-subscription/` | List command event subscriptions |
| POST | `/v1/platform/event-subscription/` | Create a command event subscription |
| DELETE | `/v1/platform/event-subscription/` | Delete a command event subscription |
| GET | `/v1/platform/activity/` | Read command activity feed |
| POST | `/v1/platform/activity/` | Append to the command activity feed |

### POST `/v1/auth/fetch-command-exchange-token/`

**Mint an exchange token for command-platform calls**

Body: command_uuid, target_user_uuid. Response: exchange_token, expires_at.

- **Auth:** API key (`X-API-KEY`)
- **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/auth/fetch-command-exchange-token/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### GET `/v1/platform/scheduling/`

**List scheduled command runs**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

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

### POST `/v1/platform/scheduling/`

**Schedule a command run**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

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

### GET `/v1/platform/scheduling/{pk}/`

**Retrieve a scheduled run**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `pk` | string (uuid) | Yes | — |

#### Error codes

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

#### Example (curl)

```bash
curl -sS -X GET 'https://api.dailybot.com/v1/platform/scheduling/{pk}/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### PUT `/v1/platform/scheduling/{pk}/`

**Replace a scheduled run**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `pk` | string (uuid) | Yes | — |

#### Error codes

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

#### Example (curl)

```bash
curl -sS -X PUT 'https://api.dailybot.com/v1/platform/scheduling/{pk}/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### DELETE `/v1/platform/scheduling/{pk}/`

**Cancel a scheduled run**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **Rate limit:** `default`
- **Pagination:** No pagination

#### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `pk` | string (uuid) | Yes | — |

#### Error codes

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

#### Example (curl)

```bash
curl -sS -X DELETE 'https://api.dailybot.com/v1/platform/scheduling/{pk}/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### GET `/v1/platform/storage/`

**Read command-scoped storage**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

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

### POST `/v1/platform/storage/`

**Write command-scoped storage**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

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

### DELETE `/v1/platform/storage/`

**Clear command-scoped storage**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

```bash
curl -sS -X DELETE 'https://api.dailybot.com/v1/platform/storage/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### GET `/v1/platform/event-subscription/`

**List command event subscriptions**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

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

### POST `/v1/platform/event-subscription/`

**Create a command event subscription**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

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

### DELETE `/v1/platform/event-subscription/`

**Delete a command event subscription**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

```bash
curl -sS -X DELETE 'https://api.dailybot.com/v1/platform/event-subscription/' -H 'X-API-KEY: $DAILYBOT_API_KEY'
```

### GET `/v1/platform/activity/`

**Read command activity feed**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

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

### POST `/v1/platform/activity/`

**Append to the command activity feed**

API-Key + X-EXCHANGE-TOKEN required. CLI Bearer is rejected on the platform surface.

- **Auth:** API key (`X-API-KEY`), Exchange token
- **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 |
| `404` | Not found or not visible |

#### Example (curl)

```bash
curl -sS -X POST 'https://api.dailybot.com/v1/platform/activity/' -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) (this page)
- [Agents](/developers/api/agents)
- [OAuth2](/developers/api/oauth2)
- [Integrations](/developers/api/integrations)
- [CLI](/developers/api/cli)

**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)

