Create Appointment
POST
/public/v1/appointments
const url = 'https://api.nuntius.chat/public/v1/appointments';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"assignedUserId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","title":"example","appointmentType":"example","startsAt":"2026-04-15T12:00:00Z","endsAt":"2026-04-15T12:00:00Z","customerId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","conversationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","leadId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","notes":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.nuntius.chat/public/v1/appointments \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "assignedUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "title": "example", "appointmentType": "example", "startsAt": "2026-04-15T12:00:00Z", "endsAt": "2026-04-15T12:00:00Z", "customerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "conversationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "leadId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "notes": "example" }'Create a scheduled appointment (source='manual', SPEC_API_PUBLICA.md §2.4).
Every id in the body (assignedUserId/customerId/conversationId/leadId)
resolves (id, tenant_id) inside AppointmentService – unknown/foreign -> 404,
zero persistence. A real overlap -> 409 APPOINTMENT_OVERLAP.
Idempotency-Key (API-3, D-API-4) is optional: a repeat with the SAME header and SAME body
replays the original response without creating a second appointment; the SAME header with a
DIFFERENT body -> 422 IDEMPOTENCY_KEY_REUSE_MISMATCH.
Permiso necesario: tenant:appointments.manage
