Generate your key
Go to Settings, then API access. One button mints your key.
It is shown exactly once: we keep only a digest, nobody here can read it back, and that is also what guarantees nobody else will. Copy it straight into your secret manager. Afterwards the screen shows only its last five characters, enough to recognise which key is in place.
Lose it and you regenerate: the previous one stops working that same instant.
Choose its permissions
When you generate it, you decide whether the key may write. Without that box it can only read.
The choice matters if you hand the key to an agent or to a script you did not write: a read-only key cannot change a floor price. We suggest starting there, and granting write the day you actually need it.
Your first call
The key travels in an Authorization header. Every response is JSON.
curl -H "Authorization: Bearer swp_your_key" \
https://api.sweeprice.com/v1/productsWhat the errors mean
The refusals are distinct, because they call for different actions.
- 401: the key is unknown or missing. Check the header, regenerate if needed.
- 403: the key is fine, but your plan does not include the API, your subscription is not active, or the key has no write permission.
- 429: your monthly allowance is spent, or you are calling too fast. Back off, do not regenerate.