GraphQL quickstart

Create a client API key, discover its client, and query transactions.

1. Create an API key

Open Awaken → Settings → API Keys. Choose Read for analytics and exports, or ReadWrite when the integration will edit transactions. Copy the awaken_… key when it appears; it is only shown once.

2. Discover the client ID

Every client API key is scoped to one client. Discover the allowed ID instead of copying an internal URL.

bash
curl https://api.awaken.tax/graphql \
-H "content-type: application/json" \
-H "x-api-key: $AWAKEN_API_KEY" \
--data '{"query":"query { getMyClients { id name } }"}'

3. Query a transaction

bash
curl https://api.awaken.tax/graphql \
-H "content-type: application/json" \
-H "x-api-key: $AWAKEN_API_KEY" \
--data '{"query":"query Transactions($clientId: ID!) { getClientTransactions(clientId: $clientId, limit: 1) { id date type } }","variables":{"clientId":"YOUR_CLIENT_ID"}}'

Where next?