---
title: cURL
description: Send a Trigv push notification from the terminal with cURL and Bearer authentication.
---
# cURL

Send a test alert from your terminal — handy if you're comfortable with the command line and want to verify Trigv before wiring Zapier or a script.

## Before you start

<ol>
  <li>Install Trigv for iOS from the App Store and sign in on your phone (Android coming soon).</li>
  <li>Create an API key at <a href="https://app.trigv.com">app.trigv.com</a> → <strong>API Keys</strong> (<a href="/docs/learn/api-keys">guide</a>).</li>
  <li>Or try <a href="/docs/learn/send-test">Send test</a> first if you prefer no terminal.</li>
</ol>

## Step 1 — Run this command

Replace `trgv_YOUR_KEY_HERE` with your key:

```
curl -X POST https://api.trigv.com/api/v1/events \
		-H "Content-Type: application/json" \
		-H "Accept: application/json" \
		-H "Authorization: Bearer trgv_YOUR_KEY_HERE" \
		-d '{"channel":"general","title":"Hello from curl"}'
```

## Step 2 — Check the result

- HTTP `202` — event accepted and queued. Check your phone.
- HTTP `200` — duplicate `idempotency_key` (same event returned).
- `401` — wrong or missing API key.
- `404` — channel slug doesn't exist in your workspace.
- See [errors & rate limits](/docs/errors) for the full list.

## Richer example

```
curl -X POST https://api.trigv.com/api/v1/events \
		-H "Content-Type: application/json" \
		-H "Accept: application/json" \
		-H "Authorization: Bearer trgv_YOUR_KEY_HERE" \
		-d '{
			"channel": "general",
			"title": "Deploy finished",
			"description": "Build completed successfully",
			"level": "success"
		}'
```

## Common mistakes

- Putting the API key in the JSON body — use the `Authorization` header only.
- Wrong channel slug — must match a channel in your workspace exactly.
- Phone not subscribed to the channel — event sends but no device receives it.

[Full API reference →](/docs/events)
