Change the authenticated workspace user's password.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/account/change-password"), Content = new StringContent("{ \"CurrentPassword\": \"example\", \"NewPassword\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/account/change-password';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"CurrentPassword":"example","NewPassword":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/account/change-password \ --header 'Content-Type: application/json' \ --data '{ "CurrentPassword": "example", "NewPassword": "example" }'Service accounts cannot access this endpoint via API keys.
Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Request payload to change the authenticated workspace account password.
object
Current password.
New password.
Examplegenerated
{ "CurrentPassword": "example", "NewPassword": "example"}Request payload to change the authenticated workspace account password.
object
Current password.
New password.
Examplegenerated
{ "CurrentPassword": "example", "NewPassword": "example"}Request payload to change the authenticated workspace account password.
object
Current password.
New password.
Examplegenerated
{ "CurrentPassword": "example", "NewPassword": "example"}Responses
Section titled “Responses”OK
object
Result of a workspace account password change.
object
Whether the password was changed.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Result of a workspace account password change.
object
Whether the password was changed.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Result of a workspace account password change.
object
Whether the password was changed.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}