6 operations. Every schema and example on this page is generated from the platform contract.
Needs a signed-in person; an API key is refused.
`not_needed`: this shop was never asked.
not_neededwaitingconfirmedThe account address the link goes to. For the owner only.
When a link that still works went to that address. Null when none did.
This person may ask for a new link: the shop’s owner, while it is waiting.
A new sign-in address she asked for ("Wrong address?") whose link has not been opened. For the owner only. Null when none.
When that change link went. Null when none.
She may correct her sign-in address here: the shop’s owner, while it is waiting, on an account that signs in by email alone (not Apple or Google).
curl -G "https://www.membber.com/api/v1/shop-email-confirm" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
--data-urlencode "store_id=6659c139-0000-4000-8000-d0c500000066"import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.GET("/api/v1/shop-email-confirm", {
params: { query: { store_id: "6659c139-0000-4000-8000-d0c500000066" } },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.getShopEmailConfirm(
query: .init(storeId: "6659c139-0000-4000-8000-d0c500000066")
).ok.body.json
print(response){
"state": "not_needed",
"address": "<address>",
"sent_at": "<sent_at>",
"can_send": true,
"pending_address": "<pending_address>",
"pending_sent_at": "<pending_sent_at>",
"can_change": true
}For the shop’s own owner only: staff and API keys are refused. It goes to the account’s address as it stands now, and replaces any unused link once the email is accepted. Refused (502, `EMAIL_NOT_SENT`) when it could not be sent, and the link she holds keeps working.
`not_needed`: this shop was never asked.
not_neededwaitingconfirmedThe account address the link goes to. For the owner only.
When a link that still works went to that address. Null when none did.
This person may ask for a new link: the shop’s owner, while it is waiting.
A new sign-in address she asked for ("Wrong address?") whose link has not been opened. For the owner only. Null when none.
When that change link went. Null when none.
She may correct her sign-in address here: the shop’s owner, while it is waiting, on an account that signs in by email alone (not Apple or Google).
curl -X POST "https://www.membber.com/api/v1/shop-email-confirm" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"store_id": "6659c139-0000-4000-8000-d0c500000066"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/shop-email-confirm", {
body: {
store_id: "6659c139-0000-4000-8000-d0c500000066"
},
headers: { "Idempotency-Key": crypto.randomUUID() },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.sendShopEmailConfirm(
body: .json(.init(
storeId: "6659c139-0000-4000-8000-d0c500000066"
))
).ok.body.json
print(response){
"state": "not_needed",
"address": "<address>",
"sent_at": "<sent_at>",
"can_send": true,
"pending_address": "<pending_address>",
"pending_sent_at": "<pending_sent_at>",
"can_change": true
}The shop’s own owner only. Answers her row as it then stands.
`not_needed`: this shop was never asked.
not_neededwaitingconfirmedThe account address the link goes to. For the owner only.
When a link that still works went to that address. Null when none did.
This person may ask for a new link: the shop’s owner, while it is waiting.
A new sign-in address she asked for ("Wrong address?") whose link has not been opened. For the owner only. Null when none.
When that change link went. Null when none.
She may correct her sign-in address here: the shop’s owner, while it is waiting, on an account that signs in by email alone (not Apple or Google).
curl -X DELETE "https://www.membber.com/api/v1/shop-email-confirm/change?store_id=6659c139-0000-4000-8000-d0c500000066" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678"import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.DELETE("/api/v1/shop-email-confirm/change", {
params: { query: { store_id: "6659c139-0000-4000-8000-d0c500000066" } },
headers: { "Idempotency-Key": crypto.randomUUID() },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.cancelShopSignInEmailChange(
query: .init(storeId: "6659c139-0000-4000-8000-d0c500000066")
).ok.body.json
print(response){
"state": "not_needed",
"address": "<address>",
"sent_at": "<sent_at>",
"can_send": true,
"pending_address": "<pending_address>",
"pending_sent_at": "<pending_sent_at>",
"can_change": true
}For a shop still waiting to confirm its email, its own owner only, on an account that signs in by email alone, with her password. Staff and API keys are refused. Nothing moves until the link (sent to the NEW address only) is opened: it then changes the sign-in address and confirms the shop. The shop’s public email, staff, Stripe and payouts do not change. Refused: `WRONG_PASSWORD` (403), `EMAIL_TAKEN` (409), `SAME_EMAIL` (400), `SIGNED_IN_WITH_PROVIDER` (403), `CONFLICT` (409, already confirmed), `EMAIL_NOT_SENT` (502).
The address she should have typed.
Her password, again: a signed-in session alone cannot move the account.
`not_needed`: this shop was never asked.
not_neededwaitingconfirmedThe account address the link goes to. For the owner only.
When a link that still works went to that address. Null when none did.
This person may ask for a new link: the shop’s owner, while it is waiting.
A new sign-in address she asked for ("Wrong address?") whose link has not been opened. For the owner only. Null when none.
When that change link went. Null when none.
She may correct her sign-in address here: the shop’s owner, while it is waiting, on an account that signs in by email alone (not Apple or Google).
curl -X POST "https://www.membber.com/api/v1/shop-email-confirm/change" \
-H "Authorization: Bearer $MEMBBER_TOKEN" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"store_id": "6659c139-0000-4000-8000-d0c500000066",
"email": "alex@example.com",
"password": "<password>"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient({
getAccessToken: () => process.env.MEMBBER_TOKEN,
});
const { data, error } = await membber.raw.POST("/api/v1/shop-email-confirm/change", {
body: {
store_id: "6659c139-0000-4000-8000-d0c500000066",
email: "alex@example.com",
password: "<password>"
},
headers: { "Idempotency-Key": crypto.randomUUID() },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { session.accessToken }
)
let response = try await client.api.changeShopSignInEmail(
body: .json(.init(
storeId: "6659c139-0000-4000-8000-d0c500000066",
email: "alex@example.com",
password: "<password>"
))
).ok.body.json
print(response){
"state": "not_needed",
"address": "<address>",
"sent_at": "<sent_at>",
"can_send": true,
"pending_address": "<pending_address>",
"pending_sent_at": "<pending_sent_at>",
"can_change": true
}A POST, because mail scanners open links: a plain open confirms nothing. One use. Unknown, expired, used and replaced links all answer the same. A change link (`mecx1.`) also needs a Bearer token of the link’s own person, or it answers `signIn: true` and moves nothing.
True when this link confirmed the shop or the shop is confirmed already. False says nothing about why.
Only on a change link that could not move her: another account signs in with the address it was sent to. Said only to whoever holds a link sent to that address.
Only on a change link opened without her own session: log in (with the address and password she has) and open it again. Nothing moved.
Only to the signed-in owner of a change link that went through: the address she now signs in with.
With `signIn`, on a change link opened while signed in as a different account: log out, then open it again.
curl -X POST "https://www.membber.com/api/v1/shop-email-confirm/confirm" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"token": "<token>"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient();
const { data, error } = await membber.raw.POST("/api/v1/shop-email-confirm/confirm", {
body: {
token: "<token>"
},
headers: { "Idempotency-Key": crypto.randomUUID() },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { nil }
)
let response = try await client.api.confirmShopEmail(
body: .json(.init(
token: "<token>"
))
).ok.body.json
print(response){
"confirmed": true,
"taken": true,
"signIn": true,
"email": "alex@example.com",
"otherAccount": true
}The link names the shop, so the page needs no shop of its own. Needs a Bearer token: only that shop’s own owner gets a new link, and anybody else gets `sent: false`, the same as for an unknown link.
A new link went to the account’s address. False says nothing about why.
curl -X POST "https://www.membber.com/api/v1/shop-email-confirm/renew" \
-H "Idempotency-Key: 1f0e2d3c-4b5a-4678-9abc-def012345678" \
-H "Content-Type: application/json" \
-d '{
"token": "<token>"
}'import { createMembberClient } from "@membber/sdk-ts";
const membber = createMembberClient();
const { data, error } = await membber.raw.POST("/api/v1/shop-email-confirm/renew", {
body: {
token: "<token>"
},
headers: { "Idempotency-Key": crypto.randomUUID() },
});
if (error) {
// Typed error envelope: { error: { code, message, requestId } }
throw new Error(`${error.error.code}: ${error.error.message}`);
}
console.log(data);import MembberSwift
let client = MembberClient(
serverURL: MembberClient.productionServerURL,
tokenProvider: { nil }
)
let response = try await client.api.renewShopEmailConfirm(
body: .json(.init(
token: "<token>"
))
).ok.body.json
print(response){
"sent": true
}