ByDomuDevelopers

Crear tarea

POSThttps://api.bydomu.com/v1/tasks

Crea una tarea suelta o vinculada a un negocio o a un contacto. Respeta el tope de tareas del plan (403 PLAN_LIMIT_REACHED). Responde solo el id: pide GET /tasks/{id} para el detalle.

Permiso que pide

tasks:write

Encabezado obligatorio

X-API-Key · clave secreta

Nivel de acceso

Nivel 3 · con revisión de soporte

Encabezados

1 · todos opcionales
Idempotency-Keystring · opcional
Clave única de la operación (8-128 caracteres de [a-zA-Z0-9._:-]). Un reintento con la misma clave y el mismo cuerpo devuelve la respuesta original sin repetir la operación. Vive 24 horas.8–128 chars

Cuerpo (JSON)

16 · 1 obligatorios
titlestring · obligatorio
2–200 chars
descriptionstring · opcional
≤ 2000 chars
typestring · opcional
CALL · EMAIL · WHATSAPP · VISIT · MEETING · SEND_PROPOSAL · SEND_CONTRACT · FOLLOW_UP · SCHEDULE_SHOWING · COLLECT_DOCUMENTS · OTHER · por defecto "OTHER"
prioritystring · opcional
LOW · MEDIUM · HIGH · URGENT · por defecto "MEDIUM"
dueDatestring · opcional
nullable
dueAtstring · opcional
nullable
Ver los otros 10 parámetros
dueOnstring · opcional
nullable
hasDueTimeboolean · opcional
remindMinutesBeforeinteger · opcional
0–10080 · nullable
assigneeIdstring · opcional
nullable
dealIdstring · opcional
nullable
contactIdstring · opcional
nullable
propertyIdstring · opcional
nullable
recurrencestring · opcional
DAILY · WEEKLY · MONTHLY · WEEKDAYS · nullable
recurrenceUntilstring · opcional
nullable
attachmentsobject[] · opcional

Respuesta 201

object · 1 campos
dataid
idstring

Errores posibles

con la forma { "error": { "code", "message" } }
  • 400Datos inválidos: el cuerpo o la query no cumplen el esquema, o `Idempotency-Key` está mal formada.
  • 401UNAUTHORIZED
  • 402PAYMENT_REQUIRED
  • 403FORBIDDEN
  • 404NOT_FOUND
  • 409DUPLICATE
  • 429RATE_LIMITED
  • 500INTERNAL_ERROR
PeticiónPOST/v1/tasks
SDK oficial · @bydomu/sdk · aún no está en npm
import { ByDomu } from "@bydomu/sdk";

const bydomu = new ByDomu({
  apiKey: process.env.BYDOMU_API_KEY,
});

const { data } = await bydomu.tasks.create({
  "title": "Llamar a María para confirmar la visita",
  "type": "CALL",
  "priority": "HIGH",
  "dueDate": "2026-10-01T15:00:00.000Z",
  "assigneeId": "clx1usr001",
  "contactId": "clx1con001"
});
201 Created · ejemplo
{
  "data": {
    "id": "clx1tsk001"
  }
}