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/).
Info
AUTH_FETCH_EXCHANGE_TOKEN) to get an exchange token for a user. Request body: user_uuid (required), include_user_context (optional). | Method | Endpoint | Description |
|---|---|---|
| POST | /v1/platform/scheduling/ | Create a scheduled execution |
| GET | /v1/platform/scheduling/{scheduled-execution-uuid}/ | Get a scheduled execution |
| PUT | /v1/platform/scheduling/{scheduled-execution-uuid}/ | Update a scheduled execution |
| DELETE | /v1/platform/scheduling/{scheduled-execution-uuid}/ | Delete a scheduled execution |
| POST | /v1/platform/storage/ | Run a storage operation (get/set/delete) |
| POST | /v1/platform/event-subscription/ | Register command hook for event subscriptions |
| DELETE | /v1/platform/event-subscription/ | Unregister command hook |
| GET | /v1/platform/activity/ | List activity records for the command |
| POST | /v1/platform/activity/ | Create an activity record |
| POST | /v1/auth/fetch-command-exchange-token/ | Get an exchange token for a user |
Scheduling
/v1/platform/scheduling/ Creates a scheduled execution. Requires either an exchange token (from command context) or a valid command_uuid in the body.
Body params: name (string, required), command_uuid (UUID, optional*), execution_frequency (integer, default 0), cron (string), repeats (integer, default -1), payload (object, default ), timezone_type (string), is_owned_by_user (boolean, default true). *command_uuid required if no exchange token.
curl -X POST "https://api.dailybot.com/v1/platform/scheduling/" -H "X-API-KEY: your_api_key_here" -H "X-EXCHANGE-TOKEN: exchange_token_here" -H "Content-Type: application/json" -d '{"name": "Daily sync", "cron": "0 9 * * 1-5", "payload": {}}'Response: 200 OK
{
"uuid": "scheduled-execution-uuid"
}Response: 400 Bad Request
Missing token and command:
{
"detail": "You should specify an exchange token or valid command",
"code": "missing_token_or_command"
}Invalid command (wrong organization):
{
"detail": "Command is not valid. It must be owned by the same API Key organization owner",
"code": "invalid_command_specified"
} /v1/platform/scheduling/{scheduled-execution-uuid}/ Returns a scheduled execution by UUID. Requires exchange token; object must belong to the exchange context organization.
Response: 200 OK
{
"uuid": "scheduled-execution-uuid",
"name": "Daily sync",
"timezone_type": "organization_timezone",
"is_active": true,
"cron": "0 9 * * 1-5",
"execution_frequency": 0,
"repeats": -1,
"payload": {},
"callback_url": "https://..."
}Response: 404 Not Found
{
"detail": "Not found.",
"code": "not_found"
} /v1/platform/scheduling/{scheduled-execution-uuid}/ Updates a scheduled execution. Requires exchange token.
Body params: name, timezone_type, is_active, cron, execution_frequency, repeats, payload, callback_url (all optional).
Response: 200 OK
Updated scheduled execution object (same shape as GET).
/v1/platform/scheduling/{scheduled-execution-uuid}/ Deletes a scheduled execution. Requires exchange token.
Response: 204 No Content
Success. No body.
Storage
/v1/platform/storage/ Runs a storage operation (e.g. get, set, delete). Requires either an exchange token or a namespace in the body.
Body params: op (string, required), params (object, required), namespace (string, optional — required if no exchange token).
curl -X POST "https://api.dailybot.com/v1/platform/storage/" -H "X-API-KEY: your_api_key_here" -H "X-EXCHANGE-TOKEN: exchange_token_here" -H "Content-Type: application/json" -d '{"op": "get", "params": {"key": "user_preferences"}}'Response: 200 OK
{
"key": "value"
}Response: 400 Bad Request
Missing context:
{
"detail": "You must provide either a valid exchange token or a namespace parameter",
"code": "missing_context"
}Validation error:
{
"details": "Validation error message"
}Event subscription
/v1/platform/event-subscription/ Registers a command hook for event subscriptions. Requires exchange token.
Body params: subscriptions (array of strings, required), subscribed_objects (array of strings, optional, default []).
Response: 200 OK
{
"hook_uuid": 123
}hook_uuid is the numeric hook ID.
Response: 400 Bad Request
{
"details": "Validation error message"
} /v1/platform/event-subscription/ Unregisters the command hook. Requires exchange token. No body parameters.
Response: 200 OK
No body.
Response: 400 Bad Request
{
"detail": "You should specify a valid exchange token",
"code": "missing_token"
}Activity
/v1/platform/activity/ Returns activity records for the command. Requires exchange token.
Response: 200 OK
[
{
"command": "command-uuid",
"organization": "org-uuid",
"user": "user-uuid",
"category": "usage",
"action": "triggered",
"label": null,
"metadata": {},
"created_at": "2026-02-25T12:00:00Z"
}
] /v1/platform/activity/ Creates an activity record for the command. Requires exchange token.
Body params: category (string, required), action (string, required), label (string, optional), metadata (object, optional, default ), user_uuid (UUID, optional).
Response: 201 Created
{
"command": "command-uuid",
"organization": "org-uuid",
"user": "user-uuid",
"category": "usage",
"action": "triggered",
"label": null,
"metadata": {},
"created_at": "2026-02-25T12:00:00Z"
}POST /v1/auth/fetch-command-exchange-token/
/v1/auth/fetch-command-exchange-token/ Returns an exchange token for a user. Requires API key with scope for auth fetch exchange token. Used so the API key owner can act in the context of another user for the command.
Body params: user_uuid (UUID, required), include_user_context (boolean, optional, default false).
Response: 200 OK
{
"token": "exchange-token-string"
}With include_user_context: true, the response also includes user and organization objects.
Response: 406 Not Acceptable
User not found or not allowed:
{
"detail": "Could not find the user related to "user_uuid""
}Or:
{
"detail": "Command is not Public and cannot request exchange tokens of non-same-org users"
}