# CI/CD recipes

> Drop-in recipes to notify Dailybot from any pipeline. Same pattern the Dailybot release workflows use: one curl call against the public REST API — no runtime to install, no CLI to keep in sync.

Language: en
Canonical: https://www.dailybot.com/developers/cli-ci-cd
Markdown: send header `Accept: text/markdown` on any URL to receive Markdown instead of HTML.
Last Updated: 2026-07-02

---

Every CI vendor supports environment variables and secrets — that is all you need to talk to Dailybot. The recipes below use plain `curl` + `jq` against the public REST API, the same pattern [Dailybot's own release workflows](https://github.com/DailybotHQ) use. Prefer a CLI? Skip to [the CLI section](#cli).

<h2 id="endpoints">Which endpoint?</h2>

Two endpoints cover the vast majority of CI/CD use cases. Both accept an `X-API-KEY` header and return JSON.

| Method | Path | When |
|--------|------|------|
| POST | [`/v1/send-message/`](/developers/api/messaging) | Notify a channel, user, or team on your connected chat platform (Slack, MS Teams, Discord, Google Chat). Best for deploy started / deploy live / build failed alerts. |
| POST | [`/v1/agent-reports/`](/developers/api/agents) | File a standup-style progress entry as an agent identity. Best for nightly cron summaries, per-deploy reports, and any recurring "what happened today" update. |

<h2 id="recipes">API-first recipes</h2>

Every snippet is non-blocking: if Dailybot is briefly unreachable, the pipeline keeps going. Timeouts (`--connect-timeout 10 --max-time 30`) match the pattern in this website's own workflows.

### GitHub Actions — notify a channel

```yaml
# .github/workflows/notify-deploy.yml
name: Notify deploy
on:
  workflow_run:
    workflows: ["release"]
    types: [completed]

jobs:
  notify:
    runs-on: ubuntu-latest
    timeout-minutes: 3
    steps:
      - name: Install jq
        run: sudo apt-get update && sudo apt-get install -y jq

      - name: Post to Dailybot
        env:
          # Channel UUID from your Dailybot workspace.
          DAILYBOT_CHANNEL: ${{ vars.DAILYBOT_DEPLOY_CHANNEL }}
        run: |
          MESSAGE=$'✅ *Deploy live*\n> commit: `'"${GITHUB_SHA:0:8}"'`\n> actor: '"$GITHUB_ACTOR"
          BODY=$(jq -n --arg msg "$MESSAGE" --arg ch "$DAILYBOT_CHANNEL" \
            '{message: $msg, target_channels: [$ch]}')
          curl --fail --show-error --connect-timeout 10 --max-time 30 \
            'https://api.dailybot.com/v1/send-message/' \
            -H "X-API-KEY: ${{ secrets.DAILYBOT_API_KEY }}" \
            -H 'Content-Type: application/json' \
            -d "$BODY" \
            || echo "Dailybot notification failed; continuing."
```

### GitHub Actions — file an agent report

```yaml
# .github/workflows/nightly-report.yml
name: Nightly agent report
on:
  schedule:
    - cron: "0 23 * * *"

jobs:
  report:
    runs-on: ubuntu-latest
    timeout-minutes: 3
    steps:
      - name: Install jq
        run: sudo apt-get update && sudo apt-get install -y jq

      - name: File progress report
        run: |
          BODY=$(jq -n \
            --arg summary "Nightly batch completed on ${GITHUB_REF_NAME}." \
            --argjson milestone false \
            '{summary: $summary, milestone: $milestone}')
          curl --fail --show-error --connect-timeout 10 --max-time 30 \
            'https://api.dailybot.com/v1/agent-reports/' \
            -H "X-API-KEY: ${{ secrets.DAILYBOT_API_KEY }}" \
            -H 'Content-Type: application/json' \
            -d "$BODY" \
            || echo "Agent report failed; continuing."
```

### GitLab CI

```yaml
# .gitlab-ci.yml (fragment)
notify-dailybot:
  stage: notify
  image: alpine:3
  before_script:
    - apk add --no-cache curl jq
  variables:
    DAILYBOT_CHANNEL: "$DAILYBOT_DEPLOY_CHANNEL"  # UUID, set as a masked CI variable
  script: |
    BODY=$(jq -n \
      --arg msg "Pipeline ${CI_PIPELINE_ID} succeeded on ${CI_COMMIT_REF_NAME}." \
      --arg ch "$DAILYBOT_CHANNEL" \
      '{message: $msg, target_channels: [$ch]}')
    curl --fail --show-error --connect-timeout 10 --max-time 30 \
      'https://api.dailybot.com/v1/send-message/' \
      -H "X-API-KEY: $DAILYBOT_API_KEY" \
      -H 'Content-Type: application/json' \
      -d "$BODY" \
      || echo "Dailybot notification failed; continuing."
  only:
    - main
```

### CircleCI

```yaml
# .circleci/config.yml (fragment)
version: 2.1
jobs:
  notify-dailybot:
    docker:
      - image: cimg/base:current
    steps:
      - run:
          name: Post to Dailybot
          command: |
            BODY=$(jq -n \
              --arg msg "Job ${CIRCLE_JOB} passed on ${CIRCLE_BRANCH}." \
              --arg ch "$DAILYBOT_DEPLOY_CHANNEL" \
              '{message: $msg, target_channels: [$ch]}')
            curl --fail --show-error --connect-timeout 10 --max-time 30 \
              'https://api.dailybot.com/v1/send-message/' \
              -H "X-API-KEY: $DAILYBOT_API_KEY" \
              -H 'Content-Type: application/json' \
              -d "$BODY" \
              || echo "Dailybot notification failed; continuing."
workflows:
  build-and-notify:
    jobs:
      - notify-dailybot:
          context: dailybot-org  # store DAILYBOT_API_KEY + DAILYBOT_DEPLOY_CHANNEL here
```

### Bash / cron

```bash
# /etc/cron.d/dailybot-nightly-report
# Every day at 23:00 UTC, file a summary standup.
SHELL=/bin/bash
# Source DAILYBOT_API_KEY from your host secret store; never hard-code it here.
0 23 * * * app source /etc/dailybot.env && curl --fail --show-error --connect-timeout 10 --max-time 30 \
  'https://api.dailybot.com/v1/agent-reports/' \
  -H "X-API-KEY: $DAILYBOT_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"summary":"Nightly batch completed.","milestone":false}' \
  >> /var/log/dailybot-report.log 2>&1
```

### Kubernetes CronJob

```yaml
# k8s/dailybot-nightly.yaml (fragment)
apiVersion: batch/v1
kind: CronJob
metadata:
  name: dailybot-nightly-report
spec:
  schedule: "0 23 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: dailybot
              image: curlimages/curl:8.10.1
              envFrom:
                - secretRef: { name: dailybot-secrets }   # exposes DAILYBOT_API_KEY
              command: ["sh", "-c"]
              args:
                - |
                  curl --fail --show-error --connect-timeout 10 --max-time 30 \
                    'https://api.dailybot.com/v1/agent-reports/' \
                    -H "X-API-KEY: $DAILYBOT_API_KEY" \
                    -H 'Content-Type: application/json' \
                    -d '{"summary":"Nightly maintenance ran cleanly.","milestone":false}'
```

<h2 id="cli">Prefer a CLI?</h2>

The Dailybot CLI is a Python package published on PyPI: [pypi.org/project/dailybot-cli](https://pypi.org/project/dailybot-cli/). It wraps the same endpoints — `dailybot chat send …` calls `/v1/send-message/`, `dailybot agent update …` calls `/v1/agent-reports/`. For CI/CD, we recommend the curl recipes above (no runtime install, one HTTP call, always up-to-date with the API). The CLI is the better fit for local dev and long-running agent processes.

```bash
# Recommended — universal one-liner (macOS, Linux, WSL, Git Bash)
curl -fsSL https://cli.dailybot.com/install.sh | bash

# Isolated Python env via pipx
pipx install dailybot-cli

# Or pip
pip install dailybot-cli

# Verify
dailybot --version
```

<h2 id="secrets">Storing DAILYBOT_API_KEY safely</h2>

Never commit `DAILYBOT_API_KEY` to source. Every vendor above ships a first-class secrets facility — GitHub secrets, GitLab masked/protected variables, CircleCI contexts, Kubernetes secrets, systemd `EnvironmentFile=` for cron. Rotate the key from your Dailybot dashboard the moment a shared credential leaves the org.

---

## 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)
- [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) (this page)
- [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)

