# Webhooks v1 reference

The bodies Cademí sends to a webhook set to payload version 1. Version 1 is deprecated and receives fixes only; new webhooks should use version 2.

Every event is a `POST` with a JSON body: `event_id`, `event_type` (the event name, in Portuguese) and the data in `event`.

## Students

| Event | Name | When |
|---|---|---|
| [Student created](https://cademi.dev/webhooks/v1/reference/usuario-criado.md) | `usuario.criado` | Sent every time a student is created by a sale, by an import, by the dashboard or by the API. Google sign-in does not fire it. |
| [Student created by free access](https://cademi.dev/webhooks/v1/reference/usuario-criado-gratis.md) | `usuario.criado.gratis` | Sent every time a student is created through a free access flow (free sign-up form or redirect). |
| [Access granted](https://cademi.dev/webhooks/v1/reference/usuario-acesso-adicionado.md) | `usuario.acesso.adicionado` | Sent every time a delivery is added to a student by hand, from the dashboard or the API. A delivery granted by a sale fires only `delivery.add`. |
| [Terms accepted](https://cademi.dev/webhooks/v1/reference/termo-assinado.md) | `termo.assinado` | Sent every time a student accepts the platform terms or a product terms. |

## Learning progress

| Event | Name | When |
|---|---|---|
| [Lesson completed](https://cademi.dev/webhooks/v1/reference/aula-concluida.md) | `aula.concluida` | Sent every time a student completes a lesson. |
| [Product started](https://cademi.dev/webhooks/v1/reference/curso-iniciado.md) | `curso.iniciado` | Sent every time a student starts a product. |
| [Product at 50%](https://cademi.dev/webhooks/v1/reference/curso-progresso-50-percent.md) | `curso.progresso.50` | Sent every time a student crosses 50% progress in a product. |
| [Product at 75%](https://cademi.dev/webhooks/v1/reference/curso-progresso-75-percent.md) | `curso.progresso.75` | Sent every time a student crosses 75% progress in a product. |
| [Product at 90%](https://cademi.dev/webhooks/v1/reference/curso-progresso-90-percent.md) | `curso.progresso.90` | Sent every time a student crosses 90% progress in a product. |
| [Product milestone](https://cademi.dev/webhooks/v1/reference/curso-progresso.md) | `curso.progresso` | Sent every time a student crosses the 50%, 75% or 90% mark in a product. It is the generic version of the three milestone events. |
| [Product completed](https://cademi.dev/webhooks/v1/reference/curso-concluido.md) | `curso.concluido` | Sent every time a student completes every lesson of a product. |
| [Progress reached](https://cademi.dev/webhooks/v1/reference/usuario-progresso.md) | `usuario.progresso` | Sent every time the student progress in a product reaches the percentage set in the webhook. Carries `progress_percentage`. |

## Exams

| Event | Name | When |
|---|---|---|
| [Exam passed](https://cademi.dev/webhooks/v1/reference/prova-aprovado.md) | `prova.aprovado` | Sent every time a student passes an exam. |
| [Exam failed](https://cademi.dev/webhooks/v1/reference/prova-reprovado.md) | `prova.reprovado` | Sent every time a student fails an exam. |

## Certificates

| Event | Name | When |
|---|---|---|
| [Certificate issued](https://cademi.dev/webhooks/v1/reference/certificado-emitido.md) | `certificado.emitido` | Sent every time a certificate is issued to a student, reissues included. |

## Deliveries

| Event | Name | When |
|---|---|---|
| [Delivery added](https://cademi.dev/webhooks/v1/reference/entrega-adicionada.md) | `entrega.adicionada` | Sent every time a delivery is added to a student, by hand or by a sale. |

## Diamond funnel

| Event | Name | When |
|---|---|---|
| [Diamond: Checkout abandoned](https://cademi.dev/webhooks/v1/reference/diamond-checkout-abandoned.md) | `spyhub.diamond.checkout_abandoned` | The student opened the checkout and did not buy. |
| [Diamond: Checkout started](https://cademi.dev/webhooks/v1/reference/diamond-checkout-initiated.md) | `spyhub.diamond.checkout_initiated` | The student opened the checkout. |
| [Diamond: Checkout not started](https://cademi.dev/webhooks/v1/reference/diamond-checkout-not-initiated.md) | `spyhub.diamond.checkout_not_initiated` | The student has not opened the checkout in the expected time. |
| [Diamond: Class 1 completed](https://cademi.dev/webhooks/v1/reference/diamond-class-1-concluded.md) | `spyhub.diamond.class_1_concluded` | The student completed class 1. |
| [Diamond: Class 1 not started](https://cademi.dev/webhooks/v1/reference/diamond-class-1-not-initiated.md) | `spyhub.diamond.class_1_not_initiated` | The student has not started class 1 in the expected time. |
| [Diamond: Class 2 completed](https://cademi.dev/webhooks/v1/reference/diamond-class-2-concluded.md) | `spyhub.diamond.class_2_concluded` | The student completed class 2. |
| [Diamond: Class 2 not started](https://cademi.dev/webhooks/v1/reference/diamond-class-2-not-initiated.md) | `spyhub.diamond.class_2_not_initiated` | The student has not started class 2 in the expected time. |
| [Diamond: Class 3 completed](https://cademi.dev/webhooks/v1/reference/diamond-class-3-concluded.md) | `spyhub.diamond.class_3_concluded` | The student completed class 3. |
| [Diamond: Class 3 not started](https://cademi.dev/webhooks/v1/reference/diamond-class-3-not-initiated.md) | `spyhub.diamond.class_3_not_initiated` | The student has not started class 3 in the expected time. |
| [Diamond: Lead](https://cademi.dev/webhooks/v1/reference/diamond-lead.md) | `spyhub.diamond.lead` | The student entered the funnel. |
| [Diamond: Won](https://cademi.dev/webhooks/v1/reference/diamond-won.md) | `spyhub.diamond.won` | The student bought the product. |
