Update current user preferences
PATCH
/auth/me/preferences
const url = 'https://gateway.example.com/auth/me/preferences';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"aiApprovalMode":"always-ask","preferredInterface":"ai_workspace"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://gateway.example.com/auth/me/preferences \ --header 'Content-Type: application/json' \ --data '{ "aiApprovalMode": "always-ask", "preferredInterface": "ai_workspace" }'Request Body
Section titled “Request Body”Media typeapplication/json
object
aiApprovalMode
string
preferredInterface
string
Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
aiApprovalMode
required
string
preferredInterface
required
string | null
preferredInterfaceSelectedAt
required
string | null format: date-time
Example
{ "aiApprovalMode": "always-ask", "preferredInterface": "ai_workspace"}Bad request
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "VALIDATION_ERROR", "message": "Request validation failed", "details": [ { "path": [ "name" ], "message": "Required" } ]}Authentication required
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "UNAUTHORIZED", "message": "Authentication required"}Forbidden
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "FORBIDDEN", "message": "Insufficient permissions"}Not found
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "NOT_FOUND", "message": "Resource not found"}Conflict
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "CONFLICT", "message": "Resource already exists"}Unprocessable entity
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "UNPROCESSABLE_ENTITY", "message": "Request could not be processed"}Internal server error
Media typeapplication/json
object
code
required
Error code
string
message
required
Human-readable error message
string
details
Additional error details
Example
{ "code": "INTERNAL_ERROR", "message": "Internal server error"}