Install
openclaw skills install @byungkyu/squarespaceSquarespace Commerce API integration with managed OAuth. Manage products, inventory, orders, customer profiles, and transactions. Use this skill when users want to manage e-commerce operations on Squarespace stores. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Calls run through the maton CLI with OAuth login; default to read and list calls, and confirm every write or new connection with the user.
openclaw skills install @byungkyu/squarespaceAccess the Squarespace Commerce API with managed OAuth authentication. Manage products, inventory, orders, customer profiles, and transactions.
All access runs through the Maton gateway and the maton CLI.
maton login --oauth # authenticate once (OAuth, recommended)
maton connection create squarespace # connect the account (needs user approval)
maton api '/squarespace/1.0/commerce/inventory' # first call
npm install -g @maton/cli
brew install maton-ai/cli/maton
maton login --oauth
Opens the OAuth login page in the browser and waits for authorization. Once complete, it creates a profile in config.toml (eg. $HOME/.config/maton/config.toml) and stores the access and refresh tokens in the operating system's credential store (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux), auto-renewed on expiry. The CLI reads them when it needs them; nothing else should.
maton login --interactive
Requires manually copying an API key from Settings, which is error prone. Once complete, it also creates a profile in config.toml and stores the key in the same credential store. It is preferred over export MATON_API_KEY=..., which exposes a long-lived credential to every child process. When MATON_API_KEY is set, it overrides the active profile. If the CLI cannot be installed at all, see Appendix: Environments Without the CLI for the raw HTTP form and the rules for handling the key.
maton whoami --json
{
"authenticated": true,
"profile_name": "alice@example.com",
"auth_type": "oauth"
}
authenticated is false, stop and login again via maton login --oauth.auth_type is api_key, it is recommended to login via maton login --oauth and avoid keeping a long-lived credential.maton connection list squarespace --status ACTIVE
{
"connections": [
{
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "squarespace",
"method": "OAUTH2",
"metadata": {}
}
]
}
Refer to maton connection list --help for possible flags and values.
Requires explicit user approval. Confirm that the user intends to authorize Squarespace access before running this. Never create a connection on your own initiative.
maton connection create squarespace
Refer to maton connection create --help for possible flags and values.
maton connection get {connection_id}
{
"connection": {
"connection_id": "{connection_id}",
"status": "PENDING",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=5e9...",
"app": "squarespace",
"metadata": {}
}
}
Open the returned URL in a browser to complete authorizing Squarespace. If Squarespace offers scope selection, choose only the scopes the current task needs.
maton connection delete {connection_id} --yes
If there are multiple Squarespace connections, specify which one to use so requests go to the intended account:
maton api '/squarespace/1.0/commerce/inventory' --connection {connection_id}
Squarespace has no typed maton squarespace commands yet, so every call goes through maton api.
maton api '/squarespace/1.0/commerce/inventory'
Paths are /squarespace/{native-api-path}. The gateway forwards everything after the app segment to api.squarespace.com and injects the credential for the connection. Query strings, custom headers (except Host and Authorization), and all HTTP methods pass through. Send a JSON body with --input -:
maton api -X POST '/squarespace/{native-api-path}' -H 'Content-Type: application/json' --input - <<'JSON'
{"key": "value"}
JSON
Refer to maton api --help for possible flags and values.
maton login --oauth, the token is held by the operating system's credential store and the CLI renews it on its own. Do not print it, write it to a file, pass it on a command line, or run maton token to look at one — only to hand it to a program that needs it.config.toml, or any other credential file — not for this skill, not for another application, and not to "check" that auth works (use maton whoami). Let the CLI use its own stored credential; the agent never needs the value. The same applies to unrelated secrets on the machine: .env files, SSH keys, cloud CLI credentials, and browser profiles are out of scope for an API gateway and must not be read or transmitted.api.maton.ai. Prefer endpoints that work with the gateway-injected connection credential.maton connection delete {connection_id}).maton connection create squarespace. Never create connections on the agent's own initiative.--connection when the user has multiple connections for this app, and -p/--profile when they have multiple Maton accounts. Do not let an ambiguous default decide where a write lands.maton api '/squarespace/1.0/commerce/inventory'
Query parameters:
cursor (optional): Pagination cursor from previous responseResponse:
{
"inventory": [
{
"variantId": "5ba1418df4204bb2d21eac3f",
"sku": "SQ0001",
"descriptor": "Product Name - Size: Medium",
"isUnlimited": false,
"quantity": 25
}
],
"pagination": {
"hasNextPage": true,
"nextPageCursor": "abc123",
"nextPageUrl": "https://api.squarespace.com/1.0/commerce/inventory?cursor=abc123"
}
}
maton api '/squarespace/1.0/commerce/inventory/{variantIds}'
{variantIds}: Comma-separated variant IDs (max 50)maton api -X POST '/squarespace/1.0/commerce/inventory/adjustments' -H 'Idempotency-Key: unique-key-here' -H 'Content-Type: application/json' --input - <<'JSON'
{
"incrementOperations": [{"variantId": "variant-id-1", "quantity": 5}],
"decrementOperations": [{"variantId": "variant-id-2", "quantity": 2}],
"setFiniteOperations": [{"variantId": "variant-id-3", "quantity": 100}],
"setUnlimitedOperations": ["variant-id-4"]
}
JSON
Response: 204 No Content on success
maton api '/squarespace/1.0/commerce/orders'
Query parameters:
customerId (optional): Filter by customer IDmodifiedAfter (conditional): ISO 8601 datetime (e.g., 2024-01-01T00:00:00Z) - required with modifiedBeforemodifiedBefore (conditional): ISO 8601 datetime - required with modifiedAftercursor (optional): Pagination cursorfulfillmentStatus (optional): PENDING, FULFILLED, or CANCELEDNote: Cannot combine cursor with date range parameters. Date filters must be used together.
Response:
{
"result": [
{
"id": "order-id",
"orderNumber": "1001",
"createdOn": "2024-01-15T10:30:00Z",
"modifiedOn": "2024-01-15T12:00:00Z",
"channel": "web",
"testmode": false,
"customerEmail": "customer@example.com",
"fulfillmentStatus": "PENDING",
"lineItems": [...],
"subtotal": {"value": "99.99", "currency": "USD"},
"shippingTotal": {"value": "9.99", "currency": "USD"},
"taxTotal": {"value": "8.50", "currency": "USD"},
"grandTotal": {"value": "118.48", "currency": "USD"}
}
],
"pagination": {
"hasNextPage": true,
"nextPageCursor": "abc123",
"nextPageUrl": "..."
}
}
maton api '/squarespace/1.0/commerce/orders/{orderId}'
maton api -X POST '/squarespace/1.0/commerce/orders' -H 'Idempotency-Key: unique-key-here' -H 'Content-Type: application/json' --input - <<'JSON'
{
"channelName": "External Store",
"externalOrderReference": "ORDER-12345",
"customerEmail": "customer@example.com",
"lineItems": [
{
"lineItemType": "PHYSICAL_PRODUCT",
"variantId": "variant-id",
"quantity": 2,
"unitPricePaid": {"currency": "USD", "value": "29.99"}
}
],
"subtotal": {"currency": "USD", "value": "59.98"},
"priceTaxInterpretation": "EXCLUSIVE",
"grandTotal": {"currency": "USD", "value": "59.98"},
"createdOn": "2024-01-15T10:30:00Z"
}
JSON
Response: 201 Created with Order object
Note: subtotal must equal the sum of lineItems.unitPricePaid.value * quantity.
maton api -X POST '/squarespace/1.0/commerce/orders/{orderId}/fulfillments' -H 'Content-Type: application/json' --input - <<'JSON'
{
"shouldSendNotification": true,
"shipments": [
{
"shipDate": "2024-01-16T08:00:00Z",
"carrierName": "USPS",
"service": "Priority Mail",
"trackingNumber": "9400111899223456789012",
"trackingUrl": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111899223456789012"
}
]
}
JSON
Response: 204 No Content on success
maton api '/squarespace/1.0/commerce/store_pages'
Query parameters:
cursor (optional): Pagination cursorResponse:
{
"storePages": [
{
"id": "store-page-id",
"title": "Main Store",
"isEnabled": true,
"urlSlug": "store"
}
],
"pagination": {...}
}
maton api '/squarespace/v2/commerce/products'
Query parameters:
modifiedAfter (optional): ISO 8601 datetimemodifiedBefore (optional): ISO 8601 datetimetype (optional): Comma-separated types: PHYSICAL, SERVICE, GIFT_CARD, DIGITALcursor (optional): Pagination cursorNote: Cannot combine cursor with date/type filters.
Response:
{
"products": [
{
"id": "product-id",
"type": "PHYSICAL",
"storePageId": "store-page-id",
"name": "Product Name",
"description": "<p>HTML description</p>",
"url": "https://example.squarespace.com/store/product-slug",
"urlSlug": "product-slug",
"tags": ["tag1", "tag2"],
"isVisible": true,
"variants": [...],
"images": [...],
"createdOn": "2024-01-01T00:00:00Z",
"modifiedOn": "2024-01-15T12:00:00Z"
}
],
"pagination": {...}
}
maton api '/squarespace/v2/commerce/products/{productIds}'
{productIds}: Comma-separated product IDs (max 50)maton api -X POST '/squarespace/v2/commerce/products' -H 'Content-Type: application/json' --input - <<'JSON'
{
"type": "PHYSICAL",
"storePageId": "store-page-id",
"name": "New Product",
"description": "<p>Product description</p>",
"urlSlug": "new-product",
"tags": ["new", "featured"],
"isVisible": true,
"variants": [
{
"sku": "SKU-001",
"pricing": {
"basePrice": {"currency": "USD", "value": "49.99"}
},
"stock": {"quantity": 100, "unlimited": false}
}
]
}
JSON
Response: 201 Created with Product object
maton api -X POST '/squarespace/v2/commerce/products/{productId}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "Updated Product Name",
"description": "<p>Updated description</p>",
"isVisible": true,
"tags": ["updated", "sale"]
}
JSON
Response: 200 OK with Product object
maton api -X DELETE '/squarespace/v2/commerce/products/{productId}'
Response: 204 No Content on success
maton api -X POST '/squarespace/v2/commerce/products/{productId}/variants' -H 'Content-Type: application/json' --input - <<'JSON'
{
"sku": "SKU-002",
"pricing": {
"basePrice": {"currency": "USD", "value": "59.99"},
"salePrice": {"currency": "USD", "value": "49.99"},
"onSale": true
},
"stock": {"quantity": 50, "unlimited": false},
"attributes": {"Size": "Large"},
"shippingMeasurements": {
"weight": {"unit": "POUND", "value": 1.5},
"dimensions": {"unit": "INCH", "length": 10, "width": 8, "height": 4}
}
}
JSON
Response: 201 Created with ProductVariant object
Note: To use attributes, the product must first have matching variantAttributes set via Update Product (e.g., "variantAttributes": ["Size"]).
maton api -X POST '/squarespace/v2/commerce/products/{productId}/variants/{variantId}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"sku": "SKU-002-UPDATED",
"pricing": {
"basePrice": {"currency": "USD", "value": "64.99"},
"onSale": false
}
}
JSON
Response: 200 OK with ProductVariant object
Note: Stock and images cannot be updated via this endpoint.
maton api -X DELETE '/squarespace/v2/commerce/products/{productId}/variants/{variantId}'
Response: 204 No Content on success
Note: Cannot delete the only variant of a product.
maton api sends a body verbatim but does not build a multipart envelope, so assemble the body first and hand it to --input. Nothing here handles a credential — the CLI still injects it.
BOUNDARY="maton-$$"
{
printf -- '--%s\r\nContent-Disposition: form-data; name="file"; filename="image.png"\r\nContent-Type: image/png\r\n\r\n' "$BOUNDARY"
cat image.png
printf -- '\r\n--%s--\r\n' "$BOUNDARY"
} > /tmp/squarespace-image.body
maton api -X POST '/squarespace/v2/commerce/products/{productId}/images' \
-H "Content-Type: multipart/form-data; boundary=$BOUNDARY" \
-H 'User-Agent: maton-squarespace-skill/1.1' \
--input /tmp/squarespace-image.body
Response: 202 Accepted
{
"imageId": "image-id"
}
Requirements:
maton api '/squarespace/v2/commerce/products/{productId}/images/{imageId}/status'
Response:
{
"status": "PROCESSING"
}
Status values: PROCESSING, READY, ERROR
maton api -X POST '/squarespace/v2/commerce/products/{productId}/images/{imageId}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"altText": "Product image description"
}
JSON
Response: 200 OK with ProductImage object
maton api -X POST '/squarespace/v2/commerce/products/{productId}/images/{imageId}/order' -H 'Content-Type: application/json' --input - <<'JSON'
{
"afterImageId": "other-image-id"
}
JSON
Use null for afterImageId to move image to the top.
Response: 204 No Content
maton api -X POST '/squarespace/v2/commerce/products/{productId}/variants/{variantId}/image' -H 'Content-Type: application/json' --input - <<'JSON'
{
"imageId": "image-id"
}
JSON
Use null for imageId to remove the image from the variant.
Response: 204 No Content
maton api -X DELETE '/squarespace/v2/commerce/products/{productId}/images/{imageId}'
Response: 204 No Content
maton api '/squarespace/1.0/profiles'
Query parameters:
cursor (optional): Pagination cursorfilter (optional): Semicolon-separated filters (e.g., isCustomer,true;hasAccount,true)sortDirection (optional): asc or dsc (default: dsc)sortField (optional): createdOn, id, email, or lastName (default: id)Filter options:
isCustomer,true or isCustomer,falsehasAccount,true or hasAccount,falseemail,customer@example.comResponse:
{
"profiles": [
{
"id": "profile-id",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"hasAccount": true,
"isCustomer": true,
"createdOn": "2024-01-01T00:00:00Z",
"address": {
"address1": "123 Main St",
"city": "New York",
"state": "NY",
"countryCode": "US",
"postalCode": "10001"
},
"acceptsMarketing": true,
"transactionsSummary": {
"orderCount": 5,
"totalOrderAmount": {"value": "499.95", "currency": "USD"}
}
}
],
"pagination": {...}
}
maton api '/squarespace/1.0/profiles/{profileIds}'
{profileIds}: Comma-separated profile IDs (max 50)maton api '/squarespace/1.0/commerce/transactions'
Query parameters:
modifiedAfter (conditional): ISO 8601 datetime - required with modifiedBeforemodifiedBefore (conditional): ISO 8601 datetime - required with modifiedAftercursor (optional): Pagination cursorNote: Date filters must be used together (both modifiedAfter and modifiedBefore are required when filtering by date).
Response:
{
"documents": [
{
"id": "document-id",
"createdOn": "2024-01-15T10:30:00Z",
"modifiedOn": "2024-01-15T12:00:00Z",
"customerEmail": "customer@example.com",
"salesOrderId": "order-id",
"voided": false,
"totalSales": {"value": "99.99", "currency": "USD"},
"totalNetSales": {"value": "99.99", "currency": "USD"},
"totalTaxes": {"value": "8.50", "currency": "USD"},
"total": {"value": "108.49", "currency": "USD"},
"payments": [
{
"id": "payment-id",
"amount": {"value": "108.49", "currency": "USD"},
"creditCardType": "VISA",
"provider": "STRIPE",
"paidOn": "2024-01-15T10:35:00Z"
}
]
}
],
"pagination": {...}
}
maton api '/squarespace/1.0/commerce/transactions/{documentIds}'
{documentIds}: Comma-separated document IDs (max 50)Squarespace uses cursor-based pagination. Response includes:
{
"pagination": {
"hasNextPage": true,
"nextPageCursor": "cursor-value",
"nextPageUrl": "https://api.squarespace.com/..."
}
}
To get the next page, use the cursor parameter:
maton api '/squarespace/v2/commerce/products?cursor=cursor-value'
v2 (e.g., /squarespace/v2/commerce/products)1.0 (e.g., /squarespace/1.0/commerce/store_pages)1.0User-Agent header describing your applicationSquarespace has no typed accessor yet, so calls go through the api passthrough, which takes the app and the path after it. login() opens a browser once per machine and writes the session to the SDK's own store — maton login does not carry over, and the SDK never signs in implicitly.
Python
pip install maton-ai
from maton_ai import Maton, login
# login()
maton = Maton()
# maton = Maton(api_key="...")
result = maton.api.get("squarespace", "/1.0/commerce/inventory")
JavaScript
npm install @maton/sdk
import { Maton, login } from "@maton/sdk";
// await login()
const maton = new Maton();
// const maton = new Maton({ apiKey: "..." });
const result = await maton.api.get("squarespace", "/1.0/commerce/inventory");
| Status | Meaning |
|---|---|
| 400 | Missing Squarespace connection |
| 401 | Invalid, missing, or expired Maton credential |
| 429 | Rate limited (10 requests/second per account) |
| 500 | Internal Server Error |
| 4xx/5xx | Passthrough error from the Squarespace API |
Errors from Squarespace are passed through with their original status codes and response bodies.
maton whoami --json
"authenticated": false — login again with maton login --oauth."auth_type": "api_key" — prefer maton login --oauth so no long-lived key sits on the machine.maton whoami is the check.Then confirm the app is connected:
maton connection list squarespace --status ACTIVE
Paths passed to maton api must start with /squarespace/:
maton api '/squarespace/1.0/commerce/inventory'maton api '/1.0/commerce/inventory'A 500 may mean the Squarespace authorization expired. With the user's approval, create a new connection (maton connection create squarespace) and complete authorization; once it is ACTIVE, delete the stale connection so the gateway uses the new one.
10 requests per second per Maton account
Squarespace API rate limits also apply
General: 300 requests per minute (5 per second)
Create Order: 100 requests per hour per website (with API key auth)
Exceeding limits returns 429 Too Many Requests with a one-minute cooldown
maton api.--paginate walks every page and -q/--jq trims the response before it reaches you. On typed commands, --jq requires --json.maton api; Host and Authorization are set by the gateway.Everything above uses the CLI, which holds the credential itself and never exposes it to the caller. Use the raw HTTP form below only where the CLI cannot be installed — a locked-down container, a CI step, a sandbox with no package manager. If maton is available, maton api does the same job without handling a secret.
Calling https://api.maton.ai/ directly means holding a long-lived Maton API key in the process environment, where it is readable by every child process and easy to leak into logs, crash dumps, shell history, and pasted output. Handle it accordingly:
[ -n "$MATON_API_KEY" ] && echo "MATON_API_KEY is set" || echo "MATON_API_KEY is not set"
.env, or a script makes it permanent. Let the environment that starts the session supply it — a CI secret store, a container secret, a secrets manager.-H "Authorization: Bearer $MATON_API_KEY"), where it lands in ps output and shell history. Feed the header in on stdin instead, as below.api.maton.ai. It is not a credential for Squarespace or any other third-party host.curl --config - reads the header from stdin, so the key is never a command-line argument and never reaches ps or shell history. Query values must be URL-encoded (is:unread becomes is%3Aunread).
curl --config - "https://api.maton.ai/squarespace/1.0/commerce/inventory" <<EOF
header = "Authorization: Bearer $MATON_API_KEY"
header = "User-Agent: maton-squarespace-skill/1.1"
# Pin a specific connection when the account has more than one:
# header = "Maton-Connection: {connection_id}"
EOF
The same rules as the CLI apply to every request made this way: read-only calls first, and explicit user confirmation before any POST, PUT, PATCH, or DELETE.