Change the email address of the authenticated user
const url = 'https://api.pingram.io/profile/change-email';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"newEmail":"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://api.pingram.io/profile/change-email \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "newEmail": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Example generated
{ "newEmail": "example"}Responses
Section titled “ Responses ”Successful response
object
Example
{ "success": true}Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Example generated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}Unauthorized
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Example generated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}Internal Server Error
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Example generated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}