Contacts API
POST/contacts
Creates a new contact in Simuzap.
{
"name": "André Wilckay",
"email": "andre@simulazap.com",
"phone": "31999999999",
"school": "PUC Campinas",
"grade": "Superior",
"totalQuestions": 0,
"totalCorrect": 0
}
{
"id": "uuid",
"createdAt": "date"
}
GET/contacts
Returns all contacts.
school=Objetivo&grade=3º EM (future filter example)
[
{
"id": "uuid",
"name": "André Wilckay"
}
]
GET/contacts/:id
Returns contact by id.
{
"id": "uuid",
"name": "André Wilckay"
}
PATCH/contacts/:id
Updates a contact dynamically.
{
"school": "UNICAMP",
"grade": "Superior",
"totalCorrect": 12
}
{
"id": "uuid",
"school": "UNICAMP"
}
DELETE/contacts/:id
Removes a contact from database.
{
"message": "Contato removido com sucesso."
}
Sessions API (future)
POST/sessions/login
Future endpoint for token-based session authentication.
{
"email": "admin@simulazap.com",
"password": "********"
}
curl -X POST "http://localhost:3000/sessions/login" -H "Content-Type: application/json"
{
"token": "jwt",
"expiresIn": 3600
}
Webhook Integration
POST/webhooks/n8n/test
Future endpoint to dispatch test event to n8n and WhatsApp automations.
{
"event": "test_connection",
"platform": "Simuzap"
}
curl -X POST "http://localhost:3000/webhooks/n8n/test"