API reference/Preview links
List a site's preview links
Try itThe site's no-login preview links, newest first (up to 20): each with its address, whether it still works, when it runs out and when it was last opened.
GET
/api/v1/sites/{site_id}/preview-linksAuthentication
An API key as Authorization: Bearer or x-api-key. It needs the sites:read scope — read sites, pages and sections.
sites:readRead onlyMCP tool: list_preview_links
Parameters
Named placeholders go in the path; the rest in the query string.
site_idstringPath · required- The site's id.1 to 100 characters
Response
200 with JSON on success (schema on the right). Errors use the standard envelope.
curl -X GET 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/preview-links' \
-H "Authorization: Bearer $WEBSITEBUDDY_API_KEY"{
"site_id": "SITE_ID"
}{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"link": {
"type": "string",
"description": "The address to send (on your own address when it's connected). No login needed."
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Who it's for — only you see it."
},
"status": {
"type": "string",
"enum": [
"active",
"expired",
"off"
],
"description": "active = works now; expired = ran out; off = switched off (or the site was archived)."
},
"expires_at": {
"type": "string"
},
"switched_off_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"last_opened_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"open_count": {
"type": "number",
"description": "Visits (moving between pages within a minute is one)."
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"site_id",
"link",
"label",
"status",
"expires_at",
"switched_off_at",
"last_opened_at",
"open_count",
"created_at"
],
"additionalProperties": false
}
}
},
"required": [
"data"
],
"additionalProperties": false
}