Ingest Key
Ingest Key
Getting Your Key
Your ingest key is located in your source settings. Select a project, open Settings, choose the Sources tab, and click the edit button for a source. In the source drawer, select the Ingest tab. The Ingest Keys section lets you view and manage the source’s keys. Each source can have multiple ingest keys.
Prefix
Your ingest key always begins with the prefix tg_ingest_.
Usage
Query Parameter (Recommended)
The simplest way to authenticate is by including your ingest key as a key query parameter in the URL. This works across all platforms — browsers, backends, and mobile apps.
curl -X POST "https://us11.ingest.tailglow.io/prj_xxx?key=tg_ingest_123"
-H "Content-Type: text/plain"
-d '{"records": []}' # Your records hereReplace the URL with your project’s ingest endpoint, found in your source settings.
Even though the payload is JSON, setting Content-Type: text/plain is safe because the ingest server auto-detects the format. For browser-based clients, this is especially important: text/plain is a simple content type, so browsers skip the CORS preflight OPTIONS request entirely, sending one request instead of two.
This method also works with navigator.sendBeacon, which does not support custom headers:
navigator.sendBeacon(
"https://us11.ingest.tailglow.io/prj_xxx?key=tg_ingest_123",
JSON.stringify({ event: "page_view", path: "/home" })
);Authorization Header
You can also include your ingest key in the Authorization header using the Bearer or Key prefix:
curl -X POST https://us11.ingest.tailglow.io/prj_xxx
-H "Content-Type: application/json"
-H "Authorization: Key tg_ingest_123"
-d '{"records": []}' # Your records hereNote that from browsers, using a custom Authorization header with Content-Type: application/json will trigger a CORS preflight request, doubling the number of requests.
Verify the connection
Send a GET request to the same complete ingest URL before uploading. It verifies the key for the destination project and checks whether that server can currently accept data. No request body is needed, and no records or collections are created.
curl -i "https://us11.ingest.tailglow.io/prj_xxx?key=tg_ingest_123"A successful check returns 200 OK with:
{ "status": "ready", "project_id": "prj_xxx" }The Authorization header works for verification too. Use the same key and destination you will use for the upload.
| HTTP status | Meaning | What to do |
|---|---|---|
200 | The key is accepted for this project and the server is ready to receive data. | Send your data with POST to the same URL. |
401 | The key is missing, invalid, disabled, or belongs to a different project. | Copy the complete ingest URL again from the source’s Ingest tab. |
503 | The server cannot currently verify the key or accept data. | Check the response’s error.code and message; wait for the Retry-After interval before checking again. |
Error responses use the same envelope as uploads, with a top-level message and the error code in error.code. A 503 with ingest_auth_unavailable means the key could not be verified, rather than that it is invalid. invalid_server_state means the server is starting or draining; ingest_spool_full means its storage writer or capacity is unavailable. A network error or an unreachable project route also means readiness has not been confirmed.
Verification uses the same authentication cache as uploads, and responses are marked Cache-Control: no-store. It can update both the key’s recent-use time and the project’s recent-activity indicator without ingesting any records. A successful check describes the server at that moment: it does not reserve capacity or validate the file you plan to send. Wait for each upload’s 202 Accepted response to confirm durable receipt; downstream processing happens afterward.
The infrastructure /health/* endpoints and CORS OPTIONS responses do not verify ingest keys. Use this authenticated GET request to check your destination.
Security
Your ingest key can send data and verify readiness on your ingest server; it cannot read stored records. While it’s important to keep this key private, it’s acceptable to include it in frontend code if you’re using the ingest server for frontend metrics and analytics.
Managing Your Keys
Each source can have multiple ingest keys. You can create new keys and delete old ones as needed from your source settings. When you need to rotate a key, simply create a new one, update your services to use it, and then delete the old key.
Key and Team Status
An ingest key works only when its team status also permits ingestion:
- Active team: An active key on an active team works normally.
- Delinquent team: For a non-Enterprise team, an uncollectible or later-unpaid invoice can make the team delinquent. Active ingest keys are then disabled until the payment issue is resolved. A single failed payment attempt does not by itself apply this state.
- Restricted team: The team is read-only and ingestion is disabled until the restriction is resolved.
- Blocked team: The team cannot be accessed and ingestion is disabled. Contact support to resolve this.
An ingest request is accepted only when both the key and its team are active. If the team becomes delinquent, restricted, or blocked, the key stops accepting data. Update your payment information or contact support as appropriate to restore access.