Skip to content

Recetas de la API · Developers

Recetas de punta a punta que combinan varias llamadas a la API de Dailybot para lograr trabajo real.

Cada receta abajo es un flujo completo de punta a punta que puedes copiar y pegar hoy. Todas golpean la API pública usando ya sea una API key o un token Bearer del CLI — la garantía de paridad vale a lo largo.

Publica un reporte desde CI

Cada build verde envía una actualización de standup, así el equipo lee el build como si fuera un compañero.

GitHub Actions · Bash · curlPOST /v1/agent-reports/
# .github/workflows/release.yml (fragmento)
- name: Reportar a Dailybot
  env:
    DAILYBOT_API_KEY: ${{ secrets.DAILYBOT_API_KEY }}
  run: |
    curl -X POST https://api.dailybot.com/v1/agent-reports/ \
      -H "X-API-KEY: $DAILYBOT_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "message": "Envié v$RELEASE_TAG. Suite de regresión verde.",
        "type": "agent"
      }'

Completa un check-in desde un agente

Tu agente completa el standup por el desarrollador cuando está enfocado.

Python · requestsGET /v1/checkins/POST /v1/checkins/{uuid}/responses/
import os, requests

API = "https://api.dailybot.com"
H = {"X-API-KEY": os.environ["DAILYBOT_API_KEY"]}

pending = requests.get(f"{API}/v1/checkins/?only_pending=true", headers=H).json()
for checkin in pending["results"]:
    requests.post(
        f"{API}/v1/checkins/{checkin['uuid']}/responses/",
        headers=H,
        json={"answers": [{"question_uuid": q["uuid"], "answer": "Envié fix de paridad de auth; staging verde."} for q in checkin["questions"]]},
    )

Dispara un workflow desde un webhook

Conecta un evento externo a un workflow de Dailybot con dos llamadas a la API.

Node.js · TypeScript · fetchPOST /v1/webhook-subscription/POST /v1/workflows/{uuid}/trigger/
import { fetch } from 'undici';

const API = 'https://api.dailybot.com';
const H = { 'X-API-KEY': process.env.DAILYBOT_API_KEY!, 'Content-Type': 'application/json' };

// 1. Suscríbete una vez. Guarda el uuid.
const sub = await (await fetch(`${API}/v1/webhook-subscription/`, {
  method: 'POST', headers: H,
  body: JSON.stringify({ url: 'https://tu.app/dailybot/hook', events: ['workflow.trigger.requested'] }),
})).json();

// 2. En tu handler, dispara el workflow.
export async function handleHook(payload: { workflow_uuid: string; data: Record<string, unknown> }) {
  await fetch(`${API}/v1/workflows/${payload.workflow_uuid}/trigger/`, {
    method: 'POST', headers: H,
    body: JSON.stringify({ inputs: payload.data }),
  });
}

Reconoce a un compañero

Envía kudos desde un bot cuando alguien envía algo que vale la pena celebrar.

Bash · curlGET /v1/users/POST /v1/kudos/
USER_UUID=$(curl -s "https://api.dailybot.com/v1/users/?search=jane.doe" \
  -H "X-API-KEY: $DAILYBOT_API_KEY" | jq -r '.results[0].uuid')

curl -X POST https://api.dailybot.com/v1/kudos/ \
  -H "X-API-KEY: $DAILYBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"to_user_uuid\": \"$USER_UUID\", \"message\": \"¡Aterrizaste el fix de paridad de CI — buen trabajo!\", \"kudo_type\": \"appreciation\"}"

Completa un formulario desde un agente de IA

Usa la sub-skill forms del agent-skill para enviar un formulario en nombre de un desarrollador.

Cursor / Claude Code · agent-skillGET /v1/forms/POST /v1/forms/{uuid}/submit/
# El agente tiene la skill /skills/dailybot-agent instalada.
"Completa la retro semanal por mí — marca el bloqueo top como 'rollout del fix de paridad de auth'."

Suscríbete a eventos y reacciona

Convierte el stream de eventos de Dailybot en una superficie de ops.

Cualquier servidor HTTPPOST /v1/webhook-subscription/GET /v1/agent-messages/
curl -X POST https://api.dailybot.com/v1/webhook-subscription/ \
  -H "X-API-KEY: $DAILYBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://tu.app/dailybot/events",
    "subscriptions": ["followups.response.completed", "forms.response.created"]
  }'

# Verifica la firma HMAC que Dailybot envía con cada delivery
# (ver /es/developers/api/webhooks para el header y algoritmo actual).