curl and jq, or the CloudThinker CLI.
Create a token and call the API
1
Create a token
Open Account Settings → Security → API tokens and click Create token. Enter a Token name, such as
review-report. Pick the Workspace. Under Choose permissions, click Use template on Read reviews. Leave Expiration at 30 days and click Review token, then Create token.2
Copy the token
Copy the token that starts with
ct_pat_. CloudThinker shows it once. Store it in your secret manager or an environment variable:3
Check the token
Ask the API who the token belongs to and which workspace it can reach, and save the answer:Save the workspace ID for the next calls:
4
List your recent reviews
- curl
- CLI
CLOUDTHINKER_TOKEN. Pass the workspace ID (a UUID, not its name) with -w after the operation name.
Don’t set
CLOUDTHINKER_WORKSPACE or the global --workspace flag together with CLOUDTHINKER_TOKEN. The CLI refuses the pair and exits with code 2: “—workspace cannot be used with CLOUDTHINKER_TOKEN”.What to expect
See API Errors for every code.
Next steps
Approvals for API Runs
Start an agent run and read its answer.
API Tokens
Pick scopes, add a service account and revoke tokens.
Use CloudThinker in CI/CD
Call CloudThinker from GitHub Actions or GitLab CI.
API reference
See every operation, field and scope.