# Integrations

Use Pozy from n8n, Make, Zapier or any automation tool through plain HTTP requests and webhooks, with the settings, safety habits and recipes that carry over.

Any automation tool that can send an HTTP request can use Pozy, and any tool that can receive one can react to Pozy events. Two building blocks cover almost everything:

- **Actions:** an HTTP request from the tool to `https://api.pozy.ai/v1/...` with your API key. Create a post, send a message, read analytics.
- **Triggers:** a webhook from Pozy to a URL the tool gives you. React when a post publishes or fails, a DM arrives, or an account disconnects.

The guides below walk through each tool. The settings are the same everywhere.

- [n8n](https://pozy.ai/docs/integrations/n8n): HTTP Request node for actions, Webhook node for triggers, signature check in a Code node.
- [Make](https://pozy.ai/docs/integrations/make): HTTP module for actions, custom webhooks for triggers.
- [Zapier](https://pozy.ai/docs/integrations/zapier): Webhooks by Zapier for both, Code by Zapier for the signature check.

## Request settings

| Setting | Value |
| --- | --- |
| Base URL | `https://api.pozy.ai/v1` |
| Header | `Authorization: Bearer pz_live_...` |
| Body | JSON, with `Content-Type: application/json` |
| Dates | ISO 8601, such as `2026-11-12T09:00:00`, with a separate `timezone` field when the time is local |
| Media | Public URLs. Upload files first with the [media flow](https://pozy.ai/docs/publishing/media) |

The [API reference](https://pozy.ai/docs/api) shows the body for every endpoint, with a cURL example you can paste into most tools' import features.

## The request you will use most

Creating a post is one call:

```http
POST https://api.pozy.ai/v1/posts
Authorization: Bearer pz_live_...
Content-Type: application/json
Idempotency-Key: run-8f2c1a

{
  "content": "New article: How we cut our build time in half",
  "platforms": [
    { "platform": "linkedin", "accountId": "6650f1c2a8b4e3d2c1b0a333" },
    { "platform": "twitter", "accountId": "6650f1c2a8b4e3d2c1b0a444" }
  ],
  "scheduledFor": "2026-11-12T09:00:00",
  "timezone": "Europe/Madrid"
}
```

Leave out `scheduledFor` and send `"publishNow": true` to publish right away, or `"isDraft": true` to save a draft for review. Account ids come from `GET /v1/accounts`; look them up once and store them in the tool.

## Receiving events

Create a webhook endpoint that points at the URL your tool gives you, in the dashboard or with the API:

```http
POST https://api.pozy.ai/v1/webhooks/settings
Authorization: Bearer pz_live_...
Content-Type: application/json

{
  "name": "Make: failed posts",
  "url": "https://hook.eu1.make.com/abc123",
  "events": ["post.failed", "post.partial"]
}
```

Pozy then sends a JSON `POST` for each event with these headers:

| Header | Contains |
| --- | --- |
| `X-Pozy-Event` | The event name, such as `post.failed` |
| `X-Pozy-Event-Id` | A unique id; the same value as `id` in the body |
| `X-Pozy-Signature` | Hex HMAC-SHA256 of the raw body, keyed with the endpoint secret |

Respond with any 2xx within 5 seconds. When a delivery fails, Pozy tries again with growing gaps (1 minute, then 5 minutes, up to 24 hours), for up to 7 attempts in total. Make your flow safe to run twice for the same `X-Pozy-Event-Id`. The full event list is in the [events reference](https://pozy.ai/docs/webhooks/events).

### Check that a request came from Pozy

Verifying `X-Pozy-Signature` needs the body exactly as it was sent. Where the tool gives you the raw body and a code step, verify it (each guide shows how). Where it does not:

- Keep the webhook URL private. Treat it like a password.
- Add a secret header on the Pozy endpoint with `customHeaders`, for example `{ "X-Hook-Token": "<long random string>" }`, and have the flow stop unless the header matches.

## Habits that prevent surprises

- **One key per tool.** Create a key for n8n, another for Zapier. If one leaks, you revoke one key and nothing else breaks.
- **Narrow keys.** A flow that only reads analytics needs a read-only key. A flow for one client needs a [profile-scoped key](https://pozy.ai/docs/build/tenant-keys). Switch off resource groups the flow never uses. See [Authentication](https://pozy.ai/docs/getting-started/authentication).
- **Idempotency keys on posts.** Automation tools retry failed steps. Send `Idempotency-Key` built from the run or record id, so a retry within 24 hours returns the first post instead of posting twice. See [Idempotency](https://pozy.ai/docs/getting-started/idempotency).
- **Mind the rate limit.** 30 requests a minute on the free plan, 120 with a payment method. Loops over many records can hit it; space them out or add a delay. See [Rate limits](https://pozy.ai/docs/getting-started/rate-limits).
- **Read the error body.** On failure Pozy returns `{ "error", "type", "code" }`. Route on `code` (for example `rate_limit_exceeded` or `resource_not_found`) rather than on the message.
- **Test with drafts.** Build the flow with `"isDraft": true`, check the result in the dashboard, then switch to publishing.

## Other tools

The same settings work in Pipedream, Activepieces, Power Automate, Google Apps Script, Retool and anything else that speaks HTTP. For code-first projects, call the REST API directly ([Node.js](https://pozy.ai/docs/sdks/node) has a small `fetch` wrapper to copy), and the [MCP server](https://pozy.ai/docs/mcp) connects AI assistants directly.
