Cockpitify Docs Search the docs⌘K Product Sign in Try the live demo

Add a custom HTTP service

Updated · Every plan (counts toward Free's 3 services) · Phone · Web

Track any service with a balance API by pointing Cockpitify 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 as JSON, add it as a Custom HTTP service. Cockpitify reads it every hour like any other service and alerts you when it runs low.

Add it

  1. Open Services (phone: Money → Services; web: Money → Services) and tap Add (web: Add service).
  2. Pick Custom HTTP under Other.
  3. Fill in the fields:
    • Name: how it appears in Cockpitify, up to 40 characters.
    • URL (https://…): the public 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 Authorization and Bearer sk_live_….
  4. Set the Warning and Critical thresholds, and the Runs-out alert if you want it.
  5. Tap Save and test.

You can add Custom HTTP more than once, one per API.

Write the path

The path is the keys from the top of the answer down to the number, separated by dots. Use a number for an item in a list.

If the API answers:

{ "data": { "balance": 42.5, "currency": "USD" } }

the path is data.balance and the unit is empty (USD).

If it answers:

{ "balances": [ { "amount": "18.20", "currency": "EUR" } ] }

the path is balances.0.amount and the unit is EUR. A number sent as text, like "18.20", works too.

If the test fails

  • The URL must be a public https:// address. Use https://. Local and private addresses are refused, also when a public name points to a private one.
  • There is no number at that path in the answer. Check the path against the real response, including nesting and list positions.
  • A header name has only letters, digits and dashes. Remove spaces or colons from the header name.
  • The key is invalid or lacks permission. The header value is wrong or the key can’t read the balance.
  • The service returned an error. The URL is wrong, or the API needs a different header.
  • Could not reach the service. The address doesn’t answer from the internet.

Where it runs

The request is made from your own Supabase project, and the header value is stored in its Vault. The key never reaches us.

Was this page helpful?YesNo
Ask a question
Questions? Ask me.I’m Murat, the indie developer behind Cockpitify.

I read every message and reply by email, usually within a day.