Update OAuth Application
Update an OAuth application. Supports partial updates.
Endpoint
PATCH /api/v1/organizations/{org_id}/oauth-applications/{app_id}
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Content-Type | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | integer | Yes | Organization ID |
app_id | integer | Yes | Application ID |
Request Body
{
"name": "Updated App Name",
"description": "Updated description",
"grant_types": ["authorization_code"],
"redirect_uris": ["https://myapp.com/new-callback"],
"scopes": ["read", "write", "admin"],
"access_level": "organization",
"status": "active"
}
Parameters
All fields are optional - only include fields to update:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Application name |
description | string | No | Application description |
grant_types | array | No | Grant types |
redirect_uris | array | No | Allowed redirect URIs |
scopes | array | No | Organization-scoped scopes |
access_level | string | No | Access level |
status | string | No | Status: active, revoked |
Response
Success (200)
{
"success": true,
"data": {
"id": 1,
"name": "Updated App Name",
"description": "Updated description",
"client_id": "550e8400-e29b-41d4-a716-446655440000",
"grant_types": ["authorization_code"],
"redirect_uris": ["https://myapp.com/new-callback"],
"scopes": ["read", "write", "admin"],
"access_level": "organization",
"status": "active",
"message": "OAuth application updated successfully"
},
"message": "OAuth application updated successfully"
}
Features
- Partial updates (only include fields to change)
- Can update name, description, grant types, redirect URIs, scopes, access level, status
- Client secret cannot be updated (use regenerate endpoint)
- Only accessible by organization admins
Example
curl -X PATCH "https://api.rivergen.com/api/v1/organizations/1/oauth-applications/1" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated App Name",
"scopes": ["read", "write", "admin"]
}'
Related Endpoints
- Regenerate Secret - Regenerate client secret
- Get Application - Get application details