Sending events
API reference for sending events to Tinyping. Endpoint, authentication, body fields, priority, response codes and examples.
Send a POST request to the events endpoint. Your token picks the project.
POST https://api.tinyping.app/v1/eventsAuthentication
Send your project token in the Authorization header.
Authorization: Bearer $TINYPING_TOKENA token belongs to one project, so events land in that project. Keep tokens on your server or in CI secrets, never in a browser or mobile app.
Body fields
Send the fields as JSON with Content-Type: application/json, or as form fields, which is what curl -d sends. In a form, pass tags as a comma-separated list.
| Name | Type | Required | Notes |
|---|---|---|---|
title | string | Yes | The headline. Up to 120 characters. |
body | string | No | More detail. Up to 2,000 characters. |
url | string | No | A link. Must start with http or https. Up to 2,048 characters. |
priority | string | No | low, normal or high. Default is normal. |
kind | string | No | A short label like signup. Up to 40 characters. |
tags | string array | No | Up to 8 tags, each up to 32 characters. Duplicates are removed. |
Spaces around text are removed. The whole request can be up to 16,384 bytes.
Priority
Every event sends a push notification, whatever its priority. The priority changes how the event looks in your inbox, and you can filter the inbox by it.
highshows a red High badge, so important events stand out.normalis the default and shows no badge.lowshows a grey Low badge, and the event is shown dimmer than the others.
Response codes
| Status | Meaning |
|---|---|
201 | The event was stored. The body has id and createdAt. |
400 | The body is not valid JSON. |
401 | The token is missing, wrong or revoked. |
404 | The token's project was deleted. |
413 | The body is too large. |
422 | A field is invalid. The issues list shows which. |
429 | You hit a rate limit or the monthly limit. |
See Errors and limits for fixes.
Examples
curl https://api.tinyping.app/v1/events \
-H "Authorization: Bearer $TINYPING_TOKEN" \
-d title="Backup failed" \
-d body="The nightly backup exited with an error" \
-d kind=backup \
-d priority=high \
-d tags=dbUse a short timeout and catch errors, so a failed alert never breaks your app.
