curl --request POST \
--url https://api.mareaalcalina.com/v1/users/{userId}/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>"
}
'import requests
url = "https://api.mareaalcalina.com/v1/users/{userId}/verify"
payload = { "code": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>'})
};
fetch('https://api.mareaalcalina.com/v1/users/{userId}/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mareaalcalina.com/v1/users/{userId}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mareaalcalina.com/v1/users/{userId}/verify"
payload := strings.NewReader("{\n \"code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mareaalcalina.com/v1/users/{userId}/verify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mareaalcalina.com/v1/users/{userId}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "<string>",
"verificationStatus": "verified"
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}Verify user email
Use this when the user has read back the 6-digit code from their email and you want to upgrade the user-key to full scope.
Validates the 6-digit code (3 attempts max), upgrades the bootstrap user-key from restricted to full scope (same key — no rotation), flips agentBootstrapped→false + verificationStatus→verified, fires the user.verified webhook stub. Cross-tenant/wrong-id → 404 leak-less.
curl --request POST \
--url https://api.mareaalcalina.com/v1/users/{userId}/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>"
}
'import requests
url = "https://api.mareaalcalina.com/v1/users/{userId}/verify"
payload = { "code": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>'})
};
fetch('https://api.mareaalcalina.com/v1/users/{userId}/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mareaalcalina.com/v1/users/{userId}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mareaalcalina.com/v1/users/{userId}/verify"
payload := strings.NewReader("{\n \"code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mareaalcalina.com/v1/users/{userId}/verify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mareaalcalina.com/v1/users/{userId}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "<string>",
"verificationStatus": "verified"
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}{
"error": {
"type": "auth",
"code": "missing_authorization",
"message": "<string>",
"doc": "<string>",
"param": "<string>",
"requestId": "req_30a9358b-70bd-44f3-aa5d-8983b558ad84",
"requestLogUrl": "<string>",
"recoverable": true,
"retryAfterMs": 123,
"nextActions": [
{
"label": "Validate the JSON before retrying.",
"method": null,
"url": null
}
],
"upgrade": {
"currentPlan": "free",
"requiredPlan": "pro",
"upgradeUrl": "https://mareaalcalina.com/upgrade?planSource=api",
"previewUrl": "<string>"
},
"requiredScopes": [
"<string>"
],
"heldScopes": [
"<string>"
]
}
}Authorizations
Marea API key. mk_dev_* keys are developer-scoped (bootstrap, list users, register webhook). mk_user_* keys are user-scoped (manage that one user's storefronts/products). Scopes: catalog:read, catalog:write, storefront:publish, me:verify, me:resendVerification, developer:bootstrap, developer:read, developer:issueUserKey, developer:webhooks.
Headers
Optional client-supplied key. Replays of the same key within 24h return the original response. Recommended for POSTs that mutate billing/inventory.
200"idem_b2a9f5b9-3e0c-4a5e-b3c2-7a4ce85a6b21"
BCP-47 locale tag for localized error messages (es, en, pt). Defaults to es.
"es-MX"
Path Parameters
Body
Request body.
^\d{6}$