Make a server app
Go to Settings, then Developers, then Your apps, and create a Server app. Copy the client ID and secret and keep the secret safe.
Get a token
Swap them for an access token. It lasts an hour: get a new one the same way.
curl https://kata.now/oauth/token \ -u "$KATA_CLIENT_ID:$KATA_CLIENT_SECRET" \ -d grant_type=client_credentialsSend a task
Call the API with the token. Add an Idempotency-Key so a retry never makes a second task.
curl https://kata.now/api/v1/tasks \ -H "Authorization: Bearer $KATA_TOKEN" \ -H "Idempotency-Key: lead-4821" \ -H "Content-Type: application/json" \ -d '{ "instructions": "Check that +1 555 0100 belongs to Sam Lee.", "test": true }'Use the OpenAPI file
Load the OpenAPI file into Postman, Insomnia or a client generator to get every endpoint and field.
https://kata.now/api/v1/openapi.json
Good to know
- Try requests from the browser with the playground in Settings, then Developers.
Related guides
Something unclear? Email hello@kata.now.
All guides