curl --request POST \
--url https://api.mareaalcalina.com/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"displayName": "<string>",
"sourceAgent": "<string>",
"country": "<string>",
"currency": "<string>",
"businessType": "<string>"
}
'import requests
url = "https://api.mareaalcalina.com/v1/users"
payload = {
"email": "jsmith@example.com",
"displayName": "<string>",
"sourceAgent": "<string>",
"country": "<string>",
"currency": "<string>",
"businessType": "<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({
email: 'jsmith@example.com',
displayName: '<string>',
sourceAgent: '<string>',
country: '<string>',
currency: '<string>',
businessType: '<string>'
})
};
fetch('https://api.mareaalcalina.com/v1/users', 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",
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([
'email' => 'jsmith@example.com',
'displayName' => '<string>',
'sourceAgent' => '<string>',
'country' => '<string>',
'currency' => '<string>',
'businessType' => '<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"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"displayName\": \"<string>\",\n \"sourceAgent\": \"<string>\",\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"businessType\": \"<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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"displayName\": \"<string>\",\n \"sourceAgent\": \"<string>\",\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mareaalcalina.com/v1/users")
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 \"email\": \"jsmith@example.com\",\n \"displayName\": \"<string>\",\n \"sourceAgent\": \"<string>\",\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"businessType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "<string>",
"userKey": "<string>",
"verificationStatus": "pending",
"verificationExpiresAt": "2023-11-07T05:31:56Z",
"verificationDeliveryHint": "email-only",
"appliedDefaults": {
"currency": "<string>",
"country": "<string>",
"businessType": "<string>"
},
"storefrontId": "<string>",
"idempotent": true,
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"userId": "<string>",
"userKey": "<string>",
"verificationStatus": "pending",
"verificationExpiresAt": "2023-11-07T05:31:56Z",
"verificationDeliveryHint": "email-only",
"appliedDefaults": {
"currency": "<string>",
"country": "<string>",
"businessType": "<string>"
},
"storefrontId": "<string>",
"idempotent": true,
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<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>"
]
}
}Bootstrap user
Use this when an agent wants to create a Marea account on behalf of a user with one round-trip (account + storefront + verification email).
Creates a Firebase Auth user + Firestore user doc + restricted user key + (optionally) a starter storefront via createMenuCore + sends a 6-digit verification email. Returns 201 (or 207 if the storefront manifest exceeded plan limits). The userKey is returned ONCE — store it.
curl --request POST \
--url https://api.mareaalcalina.com/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"displayName": "<string>",
"sourceAgent": "<string>",
"country": "<string>",
"currency": "<string>",
"businessType": "<string>"
}
'import requests
url = "https://api.mareaalcalina.com/v1/users"
payload = {
"email": "jsmith@example.com",
"displayName": "<string>",
"sourceAgent": "<string>",
"country": "<string>",
"currency": "<string>",
"businessType": "<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({
email: 'jsmith@example.com',
displayName: '<string>',
sourceAgent: '<string>',
country: '<string>',
currency: '<string>',
businessType: '<string>'
})
};
fetch('https://api.mareaalcalina.com/v1/users', 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",
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([
'email' => 'jsmith@example.com',
'displayName' => '<string>',
'sourceAgent' => '<string>',
'country' => '<string>',
'currency' => '<string>',
'businessType' => '<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"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"displayName\": \"<string>\",\n \"sourceAgent\": \"<string>\",\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"businessType\": \"<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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"displayName\": \"<string>\",\n \"sourceAgent\": \"<string>\",\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"businessType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mareaalcalina.com/v1/users")
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 \"email\": \"jsmith@example.com\",\n \"displayName\": \"<string>\",\n \"sourceAgent\": \"<string>\",\n \"country\": \"<string>\",\n \"currency\": \"<string>\",\n \"businessType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"userId": "<string>",
"userKey": "<string>",
"verificationStatus": "pending",
"verificationExpiresAt": "2023-11-07T05:31:56Z",
"verificationDeliveryHint": "email-only",
"appliedDefaults": {
"currency": "<string>",
"country": "<string>",
"businessType": "<string>"
},
"storefrontId": "<string>",
"idempotent": true,
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"userId": "<string>",
"userKey": "<string>",
"verificationStatus": "pending",
"verificationExpiresAt": "2023-11-07T05:31:56Z",
"verificationDeliveryHint": "email-only",
"appliedDefaults": {
"currency": "<string>",
"country": "<string>",
"businessType": "<string>"
},
"storefrontId": "<string>",
"idempotent": true,
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<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"
Body
Request body.
1 - 2001 - 64^[A-Za-z0-9 _.-]+$^[A-Z]{2}$es, en, pt ^[A-Z]{3}$Agent-facing storefront input shape (RFC §6.18.1). Every field is PATCHable per §6.18.1.1.
Show child attributes
Show child attributes
Response
Resource created.
^mk_user_pending email-only Show child attributes
Show child attributes
Show child attributes
Show child attributes