agentlyleads docs
Offerings API

API Reference

The reference below covers every endpoint in the Products API. Code examples are generated automatically; the live playground is disabled to prevent accidental writes to production from the docs site.

POST/api/v1/products

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/products" \  -H "Content-Type: application/json" \  -d '{    "products": [      {        "name": "Pro Plan — Monthly",        "type": "SUBSCRIPTION",        "sku": "PLAN-PRO-MO",        "price": 49,        "currency": "USD",        "unit": "seat",        "billingPeriod": "MONTHLY",        "category": "SaaS Plans"      }    ]  }'
{  "created": 1,  "updated": 1,  "errors": 0,  "results": [    {      "index": 0,      "status": "created",      "id": "018e2a4b-0000-7000-8000-aabbccddeeff"    },    {      "index": 1,      "status": "updated",      "id": "018e2a4b-1111-7000-8000-aabbccddeeff"    }  ]}
{  "created": 1,  "updated": 0,  "errors": 1,  "results": [    {      "index": 0,      "status": "created",      "id": "018e2a4b-0000-7000-8000-aabbccddeeff"    },    {      "index": 1,      "status": "error",      "error": "name: String must contain at least 1 character(s)"    }  ]}
{  "error": "products must not be empty."}
{  "error": "Unauthorized"}
GET/api/v1/products

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Query Parameters

sku?string

Filter to the single product with this exact SKU.

category?string

Filter to products whose category name matches exactly (case-sensitive).

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/products?sku=PLAN-PRO-MO&category=SaaS+Plans"
{  "products": [    {      "id": "018e2a4b-0000-7000-8000-aabbccddeeff",      "name": "Pro Plan — Monthly",      "type": "SUBSCRIPTION",      "sku": "PLAN-PRO-MO",      "externalId": null,      "category": "SaaS Plans",      "price": 49,      "cost": null,      "currency": "USD",      "unit": "seat",      "billingPeriod": "MONTHLY",      "termMonths": null,      "stockQty": null,      "reorderLevel": null,      "description": null,      "features": null,      "active": true,      "createdAt": "2024-01-15T10:30:00.000Z",      "updatedAt": "2024-06-27T08:15:00.000Z"    }  ]}
{  "error": "Unauthorized"}