Skip to content

Mail a confirmation link to a new address.

POST
/v1/me/email-change
curl --request POST \
--url https://example.com/api/user/v1/me/email-change \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com" }'

The address changes only once the code in the link comes back through /v1/me/email-change/confirm, valid for 15 minutes. Whether another account has the address is told only then.

Media typeapplication/json
object
email
required
string format: email
<= 254 characters

Example generated

{
"email": "hello@example.com"
}

Accepted; the mail goes out shortly.

Media typeapplication/json

Nothing to report; the mail is on its way.

object

Example generated

{}

The request is malformed.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}

No access token, or one that is invalid or expired.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}
WWW-Authenticate
required
string
Allowed value: Bearer

The token isn’t a user’s, lacks the scope, or the request came from another origin.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}

The body is larger than 4 KiB.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}

Something failed on the server; the request ID leads to the log line.

Media typeapplication/problem+json

An RFC 9457 problem.

object
type
required
string
title
required
string
status
required
integer
detail

Written for the user.

string
instance
string
request_id
string
errors

What is wrong with each field of the request.

object
key
additional properties
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"request_id": "example",
"errors": {
"additionalProperty": "example"
}
}