Skip to content

Change the password

POST
/tenant/stores/{storeRef}/auth/change-password
curl --request POST \
--url https://apibase.ecomweb.app/api/v1/tenant/stores/example/auth/change-password \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-storefront-api-key: <x-storefront-api-key>' \
--data '{ "current_password": "s3cret-password", "new_password": "new-s3cret-password" }'

Sets a new password after checking the current one, and revokes every session of the account, including the one making the request. The shopper has to sign in again. The new password must meet the store’s password policy.

storeRef
required
string

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

Media typeapplication/json
object
current_password
required
string
<= 128 characters

Example

s3cret-password
new_password
required
string
>= 8 characters <= 128 characters

Example

new-s3cret-password
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"
}