SiteSwapDevelopers
API reference: Keys

Ask for a key

POSThttps://dev.siteswap.pro/api/v1/keys

Asks for a key for your company. Only from siteswap.pro, signed in as an owner or admin (the API keys page does this). The key is in this answer only. It answers 403 key_pending until a SiteSwap admin approves it.

Only from siteswap.pro, signed in as an owner or admin of the company. API keys

Body

namestringrequired
purposestringrequired
What the key is for. A SiteSwap admin reads it before approving
scopes("listings:read" | "listings:write" | "offers" | "alerts")[]required
What it may do

Responses

201Created
400bad_request, key_in_url or invalid_json: the request could not be read
401missing_key or invalid_key: no key, or a key that is not valid or was revoked
403key_pending, key_declined, scope_missing, terms_required or account_unavailable: see Errors
404not_found: nothing here that you may see
413too_large: the body is over 256 KB
429rate_limited or daily_quota: wait for Retry-After seconds

Response fields

idstringrequired
The key's public prefix: the 10 characters after ssk_
namestringrequired
purposestringrequired
status"pending" | "active" | "declined" | "revoked"required
pending until a SiteSwap admin approves it
scopes_askedstring[]required
scopesstring[]required
What it was granted; empty until approved
per_minuteintegerrequired
Requests a minute
per_dayintegerrequired
Requests a day (UTC)
callsintegerrequired
Calls counted so far
last_used_atstring | nullrequired
The last call
created_atstringrequired
When it was asked for. ISO 8601 in UTC
asked_bystringrequired
Who asked for it
notestring | nullrequired
Why it was declined, from the SiteSwap admin
keystringrequired
The key itself, shown only here
SiteSwap API v1Support