Platform internal
Get Customer Context
Resolve a customer's site context for the agent runtime.
Returns the customer's primary site ID and all their sites. Used by platform skills to resolve which site to operate on.
Path Parameters
uuiduuidResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/customer-context/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
"primary_site_id": "e4832575-3d0f-4b4d-8fd3-3db114f512f5",
"sites": [
{
"config_id": "d1d31429-d888-4f1c-b9c1-4e842f9bce5b",
"content_mode": "string",
"customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
"is_primary": true,
"status": "string"
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Site Analytics
Get analytics summary for a customer's site.
Path Parameters
uuiduuidQuery Parameters
7Response Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics?period=7"{
"daily_views": [
{}
],
"device_breakdown": {},
"period_days": 0,
"top_pages": [
{}
],
"total_views": 0,
"unique_sessions": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}List Site Forms
List form submissions for a customer's site.
Path Parameters
uuiduuidQuery Parameters
falseResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms?unread_only=false"[
{
"created_at": "2019-08-24T14:15:22Z",
"form_data": {},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_read": true,
"page_slug": "string",
"submitter_email": "string"
}
]{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Site Form Stats
Get form submission stats for a customer's site.
Path Parameters
uuiduuidResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/forms/stats"{
"total": 0,
"unread": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}List Site Media
List media files for a customer's site.
Path Parameters
uuiduuidResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/media"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Media Upload Url
Get a presigned R2 upload URL for site media.
The agent directs the user to PUT their file to the returned URL. A WebsiteMedia record is created so list-media returns it immediately.
Path Parameters
uuiduuidlength <= 255Response Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/media/upload-url" \ -H "Content-Type: application/json" \ -d '{ "content_type": "string", "filename": "string" }'null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}List Site Pages
List all pages for a customer's site.
Path Parameters
uuiduuidResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages"[
{
"content_html": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"metadata_json": {},
"slug": "string",
"sort_order": 0,
"status": "draft",
"title": "string",
"updated_at": "2019-08-24T14:15:22Z"
}
]{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Create Site Page
Create a new page on a customer's site.
Path Parameters
uuiduuid""length <= 200length <= 300Response Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages" \ -H "Content-Type: application/json" \ -d '{ "slug": "string", "title": "string" }'null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Site Page
Get a single page by slug.
Path Parameters
uuiduuidResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/string"{
"content_html": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"metadata_json": {},
"slug": "string",
"sort_order": 0,
"status": "draft",
"title": "string",
"updated_at": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Delete Site Page
Delete a page from a customer's site.
Path Parameters
uuiduuidResponse Body
curl -X DELETE "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/string"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Update Site Page
Update a page's content. Creates a version snapshot on content/title changes.
Path Parameters
uuiduuidResponse Body
curl -X PUT "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/string" \ -H "Content-Type: application/json" \ -d '{}'{
"content_html": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"metadata_json": {},
"slug": "string",
"sort_order": 0,
"status": "draft",
"title": "string",
"updated_at": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Publish Site
Trigger a site redeploy for a customer's site.
Enqueues the Celery redeploy task. The agent can call this after editing pages to push changes live.
Path Parameters
uuiduuidResponse Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/platform/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/publish"{
"message": "string",
"status": "string",
"task_id": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}