Trigv home

Search docs

Getting started
  • Overview
  • How Trigv works
Help
  • Send test
  • API keys
  • Channels
  • Image attachments
Guides
  • All guides
  • cURL
  • Laravel
  • AI coding agents
  • Cursor
  • Claude Code
  • OpenAI Codex
  • Other agents
SDKs
  • All SDKs
  • JavaScript
  • Python
  • PHP
  • Go
  • Ruby
  • CLI
API reference
  • API overview
  • POST /api/v1/events
  • Errors & rate limits
  • API security
More
  • OpenAPI spec
Open in ChatGPT ↗ Ask questions about this page Open in Claude ↗ Ask questions about this page Open Markdown https://trigv.com/docs-md/events.md
POST/api/v1/events

Send an event

Ingest a notification event for a workspace channel. Trigv validates the API key and channel, increments the workspace monthly usage counter, queues push delivery to subscribed devices, and returns event metadata. Use idempotency_key to safely retry without double-counting.

Request

URL: https://api.trigv.com/api/v1/events

Headers:

Code
Content-Type: application/json
Accept: application/json
Authorization: Bearer trgv_xxxxxxxx_yyyyyyyyyyyyyyyyyyyyyyyyyyyy

Body parameters (JSON)

ParameterTypeRequiredDescription
channelstringYesChannel slug in your workspace (e.g. general). Max 120 chars. Case-sensitive.
titlestringYesNotification headline. Max 255 characters.
descriptionstringNoSecondary body text. Max 1000 characters. If omitted, the push body uses title.
iconstringNoRejected. Put emoji in title if you want it on the push banner.
image_urlstring (URL)NoHTTPS image URL passed through to your devices. Max 2048 characters. Not stored on Trigv servers. The app fetches the image locally; links may expire after delivery.
urlstring (URL)NoOptional destination link. Max 2048 characters. Passed through in push data; not stored on Trigv servers.
levelstringNoOne of info, success, warning, error. Default: info. Affects in-app styling only.
delivery_urgencystringNostandard (default) or time_sensitive. On iOS, time_sensitive can break through Focus when allowed.
event_typestringNoMachine-readable type (e.g. deploy.complete). Max 120 characters.
idempotency_keystringNoStable key for retries. Duplicate requests return 200 with the original event and do not increment usage again.
api_keystringNoRejected. Use Authorization: Bearer instead.

Code examples

cURL

Code
curl -X POST https://api.trigv.com/api/v1/events \
	-H "Content-Type: application/json" \
	-H "Accept: application/json" \
	-H "Authorization: Bearer trgv_abcd1234_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
	-d '{
		"channel": "general",
		"title": "✅ Database backup complete",
		"description": "Cron finished in 4.2 seconds.",
		"level": "success",
		"delivery_urgency": "time_sensitive",
		"event_type": "backup.complete"
	}'

Laravel / PHP

Code
use Illuminate\Support\Facades\Http;

$response = Http::withToken(config('services.trigv.api_key'))
	->post('https://api.trigv.com/api/v1/events', [
		'channel' => 'general',
		'title' => 'App exploded 💥',
		'description' => 'Fatal error in OrderController.php:42',
		'level' => 'error',
		'idempotency_key' => 'order-job-'.now()->format('Y-m-d-H'),
	]);

Responses

202 Accepted

New event queued for push delivery.

Code
{
	"event": {
		"public_id": "evt_01JXXXXXXXX",
		"event_uuid": "550e8400-e29b-41d4-a716-446655440000",
		"status": "queued",
		"level": "success",
		"event_type": "backup.complete",
		"target_device_count": 2,
		"received_at": "2026-06-06T12:00:00+00:00"
	}
}
200 OK

Duplicate idempotency_key - same event returned, usage not incremented again.

422 Unprocessable

Missing or invalid fields (e.g. channel, title).

Code
{
	"message": "The channel field is required. (and 1 more error)",
	"errors": {
		"channel": ["The channel field is required."],
		"title": ["The title field is required."]
	}
}
404 Not Found

Unknown or inactive channel slug for this workspace.

Code
{ "message": "Channel not found." }

More examples: Guides · Errors & rate limits

Previous API overview Next Errors & rate limits

On this page

    Native push alerts for developers. Send alerts from webhooks, cron jobs, and scripts. We deliver alerts to your devices, but don't keep the message or notification history on our servers.

    Follow @trigvapp →

    Built by Harish Chouhan

    Product

    • Features
    • How it works
    • Pricing
    • Docs
    • Integrations
    • SDKs
    • API
    • Full LLMs text

    Company

    • About
    • Support
    • Changelog

    Legal

    • Terms & Conditions
    • Privacy Policy
    • Cookie Policy
    • API Security
    All systems ok. Get back to coding.

    © 2026 Webtions OU (dba Trigv)