Create OAuth app
Register a new OAuth app for the organization. Any authenticated org member may create apps; the creator is recorded as the app's owner and is the only user who can subsequently read, update, suspend, activate, regenerate the secret of, or delete it.
The clientSecret is returned in this response only — it is stored hashed server-side and cannot be retrieved later. Persist it before exiting the create flow; if it is ever lost, rotate via POST /oauth-clients/{appId}/regenerate-secret.
allowedScopes is validated against the caller's role-aware scope set (see GET /oauth-clients/scopes). Org admins may include admin-only scopes; non-admins requesting a restricted scope receive 400.
All /oauth-clients/* routes share a per-user rate limiter (default 1000 req/min, configurable via the MAX_OAUTH_CLIENT_REQUESTS_PER_MINUTE env var).
Request body
Example request
{
"name": "My Integration App",
"description": "Integrates PipesHub with our internal tools",
"redirectUris": [
"https://myapp.com/callback",
"http://localhost:3000/callback"
],
"allowedGrantTypes": [
"authorization_code",
"refresh_token"
],
"allowedScopes": [
"openid",
"profile",
"read:records"
],
"accessTokenLifetime": 3600,
"refreshTokenLifetime": 2592000
}Response
OAuth app created successfully
Example response
{
"message": "OAuth app created successfully"
}