Add a custom HTTP service
Track any service with a balance API in Cockpitify by pointing it at a JSON endpoint and the path of the number to read.
If a service you pay for isn’t in the catalog but has an API that returns your balance or usage as JSON, add it as a Custom HTTP service. Cockpitify reads it every hour like any other service.
Add it
- Open Services → Add and pick Custom HTTP service under Other.
- Fill in the fields:
- Name: how it appears in the app, up to 40 characters.
- URL: the public
https://address that returns the JSON. - Where the number is in the JSON: the path to the value, for example
data.balance. - Unit: optional; empty means USD.
- Header name and Header value: optional, for the API key, for example
AuthorizationandBearer sk_live_….
- Set the warning and critical thresholds.
- Tap Save and test.
You can add the custom service more than once, one per API.
Example
If the API answers:
{ "data": { "balance": 42.5, "currency": "USD" } }
the path is data.balance and the unit is empty (USD).
If the test fails
- There is no number at that path in the answer. Check the path against the real response, including nesting.
- A header name has only letters, digits and dashes. Remove spaces or colons from the header name.
- The service returned an error. The URL or the key is wrong, or the API needs a different header.
The request is made from your own Supabase project, and the header value is stored in its Vault.