API reference

Authentication

Send your API key with each request and keep it safe when you replace it.

Price, account, and fee operations require an API key. Public catalogue, metadata, and status reads work without one.

Get your key in Settings after you verify a real email address.

Send the key

Send the key in the Authorization header as a bearer token:

curl 'https://api.cs.cheap/me' \
  --header "Authorization: Bearer $CSCHEAP_API_KEY"

A 200 response confirms that the key works. A website session cookie does not replace the API key.

Keep the key safe

  • Store the key in server-side configuration.
  • Do not put the key in URLs, screenshots, shared examples, or public browser bundles.

Replace the key

Regenerating a key replaces the active key. You can regenerate once every five minutes. Update your clients afterward.

Account and key changes reach the API asynchronously. A new key may not work immediately.

Handle authentication failures

StatusWhat it means
401The credentials are missing or invalid.
403The credentials are valid but lack permission for the operation.
402The account lacks credits. This is a billing problem, not an authentication problem.

For step-by-step checks, see authentication troubleshooting. For every status, see errors.