Docs

Make your first API call in 5 minutes

This quickstart walks you through authenticating with the Pryzma API and creating your first account resource.

All examples below target the dev environment at api-dev.pryzma.global. Credentials issued in the Pryzma console are scoped to this environment.

1

Get your credentials

Navigate to Settings → API Credentials in the Pryzma console. Click New credential, choose the scopes you need (start with accounts.read accounts.write), and click Create.

Copy the client_id and client_secret that appear — the secret is shown only once.

2

Get an access token

Exchange your credentials for a short-lived JWT using the OAuth 2.0 client credentials grant:

bash
curl -X POST https://pryzma-dev-client.auth.us-east-1.amazoncognito.com/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&scope=https://api.pryzma.global/accounts.write"

The response contains an access token valid for 1 hour:

json
{"access_token":"eyJ...","token_type":"Bearer","expires_in":3600}
3

Create an account

Use the token in the Authorization header. Every mutating request also requires a Pryzma-Idempotency-Key — a UUID you generate. Replaying the same key within 24 hours returns the stored response, so it is safe to retry on network failures.

bash
curl -X POST https://api-dev.pryzma.global/v1/accounts \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Pryzma-Idempotency-Key: $(uuidgen)" \
-d '{"type":"consumer","currency":"USD_GT","program_id":"YOUR_PROGRAM_ID"}'
4

List your accounts

bash
curl https://api-dev.pryzma.global/v1/accounts \
-H "Authorization: Bearer ACCESS_TOKEN"
5

You're live

You now have a working Pryzma integration. Continue with: