Authenticating with keys
How to request an API key and send it on every request.
Get a key
A key is created from your Ajungem.ro account, in Profile → Developers. It requires signing in with an account: there's no separate developer registration.
A key has a single owner: your account, or your company, if you're the owner. A company can have several keys; a dispatcher who isn't the owner makes a key under their own name, not the company's.
The secret is shown only once, at creation. If you lose it, revoke the key and make a new one — we can't show it again, since we only keep its fingerprint.
Send it
curl https://api.ajungem.ro/v1/listings/mine \
-H "Authorization: Bearer ajk_live_…"
const response = await fetch('https://api.ajungem.ro/v1/listings/mine', {
headers: { Authorization: `Bearer ${process.env.AJUNGEM_API_KEY}` },
})
const { data } = await response.json()
No other header is needed: your company and rights are established from the key, not from a field you send.
Who's allowed
Keys are a plan feature: International, for carriers, or a separate business option, for beneficiaries (dealers, ERPs) who have no reason to buy a carrier plan — granted manually for now, until there's a commercial product for it. Without the right plan, creating a key is refused with 402 plan_required.
What stops a key
- Revoking it, from the account — immediate.
- Expiry, if you set a date.
- Suspending the account or the company, from administration.
- Losing the plan with the API (the subscription expired).
A stopped key returns 401 invalid_credential on any request, without saying which reason applies — an integrator has no way to learn details about someone else's account from the error code.
Prefixes
| Prefix | Environment |
|---|---|
ajk_live_ | Production |
test_ajk_ | Sandbox (planned; refused in production) |
A full sandbox (sandbox-api.ajungem.ro, fictional data, test_ajk_ keys) is planned. For now you can test public reads directly against production, without a key.