{"name":"Veeda API Server","version":"1.0.0","description":"Centralized server for Veeda.io platform","environment":"production","documentation":{"swagger":"http://server.veeda.io/swagger","openapi":"http://server.veeda.io/api/openapi.json"},"endpoints":{"health":{"method":"GET","path":"/health","auth":false,"description":"Health check endpoint"},"readUser":{"method":"POST","path":"/api/readUser","body":{"phone":"+528132325757"},"description":"Get complete user profile","auth":true},"updateUser":{"method":"POST","path":"/api/updateUser","body":{"phone":"+528132325757","first_name":"John","second_last_name":"García","sex":"male"},"description":"Update user fields","auth":true},"changeUserPhone":{"method":"POST","path":"/api/changeUserPhone","body":{"old_phone":"+528132325757","new_phone":"+528199999999"},"description":"Migrate a user's account from old_phone to new_phone","auth":true},"deleteUser":{"method":"POST","path":"/api/deleteUser","body":{"phone":"+528132325757"},"description":"Delete user (soft delete)","auth":true},"readNom035":{"method":"POST","path":"/api/readNom035","body":{"phone":"+528132325757"},"description":"NOM-035 survey state (answers, next_screen, completed_at)","auth":true},"upsertNom035Section":{"method":"POST","path":"/api/upsertNom035Section","body":{"phone":"+528132325757","section":"intro","answers":{"traumatic_event_work":"No"},"next_screen":"NOM_BIN_A"},"description":"Merge partial NOM-035 answers per screen","auth":true},"completeNom035":{"method":"POST","path":"/api/completeNom035","body":{"phone":"+528132325757"},"description":"Mark NOM-035 survey completed","auth":true},"readPulsePollDefinition":{"method":"POST","path":"/api/readPulsePollDefinition","body":{"poll_id":"00000000-0000-0000-0000-000000000000"},"description":"Kapso: published pulse poll with questions and options","auth":true},"ensurePulsePollSubmission":{"method":"POST","path":"/api/ensurePulsePollSubmission","body":{"phone":"+528132325757","poll_id":"00000000-0000-0000-0000-000000000000"},"description":"Find-or-create poll_submissions (new row per call when anonymous)","auth":true},"appendPulsePollAnswer":{"method":"POST","path":"/api/appendPulsePollAnswer","body":{"phone":"+528132325757","submission_id":"00000000-0000-0000-0000-000000000000","question_id":"00000000-0000-0000-0000-000000000000","selected_option_id":"00000000-0000-0000-0000-000000000000"},"description":"Upsert poll_answers; ownership enforced when submission has user_id","auth":true},"completePulsePoll":{"method":"POST","path":"/api/completePulsePoll","body":{"phone":"+528132325757","submission_id":"00000000-0000-0000-0000-000000000000"},"description":"Validate all questions answered (no DB completed flag)","auth":true},"createDiscount":{"method":"POST","path":"/api/createDiscount","body":{"phone":"+528132325757","type":"movie"},"description":"Create a discount","auth":true},"readDiscount":{"method":"POST","path":"/api/readDiscount","body":{"phone":"+528132325757","type":"movie","last":true},"description":"Read discounts (flexible filtering)","auth":true},"redeemDiscount":{"method":"POST","path":"/api/redeemDiscount","body":{"phone":"+528132325757","type":"movie","cinema_chain":"CINEPOLIS"},"description":"Redeem any discount type","auth":true},"createAppointment":{"method":"POST","path":"/api/createAppointment","body":{"phone":"+528132325757","provider_id":"uuid-here","type":"medical_appointment","scheduled_date":"2026-02-15"},"description":"Create a new appointment","auth":true},"notifyCostumerDeskAgents":{"method":"POST","path":"/api/notifyCostumerDeskAgents","body":{"description":"Usuario sin acceso a consultas","user_affected_phone":"+528132325757"},"description":"Notify all customer desk agents via WhatsApp","auth":true},"submitSupportTicket":{"method":"POST","path":"/api/submitSupportTicket","body":{"phone":"+528132325757","motivoTicket":"Problema","detalleTicket":"Descripción del problema"},"description":"Create a ClickUp support ticket (WhatsApp Flow)","auth":true},"findProviderByPhone":{"method":"POST","path":"/api/findProviderByPhone","body":{"phone":"+528132325757"},"description":"Find provider by phone (optional HTTP then Supabase)","auth":true},"resolveWhatsAppActor":{"method":"POST","path":"/api/resolveWhatsAppActor","body":{"phone":"+528132325757"},"description":"Resolve user vs provider for WhatsApp (provider first on overlap)","auth":true},"getBirthdayUsers":{"method":"POST","path":"/api/getBirthdayUsers","body":{"month":4,"day":8},"description":"Get active subscribers whose birthday matches month/day","auth":true},"readCompanyServiceUsage":{"method":"POST","path":"/api/readCompanyServiceUsage","body":{"company_id":"00000000-0000-0000-0000-000000000000","service_category":"psychology"},"description":"Count appointments + HR phone for first-use alert per company+service","auth":true},"submitWhatsAppAppointmentFeedback":{"method":"POST","path":"/api/submitWhatsAppAppointmentFeedback","body":{"phone":"+528132325757","cal_booking_uid":"calBookingUid","feedback_kind":"psychologist","payload":{}},"description":"Kapso: WhatsApp Flow post-appointment feedback (Cal.com UID + payload)","auth":true}},"auth":{"method":"X-API-Key header","example":"X-API-Key: your_api_key_here"},"features":["✅ RPC-style API (all POST endpoints)","✅ Zod validation on all endpoints","✅ Flexible filtering in readDiscount","✅ Error monitoring with Zapier","✅ Centralized logging"]}