Record a subscription
const url = 'https://api.motenya.app/v1/products/example/subscriptions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contactId":"example","clientId":"example","catalogItemId":"example","storeId":"example","planName":"example","status":"trialing","amount":"149.90","currency":"RON","interval":"day","intervalCount":1,"seats":1,"startedAt":"2026-11-21T09:30:00Z","trialEndsAt":"2026-11-21T09:30:00Z","currentPeriodEnd":"2026-11-21T09:30:00Z","canceledAt":"2026-11-21T09:30:00Z","endsAt":"2026-11-21T09:30:00Z","custom":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.motenya.app/v1/products/example/subscriptions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contactId": "example", "clientId": "example", "catalogItemId": "example", "storeId": "example", "planName": "example", "status": "trialing", "amount": "149.90", "currency": "RON", "interval": "day", "intervalCount": 1, "seats": 1, "startedAt": "2026-11-21T09:30:00Z", "trialEndsAt": "2026-11-21T09:30:00Z", "currentPeriodEnd": "2026-11-21T09:30:00Z", "canceledAt": "2026-11-21T09:30:00Z", "endsAt": "2026-11-21T09:30:00Z", "custom": "example" }'Belongs to a contact, a client, or both (a contact with a single client gets that client too). A catalogItemId fills the plan name, amount, currency and interval that are not sent.
Requires crm:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”PlanName, amount and currency are required unless catalogItemId supplies them.
object
A decimal amount as a string, e.g. “149.90”.
Example
149.90ISO 4217 code, e.g. RON or EUR.
Example
RONISO-8601 date-time, e.g. 2026-11-21T09:30:00Z.
Example
2026-11-21T09:30:00ZISO-8601 date-time, e.g. 2026-11-21T09:30:00Z.
Example
2026-11-21T09:30:00ZWhen the current paid period ends (the renewal).
Example
2026-11-21T09:30:00ZISO-8601 date-time, e.g. 2026-11-21T09:30:00Z.
Example
2026-11-21T09:30:00ZWhen access ends; leave unset while it renews.
Example
2026-11-21T09:30:00ZCustom field values keyed by field key; null clears one. See GET /products/{productId}/custom-fields.
Responses
Section titled “Responses”Success
object
object
object
Amount per month, for MRR.
object
Example
{ "status": "trialing", "interval": "day"}Invalid request
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing, invalid, revoked or expired API key
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing scope, API turned off, published article without publish scope, or account suspended
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Not found, or outside the knowledge bases this key may use
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Slug or translation already exists
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rejected by validation (e.g. unknown language or category)
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Rate limited; see Retry-After
object
object
object
Example
{ "error": { "code": "SLUG_TAKEN" }}Internal error