auth0 api
Makes an authenticated HTTP request to the Auth0 Management API and returns the response as JSON.
Method argument is optional, defaults to GET for requests without data and POST for requests with data.
Additional scopes may need to be requested during authentication step via the --scopes flag. For example: auth0 login --scopes read:client_grants.
Usage
auth0 api <method> <url-path> [flags]
Examples
auth0 api get "tenants/settings"
auth0 api "stats/daily" -q "from=20221101" -q "to=20221118"
auth0 api delete "actions/actions/<action-id>" --force
auth0 api clients --data "{\"name\":\"ssoTest\",\"app_type\":\"sso_integration\"}"
cat data.json | auth0 api post clients
Flags
-d, --data string JSON data payload to send with the request. Pass inline JSON, @file to read from a file, or @- to read from stdin. Data can also be piped in instead of using this flag.
--force Skip confirmation when using the delete method.
--json Output in json format.
--json-compact Output in compact json format.
-q, --query stringArray Query params to send with the request. Repeat the flag to send a param more than once, for example -q "fields=a" -q "fields=b".
Inherited Flags
--agent-mode Output JSON, disable prompts and colors. Auto-enabled for AI agents; set AUTH0_AGENT_MODE=false to disable.
--debug Enable debug mode.
--no-color Disable colors.
--no-input Disable interactivity.
--tenant string Specific tenant to use.