Schemas
Meta
{
"type": "object",
"properties": {
"request_id": {
"type": "string"
}
},
"required": [
"request_id"
],
"additionalProperties": false
}PageMeta
{
"type": "object",
"properties": {
"request_id": {
"type": "string"
},
"next_cursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"request_id",
"next_cursor"
],
"additionalProperties": false
}Error
{
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"field": {
"type": "string",
"description": "Name of the invalid request field (invalid_arguments)"
},
"existing_id": {
"type": "string",
"description": "duplicate_entry only: id of the existing entry of the same customer"
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
}ErrorResponse
{
"type": "object",
"properties": {
"error": {
"$ref": "#/components/schemas/Error"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"error",
"meta"
],
"additionalProperties": false
}Site
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"domain": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"wordpress",
"ai_launch"
]
},
"status": {
"type": "string"
},
"capabilities": {
"type": "array",
"items": {
"type": "string"
}
},
"data_as_of": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"role": {
"type": "string",
"enum": [
"live",
"staging"
],
"description": "'staging' if the site is the staging copy of a live site of the same hosting package. The only rule: the host is exactly staging.<main domain>, same package, with exactly one live site (root installation of the main domain) and its own folder. Everything not recognized (and every AI Launch site) is 'live'."
},
"staging_of": {
"type": [
"string",
"null"
],
"description": "Only for role 'staging': the id of its live site, if that site belongs to the token's targets; otherwise null. Always null for role 'live'."
},
"client": {
"description": "Customer of the site. Only present when the token has clients:read, the issuing user is linked and the agency API is enabled; null if the site is not assigned to a customer.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"details": {
"$ref": "#/components/schemas/SiteDetails",
"description": "Only in GET /sites/{site_id}, never in the list GET /sites"
}
},
"required": [
"id",
"domain",
"type",
"status",
"capabilities",
"data_as_of",
"role",
"staging_of"
],
"additionalProperties": false
}Backup
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"filename": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"size_bytes": {
"type": [
"integer",
"null"
]
}
},
"required": [
"id",
"filename"
],
"additionalProperties": false
}Operation
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"kind": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"succeeded",
"failed",
"unknown"
]
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"result": {
"type": [
"object",
"null"
],
"description": "Result of an operation, present on succeeded and, where documented, also on failed and unknown operations. backups:delete: {filename, remaining_backups, deletion_verified}. updates:run: {safety_backup, items:[{type, slug, from, to, status}]}. staging:delete: {staging_host, deleted, subdomain_removed}. backups:restore: {safety_backup, scope, restore_task (full) | health_check (partial)}. updates:core: {safety_backup, from, to}. plugins:manage: {slug, enabled, changed}. staging:create: {staging_host, ssl, staging_site_id}. staging:push: {safety_backup:{filename, created_at}, health_check, scope, delete_missing_files}."
},
"error_code": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"site_id",
"kind",
"status",
"created_at",
"updated_at"
],
"additionalProperties": false
}Deployment
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"published_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
},
"required": [
"id",
"site_id",
"status",
"created_at"
],
"additionalProperties": false
}SiteResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Site"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}SiteListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Site"
}
},
"meta": {
"$ref": "#/components/schemas/PageMeta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}BackupListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Backup"
}
},
"meta": {
"$ref": "#/components/schemas/PageMeta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}OperationResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Operation"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}DeploymentResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Deployment"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}DeploymentListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Deployment"
}
},
"meta": {
"$ref": "#/components/schemas/PageMeta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}CachePurgeRequest
{
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": [
"page",
"object",
"all"
]
}
},
"required": [
"scope"
],
"additionalProperties": false
}DeploymentFileRequest
{
"type": "object",
"properties": {
"path": {
"type": "string"
},
"content": {
"type": "string"
},
"encoding": {
"type": "string",
"enum": [
"utf8",
"base64"
],
"default": "utf8"
}
},
"required": [
"path",
"content"
],
"additionalProperties": false
}DeploymentFileResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"size_bytes": {
"type": "integer",
"minimum": 0
}
},
"required": [
"path",
"size_bytes"
],
"additionalProperties": false
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}DeploymentPreviewResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"issues": {
"type": "array",
"items": {
"type": "string"
}
},
"preview_url": {
"type": [
"string",
"null"
],
"format": "uri"
}
},
"required": [
"valid",
"issues"
],
"additionalProperties": false
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}OperationListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Operation"
}
},
"meta": {
"$ref": "#/components/schemas/PageMeta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}TokenInfo
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"scope": {
"$ref": "#/components/schemas/TokenScope"
},
"targets": {
"type": "array",
"items": {
"type": "string"
},
"description": "Site IDs"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "null = unlimited"
},
"last_used_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
},
"required": [
"id",
"name",
"permissions",
"scope",
"targets",
"created_at",
"expires_at",
"last_used_at"
],
"additionalProperties": false
}TokenInfoResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/TokenInfo"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}Status
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ok",
"draining"
]
},
"api": {
"type": "string",
"enum": [
"v1"
]
}
},
"required": [
"status",
"api"
],
"additionalProperties": false
}StatusResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Status"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}SiteDetails
{
"type": "object",
"description": "Read-only extras. The WordPress version comes from the hosting inventory read for the request; all other values come from the daily data (reports, uptime, package usage) without any backend call. Values are null when the source has no usable data.",
"properties": {
"wordpress_version": {
"type": [
"string",
"null"
],
"description": "Installed WordPress version; null if unknown and always null for AI Launch sites"
},
"php_version": {
"type": [
"string",
"null"
],
"description": "PHP version of the site from the daily report; null if unknown, static, or the site has no matching report entry"
},
"core_update_available": {
"type": [
"boolean",
"null"
],
"description": "WordPress core update open (daily report)"
},
"plugins_to_update": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Number of plugins with an open update (daily report)"
},
"report_as_of": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Time of the daily report the report values come from"
},
"report_stale": {
"type": [
"boolean",
"null"
],
"description": "true when the report is older than 30 hours"
},
"ssl": {
"type": [
"object",
"null"
],
"description": "Certificate expiry of the package (not of this site alone), from the latest daily report of the package's main domain only; other hosts of the package are not considered",
"properties": {
"expires_at": {
"type": [
"string",
"null"
],
"format": "date"
},
"as_of": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Report time"
},
"scope": {
"type": "string",
"enum": [
"package"
]
}
},
"required": [
"expires_at",
"as_of",
"scope"
],
"additionalProperties": false
},
"disk": {
"type": [
"object",
"null"
],
"description": "Disk use of the package; limit_mb and percent are null for unlimited",
"properties": {
"used_mb": {
"type": "integer"
},
"limit_mb": {
"type": [
"integer",
"null"
]
},
"percent": {
"type": [
"integer",
"null"
]
},
"as_of": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Time of the last usage update"
},
"scope": {
"type": "string",
"enum": [
"package"
]
}
},
"required": [
"used_mb",
"limit_mb",
"percent",
"as_of",
"scope"
],
"additionalProperties": false
},
"uptime": {
"type": [
"object",
"null"
],
"description": "Uptime monitor state of this site; null without an active target",
"properties": {
"state": {
"type": "string",
"enum": [
"up",
"suspect",
"down"
]
},
"since": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "State since"
},
"last_check": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Last check"
}
},
"required": [
"state",
"since",
"last_check"
],
"additionalProperties": false
},
"last_backup_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Time of the last backup seen by the daily report"
},
"speed": {
"type": [
"object",
"null"
],
"description": "Speed measurement from the daily report",
"properties": {
"score": {
"type": "integer"
},
"ttfb_ms": {
"type": [
"integer",
"null"
]
},
"as_of": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Report time"
}
},
"required": [
"score",
"ttfb_ms",
"as_of"
],
"additionalProperties": false
}
},
"required": [
"wordpress_version",
"php_version",
"core_update_available",
"plugins_to_update",
"report_as_of",
"report_stale",
"ssl",
"disk",
"uptime",
"last_backup_at",
"speed"
],
"additionalProperties": false
}UpdateItem
{
"type": "object",
"description": "A plugin or theme with an open update. name and versions come from third-party code and are sanitized.",
"properties": {
"slug": {
"type": "string",
"description": "Slug as used for the update request"
},
"name": {
"type": "string"
},
"current": {
"type": "string"
},
"available": {
"type": "string"
}
},
"required": [
"slug",
"name",
"current",
"available"
],
"additionalProperties": false
}Updates
{
"type": "object",
"properties": {
"core": {
"type": "object",
"properties": {
"current": {
"type": [
"string",
"null"
]
},
"available": {
"type": [
"string",
"null"
]
}
},
"required": [
"current",
"available"
],
"additionalProperties": false
},
"plugins": {
"type": "array",
"maxItems": 200,
"items": {
"$ref": "#/components/schemas/UpdateItem"
}
},
"themes": {
"type": "array",
"maxItems": 200,
"items": {
"$ref": "#/components/schemas/UpdateItem"
}
},
"checked_at": {
"type": "string",
"format": "date-time",
"description": "When the state was read (UTC)"
}
},
"required": [
"core",
"plugins",
"themes",
"checked_at"
],
"additionalProperties": false
}UpdatesResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Updates"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}UpdatesRunRequest
{
"type": "object",
"properties": {
"items": {
"type": "array",
"minItems": 1,
"maxItems": 5,
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"plugin",
"theme"
]
},
"slug": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,61}$"
}
},
"required": [
"type",
"slug"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
}BackupRestoreRequest
{
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": [
"full",
"database",
"files",
"folder"
]
},
"folder": {
"type": "string",
"pattern": "^wp-content/(uploads|(plugins|themes)/[a-z0-9-]{1,100})$",
"description": "Only with scope folder"
},
"confirm_host": {
"type": "string",
"description": "The exact host of the site that is restored (case-insensitive)"
},
"confirm_data_loss": {
"type": "boolean",
"default": false,
"description": "Must be true for scope full or database when WooCommerce is active on the site"
}
},
"required": [
"scope",
"confirm_host"
],
"additionalProperties": false
}CoreUpdateRequest
{
"type": "object",
"properties": {
"expected_version": {
"type": "string",
"pattern": "^\\d+(\\.\\d+){1,3}(-[A-Za-z0-9.]{1,20})?$",
"description": "Refuse (409 version_changed) when another core version is offered"
}
},
"additionalProperties": false
}PluginStateRequest
{
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": [
"enabled"
],
"additionalProperties": false
}EmptyRequest
{
"type": "object",
"additionalProperties": false
}StagingPushRequest
{
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": [
"all",
"files",
"db",
"selected"
]
},
"tables": {
"type": "array",
"minItems": 1,
"maxItems": 1000,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[A-Za-z0-9_]{1,64}$"
},
"description": "Only with scope selected"
},
"delete_missing_files": {
"type": "boolean",
"description": "Required. True only with scope all or files"
},
"confirm_host": {
"type": "string",
"description": "Required. The exact host of the live site (case-insensitive)"
},
"confirm_data_loss": {
"type": "boolean",
"default": false,
"description": "Must be true for scope all or db when WooCommerce is active on the live site"
},
"dry_run": {
"type": "boolean",
"default": false
}
},
"required": [
"scope"
],
"additionalProperties": false
}StagingPushDryRun
{
"type": "object",
"additionalProperties": false,
"required": [
"dry_run",
"scope",
"delete_missing_files",
"pair",
"woocommerce_active",
"tables",
"missing_tables",
"backup_quota",
"storage_ok",
"busy",
"daily_limit_reached",
"staging_newer_than_live"
],
"properties": {
"dry_run": {
"type": "boolean",
"enum": [
true
]
},
"scope": {
"type": "string",
"enum": [
"all",
"files",
"db",
"selected"
]
},
"delete_missing_files": {
"type": "boolean"
},
"pair": {
"type": "object",
"additionalProperties": false,
"required": [
"staging_host",
"live_host"
],
"properties": {
"staging_host": {
"type": "string"
},
"live_host": {
"type": "string"
}
}
},
"woocommerce_active": {
"type": [
"boolean",
"null"
]
},
"tables": {
"type": [
"array",
"null"
],
"maxItems": 1000,
"items": {
"type": "string"
}
},
"missing_tables": {
"type": "array",
"items": {
"type": "string"
}
},
"backup_quota": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"properties": {
"used": {
"type": "integer"
},
"limit": {
"type": "integer"
}
}
},
"storage_ok": {
"type": [
"boolean",
"null"
]
},
"busy": {
"type": [
"string",
"null"
],
"enum": [
"operation_running",
"cockpit_busy",
null
]
},
"daily_limit_reached": {
"type": "boolean"
},
"staging_newer_than_live": {
"type": "null",
"description": "Not determined; always null."
}
}
}StagingPushDryRunResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/StagingPushDryRun"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}TokenScope
{
"type": "object",
"description": "What the token's site list is derived from. 'sites' = fixed site ids, 'client' = all sites of one customer (re-evaluated), 'account' = all sites of the account (re-evaluated).",
"properties": {
"type": {
"type": "string",
"enum": [
"sites",
"client",
"account"
]
},
"client_id": {
"type": "string",
"description": "Only for type 'client': the customer id",
"pattern": "^[1-9][0-9]{0,9}$"
}
},
"required": [
"type"
],
"additionalProperties": false
}Client
{
"type": "object",
"description": "A customer of the agency account",
"properties": {
"id": {
"type": "string",
"description": "Customer id (decimal string)"
},
"name": {
"type": "string"
},
"contact_name": {
"type": "string",
"description": "Contact person; empty string if none"
},
"email": {
"type": "string",
"description": "Empty string if none"
},
"note": {
"type": "string"
},
"maintenance_contract": {
"type": "boolean"
},
"own_sites": {
"type": "boolean",
"description": "true for the agency's own sites (no customer)"
},
"send_report": {
"type": "boolean"
},
"quota_minutes": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Monthly maintenance quota in minutes; null = none"
},
"price_month_cent": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Monthly price in cents; null = none"
},
"site_count": {
"type": "integer",
"minimum": 0,
"description": "Sites of this customer within the token's scope"
}
},
"required": [
"id",
"name",
"contact_name",
"email",
"note",
"maintenance_contract",
"own_sites",
"send_report",
"quota_minutes",
"price_month_cent",
"site_count"
],
"additionalProperties": false
}ClientDetail
{
"type": "object",
"description": "A customer of the agency account",
"properties": {
"id": {
"type": "string",
"description": "Customer id (decimal string)"
},
"name": {
"type": "string"
},
"contact_name": {
"type": "string",
"description": "Contact person; empty string if none"
},
"email": {
"type": "string",
"description": "Empty string if none"
},
"note": {
"type": "string"
},
"maintenance_contract": {
"type": "boolean"
},
"own_sites": {
"type": "boolean",
"description": "true for the agency's own sites (no customer)"
},
"send_report": {
"type": "boolean"
},
"quota_minutes": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Monthly maintenance quota in minutes; null = none"
},
"price_month_cent": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Monthly price in cents; null = none"
},
"site_count": {
"type": "integer",
"minimum": 0,
"description": "Sites of this customer within the token's scope"
},
"sites": {
"type": "array",
"description": "Sites of this customer within the token's scope",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": [
"string",
"null"
],
"description": "null if the site has no public id yet"
},
"domain": {
"type": "string"
},
"site_url": {
"type": "string"
}
},
"required": [
"site_id",
"domain",
"site_url"
],
"additionalProperties": false
}
},
"work_minutes_month": {
"type": "integer",
"minimum": 0,
"description": "Worked minutes in the current month (Europe/Berlin)"
}
},
"required": [
"id",
"name",
"contact_name",
"email",
"note",
"maintenance_contract",
"own_sites",
"send_report",
"quota_minutes",
"price_month_cent",
"site_count",
"sites",
"work_minutes_month"
],
"additionalProperties": false
}ClientListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Client"
}
},
"meta": {
"$ref": "#/components/schemas/PageMeta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}ClientResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ClientDetail"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}PluginSummary
{
"type": "object",
"description": "Fleet view of one plugin across the token's sites",
"properties": {
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"site_count": {
"type": "integer",
"minimum": 0
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"version": {
"type": "string"
},
"site_count": {
"type": "integer",
"minimum": 0
}
},
"required": [
"version",
"site_count"
],
"additionalProperties": false
}
},
"latest": {
"type": [
"string",
"null"
],
"description": "Newest known version; null if unknown"
},
"state": {
"type": "string",
"enum": [
"vulnerable",
"update",
"ok",
"inactive"
],
"description": "Worst state across the sites: vulnerable > update > ok; inactive when it is active nowhere"
},
"sites_with_update": {
"type": "integer",
"minimum": 0
},
"vulnerability": {
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"risk": {
"type": "string",
"description": "Risk class as reported by the vulnerability source, e.g. critical, high, medium, low, unknown"
},
"fixed_in": {
"type": [
"string",
"null"
],
"description": "Version that fixes the gap; null if unknown"
},
"site_count": {
"type": "integer",
"minimum": 0,
"description": "Only in the fleet list: number of affected sites"
}
},
"required": [
"id",
"title",
"risk",
"fixed_in"
],
"additionalProperties": false,
"description": "Open vulnerability"
},
{
"type": "null"
}
]
},
"license": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"premium",
"free"
],
"description": "Plugin class: premium (needs a licence) or free. Not the agency's licence type from GET /licenses."
},
"active": {
"type": "integer",
"minimum": 0,
"description": "Sites with an active licence"
},
"missing": {
"type": "integer",
"minimum": 0
},
"unknown": {
"type": "integer",
"minimum": 0
},
"expired": {
"type": "integer",
"minimum": 0
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date",
"description": "Earliest known expiry; null if none"
}
},
"required": [
"kind",
"active",
"missing",
"unknown",
"expired",
"expires_at"
],
"additionalProperties": false
}
},
"required": [
"slug",
"name",
"site_count",
"versions",
"latest",
"state",
"sites_with_update",
"vulnerability",
"license"
],
"additionalProperties": false
}PluginDetail
{
"type": "object",
"description": "Fleet view of one plugin across the token's sites",
"properties": {
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"site_count": {
"type": "integer",
"minimum": 0
},
"versions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"version": {
"type": "string"
},
"site_count": {
"type": "integer",
"minimum": 0
}
},
"required": [
"version",
"site_count"
],
"additionalProperties": false
}
},
"latest": {
"type": [
"string",
"null"
],
"description": "Newest known version; null if unknown"
},
"state": {
"type": "string",
"enum": [
"vulnerable",
"update",
"ok",
"inactive"
],
"description": "Worst state across the sites: vulnerable > update > ok; inactive when it is active nowhere"
},
"sites_with_update": {
"type": "integer",
"minimum": 0
},
"vulnerability": {
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"risk": {
"type": "string",
"description": "Risk class as reported by the vulnerability source, e.g. critical, high, medium, low, unknown"
},
"fixed_in": {
"type": [
"string",
"null"
],
"description": "Version that fixes the gap; null if unknown"
},
"site_count": {
"type": "integer",
"minimum": 0,
"description": "Only in the fleet list: number of affected sites"
}
},
"required": [
"id",
"title",
"risk",
"fixed_in"
],
"additionalProperties": false,
"description": "Open vulnerability"
},
{
"type": "null"
}
]
},
"license": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"premium",
"free"
],
"description": "Plugin class: premium (needs a licence) or free. Not the agency's licence type from GET /licenses."
},
"active": {
"type": "integer",
"minimum": 0,
"description": "Sites with an active licence"
},
"missing": {
"type": "integer",
"minimum": 0
},
"unknown": {
"type": "integer",
"minimum": 0
},
"expired": {
"type": "integer",
"minimum": 0
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date",
"description": "Earliest known expiry; null if none"
}
},
"required": [
"kind",
"active",
"missing",
"unknown",
"expired",
"expires_at"
],
"additionalProperties": false
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": [
"string",
"null"
],
"description": "null for a Cockpit site without public API id"
},
"domain": {
"type": "string"
},
"client_id": {
"type": [
"string",
"null"
],
"description": "Only present with clients:read; null = no customer"
},
"version": {
"type": "string"
},
"active": {
"type": "boolean"
},
"update_version": {
"type": [
"string",
"null"
]
},
"license_state": {
"type": "string",
"enum": [
"active",
"missing",
"unknown",
"free"
]
},
"license_reason": {
"type": [
"string",
"null"
],
"enum": [
"outdated_without_update",
"expired",
null
],
"description": "Why the licence is flagged, if so"
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date"
},
"auto_update": {
"type": "boolean"
},
"as_of": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "When the site's plugins were last read"
}
},
"required": [
"site_id",
"domain",
"version",
"active",
"update_version",
"license_state",
"license_reason",
"expires_at",
"auto_update",
"as_of"
],
"additionalProperties": false
}
}
},
"required": [
"slug",
"name",
"site_count",
"versions",
"latest",
"state",
"sites_with_update",
"vulnerability",
"license",
"sites"
],
"additionalProperties": false
}PluginListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PluginSummary"
}
},
"meta": {
"type": "object",
"properties": {
"request_id": {
"type": "string"
},
"next_cursor": {
"type": [
"string",
"null"
]
},
"counts": {
"type": "object",
"description": "Totals over all plugins in scope, independent of the state/premium filter and paging",
"properties": {
"all": {
"type": "integer"
},
"vulnerable": {
"type": "integer"
},
"update": {
"type": "integer"
},
"premium": {
"type": "integer"
},
"inactive": {
"type": "integer"
}
},
"required": [
"all",
"vulnerable",
"update",
"premium",
"inactive"
],
"additionalProperties": false
},
"as_of": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Oldest read time among the sites; null if none was read"
},
"unreadable_sites": {
"type": "array",
"description": "Sites whose last read failed",
"items": {
"type": "object",
"properties": {
"site_id": {
"type": [
"string",
"null"
]
},
"domain": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"site_id",
"domain",
"reason"
],
"additionalProperties": false
}
}
},
"required": [
"request_id",
"next_cursor",
"counts",
"as_of",
"unreadable_sites"
],
"additionalProperties": false
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}PluginResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/PluginDetail"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}SitePlugins
{
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"as_of": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Read time; null if never read or not in the inventory"
},
"reason": {
"type": [
"string",
"null"
],
"description": "null on success. 'never_read' (no data yet), 'not_in_inventory' (site unknown to the Cockpit), or the reason the last read failed (e.g. 'plesk')"
},
"plugins": {
"type": "array",
"items": {
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"active": {
"type": "boolean"
},
"update_version": {
"type": [
"string",
"null"
]
},
"vulnerability": {
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"risk": {
"type": "string",
"description": "Risk class as reported by the vulnerability source, e.g. critical, high, medium, low, unknown"
},
"fixed_in": {
"type": [
"string",
"null"
],
"description": "Version that fixes the gap; null if unknown"
}
},
"required": [
"id",
"title",
"risk",
"fixed_in"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"license_state": {
"type": "string",
"enum": [
"active",
"missing",
"unknown",
"free"
]
},
"license_reason": {
"type": [
"string",
"null"
],
"enum": [
"outdated_without_update",
"expired",
null
],
"description": "Why the licence is flagged, if so"
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date"
}
},
"required": [
"slug",
"name",
"version",
"active",
"update_version",
"vulnerability",
"license_state",
"license_reason",
"expires_at"
],
"additionalProperties": false
}
}
},
"required": [
"site_id",
"as_of",
"reason",
"plugins"
],
"additionalProperties": false
}SitePluginsResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/SitePlugins"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}License
{
"type": "object",
"description": "Licence summary per plugin; never contains licence keys",
"properties": {
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"site_count": {
"type": "integer",
"minimum": 0
},
"active": {
"type": "integer",
"minimum": 0
},
"missing": {
"type": "integer",
"minimum": 0
},
"unknown": {
"type": "integer",
"minimum": 0
},
"paid_by": {
"type": "string",
"enum": [
"client",
"agency"
]
},
"kind": {
"type": "string",
"description": "The agency's own free-text licence type (e.g. 'Annual', 'Lifetime'), as entered in the panel. Not the premium/free class of GET /plugins. Omitted if not set."
},
"expires_at": {
"type": "string",
"format": "date",
"description": "Omitted if no expiry is known"
},
"expires_source": {
"type": "string",
"enum": [
"manual",
"detected"
],
"description": "manual = entered by the agency, detected = read from the plugin. Present with expires_at."
},
"days_left": {
"type": "integer",
"description": "Days until expiry (negative = expired). Present only when known."
}
},
"required": [
"slug",
"name",
"site_count",
"active",
"missing",
"unknown",
"paid_by"
],
"additionalProperties": false
}LicenseListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/License"
}
},
"meta": {
"$ref": "#/components/schemas/PageMeta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}ClientCreateRequest
{
"type": "object",
"description": "Fields of a new customer. own_sites cannot be set.",
"properties": {
"name": {
"type": "string",
"maxLength": 60,
"minLength": 1,
"description": "Unique per account (spelling-insensitive): 409 name_taken"
},
"contact_name": {
"type": "string",
"maxLength": 80
},
"email": {
"type": "string",
"maxLength": 255,
"description": "Valid address or empty string"
},
"note": {
"type": "string",
"maxLength": 280
},
"maintenance_contract": {
"type": "boolean"
},
"send_report": {
"type": "boolean"
},
"quota_minutes": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 65535
},
"price_month_cent": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 100000000
}
},
"required": [
"name"
],
"additionalProperties": false
}ClientUpdateRequest
{
"type": "object",
"description": "Fields to change; at least one. own_sites cannot be changed.",
"properties": {
"name": {
"type": "string",
"maxLength": 60,
"minLength": 1,
"description": "Unique per account (spelling-insensitive): 409 name_taken"
},
"contact_name": {
"type": "string",
"maxLength": 80
},
"email": {
"type": "string",
"maxLength": 255,
"description": "Valid address or empty string"
},
"note": {
"type": "string",
"maxLength": 280
},
"maintenance_contract": {
"type": "boolean"
},
"send_report": {
"type": "boolean"
},
"quota_minutes": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 65535
},
"price_month_cent": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 100000000
}
},
"additionalProperties": false,
"minProperties": 1
}ClientDeleteRequest
{
"type": "object",
"properties": {
"confirm": {
"type": "string",
"description": "The customer name exactly as returned by GET/POST /clients (case and whitespace sensitive; Unicode is compared in NFC). confirm must equal name as returned by GET/POST."
}
},
"additionalProperties": false,
"description": "Body of the delete. confirm must equal the exact customer name; a missing, non-string or differing confirm answers 422 confirmation_mismatch (not 400)."
}ClientDeleted
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
},
"sites_unassigned": {
"type": "integer",
"minimum": 0
},
"work_entries_deleted": {
"type": "integer",
"minimum": 0
},
"report_rows_deleted": {
"type": "integer",
"minimum": 0
},
"share_links_deleted": {
"type": "integer",
"minimum": 0
}
},
"required": [
"id",
"deleted",
"sites_unassigned",
"work_entries_deleted",
"report_rows_deleted",
"share_links_deleted"
],
"additionalProperties": false
}ClientDeletedResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ClientDeleted"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}ClientWriteResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Client"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}SiteClientRequest
{
"type": "object",
"properties": {
"client_id": {
"type": [
"string",
"null"
],
"pattern": "^[1-9][0-9]{0,9}$",
"description": "Customer id from GET /clients, or null to remove the assignment"
}
},
"required": [
"client_id"
],
"additionalProperties": false
}SiteClientResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"site_id": {
"type": "string"
},
"client": {
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"changed": {
"type": "boolean"
}
},
"required": [
"site_id",
"client",
"changed"
],
"additionalProperties": false
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WorkEntry
{
"type": "object",
"description": "A work log entry",
"properties": {
"id": {
"type": "string"
},
"date": {
"type": "string",
"format": "date"
},
"minutes": {
"type": "integer",
"minimum": 5,
"maximum": 1440
},
"text": {
"type": "string",
"maxLength": 280
},
"site_id": {
"type": [
"string",
"null"
],
"description": "API site id; null when the site has no API id or is outside the token's scope"
},
"site_url": {
"type": [
"string",
"null"
]
},
"external_id": {
"type": [
"string",
"null"
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "UTC"
}
},
"required": [
"id",
"date",
"minutes",
"text",
"site_id",
"site_url",
"external_id",
"created_at"
],
"additionalProperties": false
}WorkEntryRequest
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD, Europe/Berlin day; not in the future, not older than two years"
},
"minutes": {
"type": "integer",
"minimum": 5,
"maximum": 1440
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 280
},
"site_id": {
"type": "string",
"description": "Site of the token's scope"
},
"external_id": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,100}$",
"description": "Caller's own id, unique per account"
}
},
"required": [
"date",
"minutes",
"text"
],
"additionalProperties": false
}WorkEntryResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/WorkEntry"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WorkEntryListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkEntry"
}
},
"meta": {
"type": "object",
"properties": {
"request_id": {
"type": "string"
},
"next_cursor": {
"type": [
"string",
"null"
]
},
"month": {
"type": "string",
"pattern": "^20[0-9]{2}-(0[1-9]|1[0-2])$"
},
"total_minutes": {
"type": "integer",
"minimum": 0,
"description": "Sum of the whole month"
},
"quota_minutes": {
"type": [
"integer",
"null"
],
"minimum": 0
}
},
"required": [
"request_id",
"next_cursor",
"month",
"total_minutes",
"quota_minutes"
],
"additionalProperties": false
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}LicenseWriteRequest
{
"type": "object",
"properties": {
"paid_by": {
"type": "string",
"enum": [
"agency",
"client"
],
"description": "Who pays for the licence"
},
"kind": {
"type": [
"string",
"null"
],
"maxLength": 80,
"description": "Free-text licence type, e.g. Annual or Lifetime; null or empty = not set"
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date",
"description": "Expiry date Y-m-d between 2000-01-01 and 2099-12-31; null or empty = not set"
}
},
"required": [
"paid_by"
],
"additionalProperties": false
}LicenseResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/License"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}ReportListItem
{
"type": "object",
"description": "One report period",
"properties": {
"period": {
"type": "string",
"description": "YYYY-MM or YYYYQn"
},
"kind": {
"type": "string",
"enum": [
"month",
"quarter"
]
},
"status": {
"type": "string",
"enum": [
"open",
"approval_sent",
"sent",
"failed",
"skipped"
]
},
"sent_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "UTC; only for status sent"
},
"scheduled_send": {
"type": [
"string",
"null"
],
"format": "date",
"description": "Day of the automatic send (Europe/Berlin)"
},
"scheduled_approval": {
"type": [
"string",
"null"
],
"format": "date",
"description": "Day of the approval mail (Europe/Berlin)"
}
},
"required": [
"period",
"kind",
"status",
"sent_at",
"scheduled_send",
"scheduled_approval"
],
"additionalProperties": false
}ReportListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReportListItem"
}
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}ReportDocument
{
"type": "object",
"description": "Maintenance report as the customer sees it. Absent sections have no key.",
"properties": {
"language": {
"type": "string",
"enum": [
"de",
"en"
],
"description": "Language of the report as the customer received it (the agency's language); keys and enums stay English, dates are always YYYY-MM-DD"
},
"client": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"period": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"month",
"quarter"
]
},
"from": {
"type": "string",
"format": "date"
},
"to": {
"type": "string",
"format": "date"
},
"days": {
"type": "integer",
"minimum": 1
},
"headline": {
"type": "string",
"enum": [
"all_good",
"attention"
]
},
"note": {
"type": [
"string",
"null"
],
"description": "Remark of the agency; null when empty"
},
"kpis": {
"type": "object",
"properties": {
"availability_percent": {
"type": [
"number",
"null"
],
"description": "One decimal"
},
"updates": {
"type": "integer"
},
"backups": {
"type": "integer"
},
"speed_score": {
"type": "integer"
},
"speed_score_delta": {
"type": "integer"
}
},
"required": [
"availability_percent"
],
"additionalProperties": false,
"description": "updates and backups can be 0 even when the panel shows no card for them"
},
"summary": {
"type": "object",
"properties": {
"sites": {
"type": "integer"
},
"open": {
"type": "integer"
}
},
"required": [
"sites",
"open"
],
"additionalProperties": false
},
"work": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"date": {
"type": "string",
"format": "date"
},
"minutes": {
"type": "integer"
},
"text": {
"type": "string"
},
"site_url": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"date",
"minutes",
"text",
"site_url"
],
"additionalProperties": false
}
},
"minutes": {
"type": "integer",
"description": "Sum of the visible entries"
},
"quota_minutes": {
"type": [
"integer",
"null"
],
"description": "Monthly quota; null when none (0 counts as none)"
}
},
"required": [
"entries",
"minutes",
"quota_minutes"
],
"additionalProperties": false
},
"updates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"date": {
"type": "string",
"format": "date"
},
"text": {
"type": "string"
},
"security": {
"type": "boolean"
},
"site": {
"type": [
"string",
"null"
],
"description": "Address when the update ran on exactly one site"
},
"site_count": {
"type": "integer"
}
},
"required": [
"id",
"date",
"text",
"security",
"site",
"site_count"
],
"additionalProperties": false
}
},
"sites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"site_url": {
"type": "string"
},
"address": {
"type": "string"
},
"availability": {
"type": "object",
"properties": {
"level": {
"type": "string",
"enum": [
"ok",
"warn",
"bad",
"none"
],
"description": "none = no data"
},
"percent": {
"type": [
"number",
"null"
]
}
},
"required": [
"level",
"percent"
],
"additionalProperties": false
},
"backup": {
"type": "object",
"properties": {
"level": {
"type": "string",
"enum": [
"ok",
"warn",
"bad",
"none"
],
"description": "none = no data"
}
},
"required": [
"level"
],
"additionalProperties": false
},
"open": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "updates, security, backup, availability (other values only as [a-z_]+, else other)"
},
"level": {
"type": "string",
"enum": [
"warn",
"bad"
]
},
"code": {
"type": "string",
"description": "updates_core, updates_plugins, security_vulnerabilities, security_malware, backup_age_days, backup_failed, backup_none, availability_below_target, availability_disrupted, availability_paused; unknown values as [a-z_]+ or other"
},
"value": {
"type": [
"number",
"null"
]
}
},
"required": [
"kind",
"level",
"code",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"site_url",
"address",
"availability",
"backup",
"open"
],
"additionalProperties": false
}
},
"background": {
"type": "object",
"description": "Checks and scans in the background, like the panel rows: checks and outages only with checks, scans and backups only above zero, php_version and ssl_valid_until only when known",
"properties": {
"checks": {
"type": "integer"
},
"outages": {
"type": "integer"
},
"scans": {
"type": "integer"
},
"backups": {
"type": "integer"
},
"php_version": {
"type": [
"string",
"null"
]
},
"ssl_valid_until": {
"type": "string",
"format": "date"
}
},
"additionalProperties": false
},
"speed": {
"type": "object",
"properties": {
"score": {
"type": "integer"
},
"previous_month": {
"type": "integer"
},
"ttfb_ms": {
"type": "integer"
},
"history": {
"type": "array",
"description": "Oldest first, at most 6 months, only with at least 2 months",
"items": {
"type": "object",
"properties": {
"month": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}$"
},
"score": {
"type": "integer"
}
},
"required": [
"month",
"score"
],
"additionalProperties": false
}
}
},
"required": [
"score"
],
"additionalProperties": false
}
},
"required": [
"language",
"client",
"period",
"kind",
"from",
"to",
"days",
"headline",
"note",
"kpis",
"summary",
"sites"
],
"additionalProperties": false
}ReportResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ReportDocument"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}ShareLink
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[1-9][0-9]*$",
"description": "Link id"
},
"url": {
"type": "string",
"format": "uri",
"description": "Public report URL (secret, shown once)"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "UTC, 90 days after creation"
}
},
"required": [
"id",
"url",
"expires_at"
],
"additionalProperties": false
}ShareLinkResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ShareLink"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}SendReportRequest
{
"type": "object",
"properties": {
"resend": {
"type": "boolean",
"default": false,
"description": "true = send a report again that was already sent"
}
},
"additionalProperties": false
}SendReport
{
"type": "object",
"properties": {
"period": {
"type": "string",
"example": "2026-09"
},
"sent_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Time of this send (UTC); null if it could not be read afterwards"
},
"email": {
"type": [
"string",
"null"
],
"format": "email",
"description": "The customer's current report address (read after sending); null if it could not be read"
}
},
"required": [
"period",
"sent_at",
"email"
],
"additionalProperties": false
}SendReportResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/SendReport"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WebhookEventType
{
"type": "string",
"enum": [
"operation.succeeded",
"operation.failed",
"site.down",
"site.up",
"plugin.vulnerability_found",
"license.expiring",
"report.sent",
"report.failed"
],
"description": "Event types a webhook can subscribe to. Agency types (plugin.*, license.*, report.*) need the agency API; every type needs the read right of its family: operation.* the right of the operation, site.* sites:read, plugin.* and license.* plugins:read, report.* reports:read. Events of operation.* are only sent for jobs of the creating token. The additional type ping exists only as the answer to POST /webhooks/{webhook_id}/test and cannot be subscribed."
}Webhook
{
"type": "object",
"description": "A webhook. Never contains the secret.",
"properties": {
"id": {
"type": "string",
"pattern": "^wh_[a-z0-9]{24}$"
},
"url": {
"type": "string",
"maxLength": 2048,
"description": "Target URL (https, port 443 or 1024-65535, DNS name, no turbopress.de host)"
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookEventType"
},
"minItems": 1,
"maxItems": 8,
"uniqueItems": true
},
"active": {
"type": "boolean"
},
"disabled_reason": {
"type": [
"string",
"null"
],
"enum": [
"failing",
"token_revoked",
null
],
"description": "null while active or after the owner switched it off. failing = switched off by the platform (3 days without success and at least 20 dead deliveries; the owner gets an email; PATCH {\"active\": true} switches it on again). token_revoked = the creating token was revoked, expired or lost its issuer (cannot be re-enabled: 409 webhook_token_revoked; create a new webhook)."
},
"failure_count": {
"type": "integer",
"minimum": 0,
"description": "Failed delivery attempts since the last success or since enabling"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"last_success_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"last_failure_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
},
"required": [
"id",
"url",
"events",
"active",
"disabled_reason",
"failure_count",
"created_at",
"last_success_at",
"last_failure_at"
],
"additionalProperties": false
}WebhookCreateRequest
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"description": "Target URL (https, port 443 or 1024-65535, DNS name, no turbopress.de host)"
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookEventType"
},
"minItems": 1,
"maxItems": 8,
"uniqueItems": true
}
},
"required": [
"url",
"events"
],
"additionalProperties": false
}WebhookCreateResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^wh_[a-z0-9]{24}$"
},
"url": {
"type": "string",
"maxLength": 2048,
"description": "Target URL (https, port 443 or 1024-65535, DNS name, no turbopress.de host)"
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookEventType"
},
"minItems": 1,
"maxItems": 8,
"uniqueItems": true
},
"active": {
"type": "boolean"
},
"disabled_reason": {
"type": [
"string",
"null"
],
"enum": [
"failing",
"token_revoked",
null
],
"description": "null while active or after the owner switched it off. failing = switched off by the platform (3 days without success and at least 20 dead deliveries; the owner gets an email; PATCH {\"active\": true} switches it on again). token_revoked = the creating token was revoked, expired or lost its issuer (cannot be re-enabled: 409 webhook_token_revoked; create a new webhook)."
},
"failure_count": {
"type": "integer",
"minimum": 0,
"description": "Failed delivery attempts since the last success or since enabling"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"last_success_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"last_failure_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"secret": {
"type": "string",
"pattern": "^whsec_[0-9a-f]{64}$",
"example": "whsec_abababababababababababababababababababababababababababababababab",
"description": "Signing secret. Shown only in this answer; it is not stored in plain text and cannot be read again (use POST /webhooks/{webhook_id}/rotate-secret for a new one)."
}
},
"required": [
"id",
"url",
"events",
"active",
"disabled_reason",
"failure_count",
"created_at",
"last_success_at",
"last_failure_at",
"secret"
],
"additionalProperties": false
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WebhookUpdateRequest
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"description": "Target URL (https, port 443 or 1024-65535, DNS name, no turbopress.de host)"
},
"events": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookEventType"
},
"minItems": 1,
"maxItems": 8,
"uniqueItems": true
},
"active": {
"type": "boolean",
"description": "true switches a webhook on again (resets failure_count; not possible after token_revoked), false switches it off and ends its open deliveries (dead, last_error webhook_inactive)."
}
},
"minProperties": 1,
"additionalProperties": false,
"description": "At least one field. An empty body answers 400 invalid_arguments."
}WebhookResponse
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Webhook"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WebhookListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Webhook"
},
"maxItems": 10
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WebhookDelivery
{
"type": "object",
"description": "One delivery of an event to one webhook (outbox row). Kept for 14 days.",
"properties": {
"id": {
"type": "string",
"pattern": "^whd_[a-z0-9]{24}$",
"description": "Delivery id, sent as header Turbopress-Delivery; identical for every retry"
},
"event_id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id (field id of the body)"
},
"event_type": {
"type": "string",
"enum": [
"operation.succeeded",
"operation.failed",
"site.down",
"site.up",
"plugin.vulnerability_found",
"license.expiring",
"report.sent",
"report.failed",
"ping"
]
},
"status": {
"type": "string",
"enum": [
"pending",
"failed",
"sent",
"dead"
],
"description": "pending = never tried, failed = tried, next attempt planned, sent = answered 2xx, dead = given up (after 8 attempts, a failed ping, or ended without an attempt)"
},
"attempts": {
"type": "integer",
"minimum": 0,
"maximum": 8
},
"next_attempt_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"last_status_code": {
"type": [
"integer",
"null"
],
"description": "HTTP status of the last attempt that got an answer"
},
"last_error": {
"type": [
"string",
"null"
],
"enum": [
"http_status",
"timeout",
"connect_failed",
"tls_failed",
"transport_error",
"address_mismatch",
"address_rejected",
"url_rejected",
"access_removed",
"webhook_inactive",
null
],
"description": "Fixed code of the last failure, never text of the remote side. http_status = no 2xx answer, timeout, connect_failed, tls_failed, transport_error, address_mismatch = the connection went to another address than the checked one, address_rejected = the name did not resolve or resolved to a non-public address, url_rejected = the stored URL no longer passes the URL rules, access_removed = the token lost the right for this event or site (ended without an attempt), webhook_inactive = the webhook was switched off (ended without an attempt)."
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"payload": {
"type": [
"object",
"null"
],
"description": "The event as sent (id, type, created_at, data)"
}
},
"required": [
"id",
"event_id",
"event_type",
"status",
"attempts",
"next_attempt_at",
"last_status_code",
"last_error",
"created_at",
"updated_at",
"payload"
],
"additionalProperties": false
}WebhookDeliveryListResponse
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhookDelivery"
},
"maxItems": 50
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WebhookTestResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"delivery_id": {
"type": "string",
"pattern": "^whd_[a-z0-9]{24}$"
},
"event_id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$"
},
"status": {
"type": "string",
"enum": [
"pending"
]
}
},
"required": [
"delivery_id",
"event_id",
"status"
],
"additionalProperties": false
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WebhookSecretResponse
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^wh_[a-z0-9]{24}$"
},
"secret": {
"type": "string",
"pattern": "^whsec_[0-9a-f]{64}$",
"example": "whsec_abababababababababababababababababababababababababababababababab",
"description": "Signing secret. Shown only in this answer; it is not stored in plain text and cannot be read again (use POST /webhooks/{webhook_id}/rotate-secret for a new one)."
}
},
"required": [
"id",
"secret"
],
"additionalProperties": false
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
],
"additionalProperties": false
}WebhookEventOperationSucceeded
{
"type": "object",
"description": "A job of this token finished successfully.",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "operation.succeeded"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"operation": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"action": {
"type": "string",
"description": "Operation kind, e.g. cache:purge"
},
"status": {
"type": "string",
"enum": [
"succeeded"
]
},
"error_code": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"action",
"status",
"error_code"
],
"additionalProperties": false
},
"site": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"domain": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"domain"
],
"additionalProperties": false
}
},
"required": [
"operation",
"site"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventOperationFailed
{
"type": "object",
"description": "A job of this token failed, or ended with an unknown result (status unknown).",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "operation.failed"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"operation": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"action": {
"type": "string",
"description": "Operation kind, e.g. cache:purge"
},
"status": {
"type": "string",
"enum": [
"failed",
"unknown"
]
},
"error_code": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"action",
"status",
"error_code"
],
"additionalProperties": false
},
"site": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"domain": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"domain"
],
"additionalProperties": false
}
},
"required": [
"operation",
"site"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventSiteDown
{
"type": "object",
"description": "A confirmed outage of a monitored site began.",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "site.down"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"site": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"domain": {
"type": "string"
}
},
"required": [
"id",
"domain"
],
"additionalProperties": false
},
"outage": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"reason": {
"type": "string",
"enum": [
"timeout",
"tls",
"dns",
"connection",
"http_5xx",
"redirect_not_allowed",
"too_many_redirects",
"target_blocked",
"target_not_allowed",
"empty_body",
"unexpected_status",
"unknown"
]
}
},
"required": [
"id",
"started_at",
"reason"
],
"additionalProperties": false
}
},
"required": [
"site",
"outage"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventSiteUp
{
"type": "object",
"description": "The outage ended. Sent only to webhooks that received the matching site.down.",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "site.up"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"site": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"domain": {
"type": "string"
}
},
"required": [
"id",
"domain"
],
"additionalProperties": false
},
"outage": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"reason": {
"type": "string",
"enum": [
"timeout",
"tls",
"dns",
"connection",
"http_5xx",
"redirect_not_allowed",
"too_many_redirects",
"target_blocked",
"target_not_allowed",
"empty_body",
"unexpected_status",
"unknown"
]
},
"ended_at": {
"type": "string",
"format": "date-time"
},
"duration_seconds": {
"type": "integer",
"minimum": 0
}
},
"required": [
"id",
"started_at",
"reason",
"ended_at",
"duration_seconds"
],
"additionalProperties": false
}
},
"required": [
"site",
"outage"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventPluginVulnerabilityFound
{
"type": "object",
"description": "A known vulnerability was found in an installed plugin (once per site, plugin and vulnerability).",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "plugin.vulnerability_found"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"site": {
"type": "object",
"properties": {
"id": {
"type": [
"string",
"null"
],
"description": "null if the site is not in the API inventory"
},
"domain": {
"type": "string"
}
},
"required": [
"id",
"domain"
],
"additionalProperties": false
},
"client_id": {
"type": [
"string",
"null"
],
"description": "Customer id (string, as in GET /clients), null if the site is not assigned"
},
"plugin": {
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"slug",
"name",
"version"
],
"additionalProperties": false
},
"vulnerability": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the vulnerability source; may be an empty string"
},
"title": {
"type": "string"
},
"risk": {
"type": "string"
},
"fixed_in": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"title",
"risk",
"fixed_in"
],
"additionalProperties": false
}
},
"required": [
"site",
"client_id",
"plugin",
"vulnerability"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventLicenseExpiring
{
"type": "object",
"description": "A plugin license reached a threshold (once per license, expiry date and threshold).",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "license.expiring"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"license": {
"type": "object",
"properties": {
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"expires_at": {
"type": "string",
"format": "date"
},
"days_left": {
"type": "integer",
"description": "Negative once expired"
},
"threshold": {
"type": "string",
"enum": [
"30_days",
"7_days",
"expired"
]
}
},
"required": [
"slug",
"name",
"expires_at",
"days_left",
"threshold"
],
"additionalProperties": false
}
},
"required": [
"license"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventReportSent
{
"type": "object",
"description": "A maintenance report was sent to the end customer (a resend is a new event).",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "report.sent"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"client": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Customer id (string, as in GET /clients)"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"period": {
"type": "string",
"description": "YYYY-MM or YYYYQn"
},
"kind": {
"type": "string",
"enum": [
"month",
"quarter"
]
},
"sent_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"client",
"period",
"kind",
"sent_at"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventReportFailed
{
"type": "object",
"description": "Sending a maintenance report failed. Once per report and period until the next successful send.",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "report.failed"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"client": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Customer id (string, as in GET /clients)"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
"period": {
"type": "string",
"description": "YYYY-MM or YYYYQn"
},
"kind": {
"type": "string",
"enum": [
"month",
"quarter"
]
}
},
"required": [
"client",
"period",
"kind"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}WebhookEventPing
{
"type": "object",
"description": "Test event from POST /webhooks/{webhook_id}/test. One attempt, no retries.",
"properties": {
"id": {
"type": "string",
"pattern": "^evt_[a-z0-9]{24}$",
"description": "Event id; identical for every webhook and every retry of the same event"
},
"type": {
"type": "string",
"const": "ping"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When the event happened (UTC), not when it was sent"
},
"data": {
"type": "object",
"properties": {
"webhook_id": {
"type": "string",
"pattern": "^wh_[a-z0-9]{24}$"
}
},
"required": [
"webhook_id"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"created_at",
"data"
],
"additionalProperties": false
}