Using the API with an API key
Using the API with an API key
An API key lets your own system call RawQuotes on your account's behalf, without a panel login.
Create a key
- Open Settings → API keys.
- Under Generate a new key, enter a Label (for example the name of the integration) and click Generate key.
- Copy the Secret, which starts with
rq_live_, and click Done, I've saved it.
Removing a key stops every integration that uses it immediately.
Send a request
Put the key in the Authorization header as a Bearer token. A key works with every endpoint in
the API reference, for example POST /api/v1/surveys/{surveyId}/fills, which
generates a fill link, or
sending feedback into a source.
curl -X POST https://app.rawquotes.io/api/v1/surveys/YOUR-SURVEY-ID/fills \
-H "Authorization: Bearer rq_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"externalId": "order-1042"}'
externalId is optional. Every endpoint, with its request and response, is in the
API reference.
Idempotency
Add an Idempotency-Key: <UUID> header to a request that changes data, and RawQuotes performs it
only once, however many times you send it. If you retry with the same key after the first request
succeeded, you get 409 with idempotency.already_processed and nothing is repeated. If the
first one is still running, you get 409 with idempotency.in_progress and a Retry-After
header. A key that isn't a UUID is refused with 400.
-H "Idempotency-Key: 3f6c1a52-8d0e-4b7a-9a43-5d2f0c1e7b68"
The header is optional. Use a new UUID for each operation and reuse it only to retry that same one.