Update OAuth client
Update the redirect URIs, post-logout redirect URIs, scopes, disabled flag, or isFirstParty flag. Client type and pinned references are immutable.
/api/oauth/clients/{clientId}Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Path Parameters
Header Parameters
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
uuidRequest Body
application/json
curl -X PATCH "https://your-instance/api/oauth/clients/string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"clientId": "string",
"name": "string",
"level": "instance",
"referencedOrgId": "string",
"referencedSpaceId": "string",
"redirectUris": [
"http://example.com"
],
"postLogoutRedirectUris": [
"http://example.com"
],
"scopes": [
"string"
],
"disabled": true,
"isFirstParty": true,
"allowSignup": true,
"signupRole": "guest",
"signupSpaceAssignments": [
{
"spaceId": "string",
"preset_role": "admin",
"custom_role_id": "string"
}
],
"createdAt": "string",
"updatedAt": "string"
}{
"type": "https://docs.appstrate.dev/errors/validation-failed",
"title": "Validation Failed",
"status": 400,
"detail": "name: Invalid input: expected string, received undefined (+2 more)",
"code": "validation_failed",
"request_id": "req_abc123",
"errors": [
{
"field": "name",
"code": "required",
"message": "Invalid input: expected string, received undefined"
},
{
"field": "email",
"code": "invalid_format",
"message": "Invalid email address"
},
{
"field": "age",
"code": "invalid_type",
"message": "Invalid input: expected number, received string"
}
]
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"code": "not_found",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/rate-limited",
"title": "Rate Limited",
"status": 429,
"detail": "Too many requests. Please try again shortly.",
"code": "rate_limited",
"request_id": "req_abc123",
"retry_after": 30
}