> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks API overview

> Receive real-time HTTP notifications for partner sign-ups, customer creation, and transactions. Automate your affiliate program workflows.

Webhooks send real-time HTTP POST requests to your server when events occur in Partnero. Use them to sync data, trigger workflows, or update external systems automatically.

## Available Events

| Event                 | Description                                 |
| --------------------- | ------------------------------------------- |
| `partner.created`     | New partner signs up or is created manually |
| `partner.updated`     | Existing partner is updated                 |
| `partner.deleted`     | Partner is deleted                          |
| `partner.approved`    | Partner is approved                         |
| `partner.rejected`    | Partner is rejected                         |
| `partner.archived`    | Partner is archived                         |
| `customer.created`    | New customer is created                     |
| `customer.updated`    | Existing customer is updated                |
| `customer.deleted`    | Customer is deleted                         |
| `transaction.created` | New transaction occurs                      |
| `transaction.deleted` | Transaction is deleted (refund)             |

## Webhook Payload

When an event occurs, Partnero sends a `POST` request to your configured URL with event data:

```json theme={null}
{
  "event": "partner.created",
  "data": {
    "id": "partner_123",
    "email": "john.doe@partnero.com",
    "name": "John",
    "surname": "Doe",
    "created_at": "2025-05-07T10:30:00.000000Z"
  },
  "timestamp": "2025-05-07T10:30:00.000000Z"
}
```

## Verifying Webhooks

Each webhook includes a signature for verification. Use the `signature` value from your webhook configuration to validate incoming requests.

<Warning>
  Always verify webhook signatures in production to ensure requests originate from Partnero.
</Warning>

## Best Practices

<AccordionGroup>
  <Accordion title="Return 2xx quickly">
    Respond with a 2xx status code within 5 seconds. Process data asynchronously if needed.
  </Accordion>

  <Accordion title="Handle retries">
    Partnero retries failed webhooks. Implement idempotency to handle duplicate deliveries.
  </Accordion>

  <Accordion title="Use HTTPS">
    Always use HTTPS endpoints in production for security.
  </Accordion>
</AccordionGroup>

## Common Use Cases

| Event                 | Use Case                                          |
| --------------------- | ------------------------------------------------- |
| `partner.created`     | Send welcome email, create account in your system |
| `partner.approved`    | Notify partner, enable portal access              |
| `customer.created`    | Sync to CRM, trigger onboarding                   |
| `transaction.created` | Update dashboards, notify sales team              |
| `transaction.deleted` | Handle refunds, reverse commissions               |

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Webhook" icon="plus" href="/api-reference/webhooks/create">
    Subscribe to events via API
  </Card>

  <Card title="List Webhooks" icon="list" href="/api-reference/webhooks/list">
    View existing webhook subscriptions
  </Card>
</CardGroup>
