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

# SDKs & n8n

> Official Pilot Status SDKs for Node.js/TypeScript and Python, plus the native n8n community node with a Trigger node for webhooks.

The official SDKs wrap the public `/v1` endpoints and help with validation and webhook parsing. Authentication is always your `ps_` API key.

## Node.js / TypeScript

Package: [`@pilot-status/sdk`](https://www.npmjs.com/package/@pilot-status/sdk)

```bash theme={null}
npm i @pilot-status/sdk
```

```typescript theme={null}
import { PilotStatusClient } from "@pilot-status/sdk";

const client = new PilotStatusClient({
  apiKey: process.env.PILOT_STATUS_API_KEY!,
});

const accepted = await client.messages.send({
  templateId: "onboarding-test",
  destinationNumber: "+5511999999999",
  variables: { name: "John" },
});

const message = await client.messages.get(accepted.id);
```

Webhook parsing:

```typescript theme={null}
import { parseCustomerWebhook } from "@pilot-status/sdk";

const event = parseCustomerWebhook(payload);
```

## Python

Package: [`pilot-status`](https://pypi.org/project/pilot-status/)

```bash theme={null}
pip install pilot-status
```

```python theme={null}
import os
from pilot_status import PilotStatusClient

client = PilotStatusClient(api_key=os.environ["PILOT_STATUS_API_KEY"])

accepted = client.messages.send({
    "templateId": "onboarding-test",
    "destinationNumber": "+5511999999999",
    "variables": {"name": "John"},
})

message = client.messages.get(accepted["id"])
```

## n8n (native integration)

Official community node: `n8n-nodes-pilot-status`.

Install from the n8n UI: **Settings → Community Nodes → Install → `n8n-nodes-pilot-status`**. Authentication uses a Pilot Status API key.

<Note>
  For inbound events, add the **Pilot Status Trigger** node to your workflow, copy its webhook URL, and paste it as a new webhook on the **Webhooks** page in the Pilot Status dashboard. Every subscribed event then starts your workflow.
</Note>

## Best practices

* Keep the API key on the backend only — never in browser code.
* For `429`/`5xx` responses, retry with exponential backoff (the SDKs help, but the retry policy is up to your system).

## Related

* [Send Messages](/guides/send-messages)
* [Receive Messages](/guides/receive-messages)
* [MCP Server](/integrations/mcp-server)
