Sprints

Iteraciones del proyecto con ventana opcional. La API gestiona su contenido; su ciclo de vida (activar, cerrar) vive en la app.

Estados de un sprint

  • plannedPlanificado

    Recién creado; acepta tareas. Todo sprint nace así — también por API.

  • activeActivo

    El sprint en curso. Solo puede haber uno por proyecto a la vez.

  • closedCerrado

    Registro histórico: al cerrarlo desde la app, las tareas terminadas (done, cancelled) se quedan y las abiertas se mudan a otro sprint o al backlog. No admite tareas nuevas — asignar una tarea a un sprint cerrado responde 404.

Activar y cerrar implican decisiones (qué pasa con las tareas abiertas) y por eso se hacen desde la app, no desde la API. El campo status es de solo lectura: enviarlo en un cuerpo responde 400.

Listar sprints

GET/api/v1/sprintsLectura (cualquier key)

Todos los sprints del proyecto, el más nuevo primero.

Request
curl https://planely.dev/api/v1/sprints \
  -H "Authorization: Bearer $PLANELY_API_KEY"
200 OK
{
  "sprints": [
    {
      "id": "e01b…",
      "name": "Sprint 12",
      "goal": "Cerrar la beta",
      "status": "active",
      "startDate": "2026-07-20",
      "endDate": "2026-07-31",
      "createdAt": "2026-07-18T09:00:00.000Z"
    }
  ]
}

Crear un sprint

POST/api/v1/sprintsPermiso: Gestionar sprints

Nace en planned.

Cuerpo (JSON)

  • namestringobligatorio

    1–100 caracteres

  • goalstring | null

    Hasta 1000 caracteres

  • startDateYYYY-MM-DD | null

    Día civil de Madrid

  • endDateYYYY-MM-DD | null

    Debe ser ≥ startDate

Request
curl -X POST https://planely.dev/api/v1/sprints \
  -H "Authorization: Bearer $PLANELY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Sprint 13", "startDate": "2026-08-03", "endDate": "2026-08-14" }'
201 Created
{ "sprint": { "id": "f21c…", "name": "Sprint 13", "status": "planned",} }

Actualizar un sprint

PATCH/api/v1/sprints/{sprintId}Permiso: Gestionar sprints

Parcial (nombre, objetivo, ventana). El estado no es editable por API.

Cuerpo (JSON)

  • namestring
  • goalstring | null
  • startDateYYYY-MM-DD | null
  • endDateYYYY-MM-DD | null
  • La ventana resultante debe cumplir startDate ≤ endDate (400 si no).
Request
curl -X PATCH https://planely.dev/api/v1/sprints/f21c… \
  -H "Authorization: Bearer $PLANELY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "goal": "Pulir onboarding" }'
200 OK
{ "sprint": { "id": "f21c…", "goal": "Pulir onboarding",} }

Eliminar un sprint

DELETE/api/v1/sprints/{sprintId}Permiso: Gestionar sprints

Las tareas sobreviven: vuelven al backlog (sprint = null).

Request
curl -X DELETE https://planely.dev/api/v1/sprints/f21c… \
  -H "Authorization: Bearer $PLANELY_API_KEY"
204 No Content
(sin cuerpo)