memberSettings.updateMemberSettings
PATCH
/v1/me/settings
const url = 'https://example.com/v1/me/settings';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expectedVersion":1,"planApproval":{"approver":"chain","timeoutMs":1,"onTimeout":"run"},"defaultBot":"example"}'};
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://example.com/v1/me/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expectedVersion": 1, "planApproval": { "approver": "chain", "timeoutMs": 1, "onTimeout": "run" }, "defaultBot": "example" }'Changes your settings. Send the version that you read as expectedVersion. If they changed since then, the change fails with SettingsConflict.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Success
Media typeapplication/json
SettingsInvalid | OrganizationRequired
AuthenticationRequired
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "AuthenticationRequired"}@nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin
SettingsConflict | @nmnmcc/ability/Authorizer/Pending
RateLimited
Media typeapplication/json
object
_tag
required
string
retryAfterSeconds
required
integer
Example
{ "_tag": "RateLimited"}SettingsUnavailable | AuthenticationUnavailable | RequestFailed