Skip to content

Messaging

Send messages to individuals, teams, or channels through Dailybot. Thesend-message endpoint powers text messages, images, buttons, thread replies, bot impersonation, and edit-in-place — all through a single POST. Messages are delivered on the platform your organization connected (Slack, Microsoft Teams, Discord, or Google Chat).

MethodEndpointDescription
POST/v1/send-message/Send, thread, impersonate, and edit bot messages
POST/v1/send-email/Send an email to users by UUID
POST/v1/open-conversation/Create a private group conversation (Slack)

Send Message

POST/v1/send-message/Chave de APICLI Auth

Delivers a message to specified users, teams, or channels. At least one target (users, teams, or channels) must be provided.

Body Parameters

NameTypeRequiredDescription
messagestringOptionalMessage text (plain or an HTML-safe subset). Required unless `messages` is provided.
messagesarrayOptionalPlatform-specific payloads (advanced). Required if `message` is omitted.
target_usersarray<string>OptionalUser UUIDs, emails, or external IDs. At least one of target_users / target_channels / target_teams is required.
target_channelsarray<string | { id, channel_type?, thread? }>OptionalChannel IDs, either as plain strings or as objects. Use `{ id, thread: <parent_ts_or_id> }` to reply inside an existing thread.
target_teamsarray<string>OptionalTeam UUIDs — every member of the team receives the message.
thread_responsesarray<{ message: string }>OptionalUp to **10** replies posted under the same parent in one call. Only one level of nesting.
bot_message_idstringOptionalCustom idempotency ID. Re-POST with the same value within **72 hours** to edit the original message.
platform_settings.bot_usernamestringOptionalCustom bot display name for this message. **Slack only** (max 80 chars).
platform_settings.bot_icon_urlstringOptionalHTTPS URL for the bot avatar. **Slack only.** Mutually exclusive with `bot_icon_emoji`.
platform_settings.bot_icon_emojistringOptionalEmoji code for the bot avatar, e.g. `:rocket:`. **Slack only.**
platform_settings.is_ephemeralbooleanOptional**Slack only.** When `true`, message is posted inside the channel but visible only to the users in `target_users`.
image_urlstringOptionalHTTPS image URL to attach.
buttonsarray<{ label, button_type: 'link' | 'interactive', url? | value? }>OptionalInteractive buttons. `button_type: "link"` opens `url`; `"interactive"` returns `value` through the message webhook.
metadataobjectOptionalFree-form custom metadata attached to the message.
skip_users_on_time_offbooleanOptionalWhen true, users flagged as OOO / on-leave are skipped.
send_as_userstring (UUID)Optional**Slack only. Admin only.** UUID of an active org member. The message appears with that user's display name and avatar instead of the bot identity. Mutually exclusive with `bot_username`, `bot_icon_url`, and `bot_icon_emoji`. See [send_as_user](#send-as-user).
Request
curl -X POST "https://api.dailybot.com/v1/send-message/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Deployment completed successfully! ✅",
    "target_users": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
    "target_teams": ["b2c3d4e5-f6a7-8901-bcde-f12345678901"]
  }'
Response200 OK
json
{
  "bot_message_id": "$db/ae007b43-dde2-4fa9-bce3-71fb0975a249"
}

bot_message_id (string) — Either the ID sent in the request or a server-generated task ID in the form $db/<uuid>. Reuse it within 72h to edit the message.

Response403 Forbidden
json
{
  "detail": "cli_send_message_target_not_allowed",
  "code": "cli_send_message_target_not_allowed"
}

CLI role scoping blocked the request — see CLI role scoping.

Info

At least one of target_users, target_channels, or target_teams must be provided. Combine them freely — the message goes to every listed target.

Threaded replies

Two ways to thread. Pass `thread_responses` (up to 10) to publish a parent plus replies in a single call. Each reply ID comes back in the response for later editing.

To reply inside an existing thread, use the object form of `target_channels` and set `thread` to the parent timestamp/id.

Parent + up to 10 replies (one call)
curl -X POST "https://api.dailybot.com/v1/send-message/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Release 4.12.0 shipping now.",
    "target_channels": ["C0123456789"],
    "thread_responses": [
      {"message": "Frontend: build passed"},
      {"message": "Backend: migrations OK"},
      {"message": "Full changelog: https://acme.example/rel/4.12.0"}
    ]
  }'
Reply inside an existing thread
curl -X POST "https://api.dailybot.com/v1/send-message/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "One caveat: enable feature flag \"nav_v2\" first.",
    "target_channels": [
      { "id": "C0123456789", "thread": "1710000000.123456" }
    ]
  }'
ResponseThreaded response
json
{
  "bot_message_id": "$db/ae007b43-dde2-4fa9-bce3-71fb0975a249",
  "thread_responses": [
    "$db/thread-1",
    "$db/thread-2",
    "$db/thread-3"
  ]
}

Every entry of thread_responses is an editable reply ID. Feed it to dailybot chat update <id> or POST again with bot_message_id set to that ID.

Info

Threading in DMs varies by platform: Slack keeps threads in both channels and DMs; Microsoft Teams, Discord, and Google Chat thread in channels only and post flat in DMs.

Bot impersonation (Slack)

`platform_settings.bot_username` together with `bot_icon_url` OR `bot_icon_emoji` changes the bot display for the message. Slack only today — other platforms silently ignore the block and use the connected bot identity.

Impersonate for one message
curl -X POST "https://api.dailybot.com/v1/send-message/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Deployed 4.12.0 to production ✅",
    "target_channels": ["C0123456789"],
    "platform_settings": {
      "bot_username": "Release Bot",
      "bot_icon_emoji": ":rocket:"
    }
  }'

Info

Identity fields are ignored on edit — once a message is posted the platform keeps its original bot name/avatar even if you re-POST with different values.

Editing a message

Re-POST the endpoint with the same `bot_message_id` within **72 hours** to edit the original. Works on the parent as well as on any of its `thread_responses` IDs.

Edit within 72h
curl -X POST "https://api.dailybot.com/v1/send-message/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "bot_message_id": "release-4.12.0",
    "message": "Deployed 4.12.0 — rollback in progress ⚠️",
    "target_channels": ["C0123456789"]
  }'

Info

The CLI wraps this with dailybot chat update -m "…". See the Bot messaging skill in the agent skill pack for higher-level usage.

Ephemeral messages (Slack)

Set `platform_settings.is_ephemeral: true` together with `target_users` to post a message inside the specified channel that only those users see. Slack-only feature; other platforms treat it as a normal message.

Slack-only ephemeral message
curl -X POST "https://api.dailybot.com/v1/send-message/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Heads-up: your on-call rotation starts in 10 minutes.",
    "target_channels": ["C0123456789"],
    "target_users": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
    "platform_settings": { "is_ephemeral": true }
  }'

Tip

The channel must contain the target user — Slack does not allow ephemeral messages to users outside the channel.

send_as_user identity override (Slack only)

send_as_user lets an authorized caller post a message that appears to come from another user — the message shows that user's Slack display name and profile picture instead of the Dailybot bot identity.

The message is still delivered through the Dailybot bot token (it does not use the target user's own Slack token), so it respects the bot's channel access and Slack's bot-message attribution rules.

  • Caller must be an organization admin (or have a key owned by an admin).
  • The target user (send_as_user UUID) must be active and in the same organization.
  • Slack only — other platforms silently fall back to the standard bot identity.
  • send_as_user is mutually exclusive with bot_username, bot_icon_url, and bot_icon_emoji.
Send as another user (admin only)
curl -X POST "https://api.dailybot.com/v1/send-message/" \
  -H "X-API-KEY: $DAILYBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "The sprint is closed and all tickets are resolved.",
    "target_channels": ["C0123456789"],
    "send_as_user": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'
HTTPcodeWhen
403org_admin_requiredCaller is not an org admin.
400send_as_user_conflictsend_as_user combined with bot_username, bot_icon_url, or bot_icon_emoji.
400send_as_user_invalid_uuidInvalid UUID format.
400send_as_user_not_foundUser not found, inactive, or in a different org.

Use cases

  • Automated standup summaries posted under the team member's name.
  • AI-generated check-in reminders attributed to the manager.
  • Workflow outputs attributed to the user who triggered them.

CLI role scoping

When the caller is a CLI-authenticated user (not a machine API key), Dailybot enforces role-based reach: admins and managers can target any user/team/public channel; team members can target their shared-team members plus public channels; guests can only send to themselves. Sending outside that scope returns 403 with error `cli_send_message_target_not_allowed`.

Send Email

POST/v1/send-email/Chave de APICLI Auth

Sends an email to the specified users (by user UUID).

Body Parameters

NameTypeRequiredDescription
users_uuidsarray of strings (UUID)RequiredUser UUIDs to receive the email.
email_subjectstringRequiredSubject of the email.
email_contentstringRequiredBody of the email (HTML or plain text).
Request
curl -X POST "https://api.dailybot.com/v1/send-email/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "users_uuids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
    "email_subject": "Weekly Report Ready",
    "email_content": "Your weekly team report is now available. Check your dashboard."
  }'
Response200 OK
json
{
  "detail": "Emails sent successfully."
}

detail (string) — Success message.

Response400 Bad Request
json
{
  "detail": "one_or_more_users_not_found",
  "code": "one_or_more_users_not_found"
}

One or more user UUIDs not found.

Response403 Forbidden
json
{
  "detail": "Invalid or missing API key.",
  "code": "authentication_failed"
}

Missing or invalid API key.

Open Conversation

POST/v1/open-conversation/Chave de APICLI Auth

Creates a private group conversation (e.g. in Slack) with the specified users.

Body Parameters

NameTypeRequiredDescription
users_uuidsarray of strings (UUID)RequiredUser UUIDs to include in the conversation.
Request
curl -X POST "https://api.dailybot.com/v1/open-conversation/" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "users_uuids": [
      "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    ]
  }'
Response200 OK
json
{
  "channel": "C0123456789"
}

channel (string) — The platform channel ID (e.g. Slack channel ID).

Response400 Bad Request
json
{
  "detail": "one_or_more_users_not_found",
  "code": "one_or_more_users_not_found"
}

One or more user UUIDs not found in the organization.

Response403 Forbidden
json
{
  "detail": "Invalid or missing API key.",
  "code": "authentication_failed"
}

Missing or invalid API key.

Info

The Open Conversation endpoint is currently available only for organizations using Slack as their platform.