Management API
Provision Authie from trusted automation.
Use an organization-scoped management token to create applications and OAuth clients from a CLI, CI job, or coding agent.
Before you start
- Create a management token in the Authie console.Choose an expiration appropriate for the automation. The plaintext value is shown once.
- Put it in the provisioning environment.Use a local environment variable or your CI secret store.
- Remove it when provisioning is complete.Revoke one-time credentials in the console.
export AUTHIE_URL="https://authie.ai"
export AUTHIE_MANAGEMENT_TOKEN="authie_pat_..."Create an application
curl --request POST "$AUTHIE_URL/api/management/v1/applications" \
--header "Authorization: Bearer $AUTHIE_MANAGEMENT_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"name": "Storytail",
"slug": "storytail",
"allowedOrigins": ["https://storytail.example"]
}'Save the returned application id. The management token can create resources only in its own organization.
Create the OAuth client
curl --request POST \
"$AUTHIE_URL/api/management/v1/applications/$APPLICATION_ID/oauth-clients" \
--header "Authorization: Bearer $AUTHIE_MANAGEMENT_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"name": "Storytail web",
"redirectUris": ["https://storytail.example/api/auth/callback"],
"public": false
}'The response contains the issuer, application ID, client ID, and—only for a confidential client—the client secret. The secret is returned once.
Public clients
Set public to true for mobile, desktop, browser-only, or CLI clients that cannot protect a secret. Public clients receive no secret and must still use Authorization Code with S256 PKCE.
Continue with the application quickstart.