Sending Commerce API
The Commerce API from Sending — 4 operation(s) for commerce.
The Commerce API from Sending — 4 operation(s) for commerce.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/sending-dev:sending-dev-commerce-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Sending.dev Commerce API
version: 1.0.0
description: 'Public REST API of Sending.dev (MCP-native orchestrator for email + WhatsApp + Telegram).
## Authentication
Every request requires `Authorization: Bearer sk_...` (workspace API key). The `tenantId` is always derived from the key.
## Idempotency
Sends require an `idempotencyKey` (min 8 characters) to prevent duplicates on retries.'
contact:
name: Sending.dev
url: https://sending.dev
servers:
- url: https://sending.dev/api/v1
description: Production
- url: http://localhost:3000/api/v1
description: Local development
security:
- bearerAuth: []
tags:
- name: Commerce
paths:
/commerce/products:
put:
tags:
- Commerce
summary: Bulk upsert of the product catalog
description: 'Idempotent on `externalId` (source `api`), max 500 per call. Required scope: `commerce:write`. Requires a plan with the `ecommerce` feature.'
security:
- bearerAuth: []
x-required-scope:
- commerce:write
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
products:
type: array
items:
$ref: '#/components/schemas/CommerceProductInput'
minItems: 1
maxItems: 500
required:
- products
responses:
'200':
description: Products upserted.
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceUpsertResult'
'401':
description: Missing or invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: Plan quota exceeded.
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaError'
'403':
description: Insufficient scope.
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
'422':
description: Invalid input.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
operationId: putCommerceProducts
x-operation-id-source: derived
get:
tags:
- Commerce
summary: List catalog products
description: 'Excludes deleted ones. Required scope: `commerce:read`. Requires a plan with the `ecommerce` feature.'
security:
- bearerAuth: []
x-required-scope:
- commerce:read
parameters:
- schema:
type: string
description: Search on title.
required: false
name: q
in: query
- schema:
type:
- integer
- 'null'
description: Default 50, max 200.
required: false
name: limit
in: query
- schema:
type: string
description: Cursor on `updatedAt` (ISO).
required: false
name: cursor
in: query
responses:
'200':
description: Catalog products.
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceProductList'
'401':
description: Missing or invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: Plan quota exceeded.
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaError'
'403':
description: Insufficient scope.
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
operationId: getCommerceProducts
x-operation-id-source: derived
/commerce/products/{externalId}:
delete:
tags:
- Commerce
summary: Soft delete a product
description: 'Required scope: `commerce:write`. Requires a plan with the `ecommerce` feature.'
security:
- bearerAuth: []
x-required-scope:
- commerce:write
parameters:
- schema:
type: string
description: External id of the product.
required: true
name: externalId
in: path
responses:
'200':
description: Product deleted (soft).
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceDeleteResult'
'401':
description: Missing or invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: Plan quota exceeded.
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaError'
'403':
description: Insufficient scope.
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
operationId: deleteCommerceProductsByExternalId
x-operation-id-source: derived
/commerce/carts:
post:
tags:
- Commerce
summary: Upsert a cart
description: 'Idempotent on `externalId`. Queues a delayed abandonment check that emits the `cart_abandoned` event. A new cart whose email matches an existing contact emits `started_checkout` once per `externalId`. Required scope: `commerce:write`. Requires a plan with the `ecommerce` feature.'
security:
- bearerAuth: []
x-required-scope:
- commerce:write
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceCartInput'
responses:
'202':
description: Cart accepted.
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceAccepted'
'401':
description: Missing or invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: Plan quota exceeded.
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaError'
'403':
description: Insufficient scope.
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
'422':
description: Invalid input.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
operationId: postCommerceCarts
x-operation-id-source: derived
/commerce/orders:
post:
tags:
- Commerce
summary: Notify a paid order
description: 'Closes the source cart, emits `order_paid`, `placed_order` and one `ordered_product` per item, and records the conversion. A buyer who is not a contact yet is created as a transactional-only contact (consent `not_subscribed`: receipts and notices, no marketing campaigns or automations, and not counted toward the plan''s contact limit) instead of dropping the order. The events are deduplicated on `externalId`: sending the same order again returns 202 without emitting second events or starting post-purchase automations twice. Required scope: `commerce:write`. Requires a plan with the `ecommerce` feature.'
security:
- bearerAuth: []
x-required-scope:
- commerce:write
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceOrderInput'
responses:
'202':
description: Order accepted.
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceAccepted'
'401':
description: Missing or invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: Plan quota exceeded.
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaError'
'403':
description: Insufficient scope.
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
'422':
description: Invalid input.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
operationId: postCommerceOrders
x-operation-id-source: derived
get:
tags:
- Commerce
summary: List orders
description: 'Orders from connected stores and from `POST /commerce/orders`, newest first. `attributedMessageId` is the marketing message credited with the order (last content click in the window). Required scope: `commerce:read`.'
security:
- bearerAuth: []
x-required-scope:
- commerce:read
parameters:
- schema:
type: string
format: uuid
required: false
name: contactId
in: query
- schema:
type: string
enum:
- placed
- fulfilled
- cancelled
required: false
name: status
in: query
- schema:
type: string
format: date-time
description: Orders placed at or after this instant (ISO 8601, offset allowed).
required: false
name: since
in: query
- schema:
type:
- integer
- 'null'
description: Default 50, max 200.
required: false
name: limit
in: query
- schema:
type: string
description: '`nextCursor` of the previous page; an unreadable cursor is a 422 `invalid_cursor`.'
required: false
name: cursor
in: query
responses:
'200':
description: Orders.
content:
application/json:
schema:
$ref: '#/components/schemas/CommerceOrderList'
'401':
description: Missing or invalid token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Insufficient scope.
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
'422':
description: Invalid input.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
operationId: getCommerceOrders
x-operation-id-source: derived
components:
schemas:
CommerceProductInput:
type: object
properties:
externalId:
type: string
minLength: 1
title:
type: string
minLength: 1
description:
type: string
default: ''
imageUrl:
type: string
default: ''
price:
type: number
minimum: 0
currency:
type: string
default: EUR
url:
type: string
default: ''
required:
- externalId
- title
CommerceUpsertResult:
type: object
properties:
upserted:
type: integer
required:
- upserted
ValidationError:
type: object
properties:
error:
type: object
properties:
formErrors:
type: array
items:
type: string
fieldErrors:
type: object
additionalProperties:
type: array
items:
type: string
required:
- formErrors
- fieldErrors
required:
- error
description: 'Zod validation failed: shape of `ZodError.flatten()`.'
CommerceOrderList:
type: object
properties:
orders:
type: array
items:
$ref: '#/components/schemas/CommerceOrder'
nextCursor:
type:
- string
- 'null'
required:
- orders
- nextCursor
CommerceDeleteResult:
type: object
properties:
deleted:
type: integer
required:
- deleted
CommerceCartInput:
type: object
properties:
externalId:
type: string
minLength: 1
email:
type: string
format: email
items:
type: array
items:
type: object
properties:
title:
type: string
minLength: 1
quantity:
type: integer
minimum: 1
default: 1
price:
type: number
minimum: 0
imageUrl:
type: string
url:
type: string
productId:
type: string
required:
- title
minItems: 1
total:
type: number
minimum: 0
currency:
type: string
default: EUR
cartUrl:
type: string
required:
- externalId
- email
- items
CommerceProduct:
type: object
properties:
id:
type: string
format: uuid
externalId:
type: string
title:
type: string
description:
type: string
imageUrl:
type: string
price:
type:
- string
- 'null'
currency:
type: string
url:
type: string
source:
type: string
updatedAt:
type: string
format: date-time
example: '2026-06-30T12:00:00.000Z'
required:
- id
- externalId
- title
CommerceAccepted:
type: object
properties:
status:
type: string
enum:
- accepted
required:
- status
Error:
type: object
properties:
error:
type: string
example: not_found
message:
type: string
required:
- error
description: 'Generic error: snake_case code in `error`.'
CommerceProductList:
type: object
properties:
products:
type: array
items:
$ref: '#/components/schemas/CommerceProduct'
required:
- products
CommerceOrderInput:
type: object
properties:
externalId:
type: string
minLength: 1
email:
type: string
format: email
items:
type: array
items:
type: object
properties:
title:
type: string
minLength: 1
quantity:
type: integer
minimum: 1
default: 1
price:
type: number
minimum: 0
imageUrl:
type: string
url:
type: string
productId:
type: string
required:
- title
default: []
total:
type: number
minimum: 0
currency:
type: string
default: EUR
cartExternalId:
type: string
required:
- externalId
- email
- total
CommerceOrder:
type: object
properties:
id:
type: string
format: uuid
source:
type: string
enum:
- store
- api
description: '`store`: a connected store; `api`: `POST /commerce/orders`.'
connectionId:
type:
- string
- 'null'
format: uuid
externalId:
type: string
contactId:
type:
- string
- 'null'
format: uuid
status:
type: string
enum:
- placed
- fulfilled
- cancelled
description: 'API orders are always `placed`: the API knows no fulfillment or cancellation.'
total:
type: number
refunded:
type: number
currency:
type: string
placedAt:
type: string
format: date-time
attributedMessageId:
type:
- string
- 'null'
description: Marketing message with the last content click in the attribution window before the order; `null` if none.
attributedTo:
type:
- object
- 'null'
properties:
campaignId:
type:
- string
- 'null'
format: uuid
automationId:
type:
- string
- 'null'
format: uuid
required:
- campaignId
- automationId
items:
type: array
items:
type: object
properties:
title:
type: string
quantity:
type: number
price:
type:
- number
- 'null'
productId:
type:
- string
- 'null'
required:
- title
- quantity
- price
- productId
required:
- id
- source
- connectionId
- externalId
- contactId
- status
- total
- refunded
- currency
- placedAt
- attributedMessageId
- attributedTo
- items
QuotaError:
type: object
properties:
error:
type: string
example: quota_exceeded
message:
type: string
resource:
type: string
limit:
type: number
used:
type: number
remaining:
type: number
plan:
type: string
required:
- error
description: Plan limit exceeded (entitlement).
ForbiddenError:
type: object
properties:
error:
type: string
enum:
- forbidden
need:
type: string
example: contacts:write
required:
- error
description: Insufficient scope; `need` names the missing scope.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Workspace API key in the `sk_...` format, passed as `Authorization: Bearer sk_...`. The `tenantId` is always derived from the key, never from a request parameter.'