Skip to content

Confirm an email change

POST
/public/stores/{storeRef}/auth/change-email/confirm
curl --request POST \
--url https://apibase.ecomweb.app/api/v1/public/stores/example/auth/change-email/confirm \
--header 'Content-Type: application/json' \
--header 'x-storefront-api-key: <x-storefront-api-key>' \
--data '{ "token": "example", "binding": "example" }'

Completes an email change using the token from the confirmation email sent to the new address. Send the confirmation_binding returned by the change-email route too. Returns 409 with code AUTH_EMAIL_TAKEN when another account has the address. Rate limited to 20 requests per minute per store and client IP.

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
token
required

Email change token from the emailed link

string
binding

Binding handed to the requester (confirmation_binding from the change-email response). Kept by the client, never mailed.

string
<= 128 characters

Example generated

{
"token": "example",
"binding": "example"
}
Media typeapplication/json
object
changed
required

Always true.

boolean

Example

{
"changed": true
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The request conflicts with the resource’s current state.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

Too many requests; wait a little before retrying.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}