# API keys and webhooks

> For developers — create a private integration token and send or receive data with webhooks.


## Private integration tokens

Use a private integration token to let your own scripts or another system talk to One Space through the API.

1. Go to **Settings → Private Integrations** and click **Create new integration**.
2. Name it after the system that will use it.
3. Choose only the **scopes** it needs (for example *contacts.readonly*).
4. Click **Create** and copy the token — it's shown **once**.

> [!WARNING]
> Treat tokens like passwords. Don't paste them into emails, chats or public code. If one leaks, delete the integration and create a new one.

## Send data out (outbound webhook)

In a workflow, add the **Webhook** action, paste the receiving URL and choose the method. One Space posts the contact and event data to that URL whenever the workflow reaches the step.

## Receive data (inbound webhook)

1. Create a workflow with the **Inbound webhook** trigger.
2. Copy the webhook URL it gives you and paste it into the other system.
3. Send a test request, then click **Fetch sample** to map the incoming fields to contact fields.

## Example request

```bash
curl -X POST "https://your-inbound-webhook-url" \
  -H "Content-Type: application/json" \
  -d '{"first_name":"Jordan","email":"jordan@example.com","source":"partner-site"}'
```
