RaylightAPI

API keys

Poll a key request

Public. pending until the user approves, then approved with the key, once. denied and expired are terminal. If the claim response was lost, poll again with revokeClaimed: true to revoke the key you never received.

POST/v1/keys/poll

Public. No API key needed.

Request body

application/json

FieldTypeDescription
deviceCoderequiredstring
revokeClaimedboolean

Responses

200The request's state.
400Invalid body.
404Unknown device code.
429Rate limited: 60 requests a minute per address. Carries Retry-After.

200 response body

FieldTypeDescription
statusrequiredenumOne of: pending, approved, claimed, denied, expired
apiKeystring

Example

curl
curl -X POST https://api.raylight.app/v1/keys/poll \  -H "Content-Type: application/json" \  -d '{ "deviceCode": "1aSs9fWUrhEUu3hOo5TzSJfWDgradXEK_k9BIV67XV8" }'