Skip to content

Sign out

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

Revokes the session that the given refresh token belongs to. It always succeeds, including when the token is unknown or already revoked.

storeRef
required
string

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

Media typeapplication/json
object
refresh_token
required

Opaque refresh token, 64 hex characters

string
>= 64 characters <= 64 characters

Example generated

{
"refresh_token": "example"
}
Media typeapplication/json
object
success
required

Always true, including when the refresh token was unknown or already revoked.

boolean

Example

{
"success": 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"
}