https://api.sandbox.swapnice.com (or a Swapnice-issued sandbox host).
All /v1/* calls after token exchange need Authorization: Bearer $ACCESS_TOKEN. Mutating calls also need Idempotency-Key. Access tokens last about 15 minutes.
Field-name cheat sheet
1. Environment
client_id / client_secret Swapnice issued. Create a PKCE pair (code_verifier 43+ chars, code_challenge = Base64URL SHA-256).
A known-good verifier/challenge pair for a first sandbox pass:
2. Discovery
3. Authorization code
scope is space-separated and must be allowed on the app. Save code. Codes expire in about 5 minutes and are single-use.
4. Token
access_token. Optional: POST /oauth/introspect with that token (needs tokens:introspect).
5. Customer
customer.id as CUSTOMER_ID. Replaying the same idempotency key should not create a second customer.
6. Connection session
session_id. Poll GET /v1/connection-sessions/:session_id. In a white-glove sandbox, Swapnice can complete the user accept step with you.
7. Consent receipt
receipt_id. Then:
8. Event
HeaderIdempotency-Key is required.
consent_purpose must be one you granted. Save event_id. Replay the same key — you should get the same event. Change the body on that key — you should get 409.
status is processed before you expect profile facts.
9. Profile, claims, intents
10. Optional: webhook, entry, revoke
202 and a workflow_id. Poll GET /v1/workflows/:id. A follow-up event with consent_purpose=personalization should now fail.
Cleanup: POST /oauth/revoke with { "token": "..." } and no Bearer header.
Suggested collection order
Errors you should hit on purpose
When you can complete this list, you are ready for a productive integration session. Bring the
request_ids from any call that surprised you.