API reference: Keys
Ask for a key
POST
https://dev.siteswap.pro/api/v1/keysAsks 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
namestringrequiredpurposestringrequiredWhat the key is for. A SiteSwap admin reads it before approving
scopes("listings:read" | "listings:write" | "offers" | "alerts")[]requiredWhat 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
idstringrequiredThe key's public prefix: the 10 characters after
ssk_namestringrequiredpurposestringrequiredstatus"pending" | "active" | "declined" | "revoked"requiredpending until a SiteSwap admin approves itscopes_askedstring[]requiredscopesstring[]requiredWhat it was granted; empty until approved
per_minuteintegerrequiredRequests a minute
per_dayintegerrequiredRequests a day (UTC)
callsintegerrequiredCalls counted so far
last_used_atstring | nullrequiredThe last call
created_atstringrequiredWhen it was asked for. ISO 8601 in UTC
asked_bystringrequiredWho asked for it
notestring | nullrequiredWhy it was declined, from the SiteSwap admin
keystringrequiredThe key itself, shown only here
SiteSwap API v1Support