Deployments API
Manage and monitor your agent deployments. Deployments can be widgets, API integrations, or SDK implementations.
Scope: deployments:read
Management API preview
Deployments management is exposed in the Cresva dashboard today. The brand-facing API documented here ships with the public Management API release.
GET
/deploymentsList all agent deployments including widgets, API integrations, and SDK implementations.
Pagination: All list endpoints support page (default 1), perPage (default 20, max 100), sort, order (asc/desc), since and until (ISO 8601). See Rate Limits for usage best practices.
bash
curl "https://api.cresva.ai/api/storefront/[brandId]/deployments?perPage=20" \
-H "Authorization: Bearer cresva_ak_..."javascript
const response = await fetch(
"https://api.cresva.ai/api/storefront/[brandId]/deployments?perPage=20",
{
headers: {
Authorization: "Bearer " + process.env.CRESVA_API_KEY,
},
}
);
const { data } = await response.json();Example Response
JSON
{
"data": [
{
"id": "dep_m4n5o6p7",
"name": "Main Website Widget",
"deploymentType": "widget",
"domain": "example.com",
"status": "active",
"totalSessions": 12450,
"totalQueries": 34200,
"revenue": 284930,
"createdAt": "2026-02-15T10:00:00Z"
}
],
"pagination": { "page": 1, "perPage": 20, "total": 3, "hasMore": false }
}GET
/deployments/:id/statsRetrieve detailed analytics for a specific deployment including sessions, queries, revenue, and conversion funnel.
Query Parameters
sincestringISO 8601 start dateuntilstringISO 8601 end datebash
curl "https://api.cresva.ai/api/storefront/[brandId]/deployments/dep_m4n5o6p7/stats?since=2026-03-01T00:00:00Z&until=2026-03-28T23:59:59Z" \
-H "Authorization: Bearer cresva_ak_..."javascript
const response = await fetch(
"https://api.cresva.ai/api/storefront/[brandId]/deployments/dep_m4n5o6p7/stats?since=2026-03-01T00:00:00Z&until=2026-03-28T23:59:59Z",
{
headers: {
Authorization: "Bearer " + process.env.CRESVA_API_KEY,
},
}
);
const { data } = await response.json();Example Response
JSON
{
"data": {
"deploymentId": "dep_m4n5o6p7",
"sessions": 12450,
"queries": 34200,
"revenue": 284930,
"conversionFunnel": {
"impressions": 34200,
"clicks": 8920,
"addToCart": 3450,
"purchases": 1423
},
"period": { "since": "2026-03-01T00:00:00Z", "until": "2026-03-28T23:59:59Z" }
}
}Deployment object
JSON
{
"id": "dep_m4n5o6p7",
"name": "Main Website Widget",
"deploymentType": "widget",
"domain": "example.com",
"status": "active",
"totalSessions": 12450,
"totalQueries": 34200,
"revenue": 284930,
"createdAt": "2026-02-15T10:00:00Z"
}