{
  "openapi": "3.0.1",
  "info": {
    "title": "DeploySeal Public API",
    "description": "Authenticate with an organisation API key: `Authorization: Bearer ds_live_…` (or `X-Api-Key`). Keys carry scopes — read, write, webhooks — and each endpoint states the one it needs. Rate limit: 600 requests per minute per key; a 429 carries `Retry-After` in seconds. Errors are RFC 7807 problem+json. Docs: /docs/api",
    "version": "v1"
  },
  "paths": {
    "/api/v1/campaigns": {
      "get": {
        "tags": [
          "V1Campaigns"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/CampaignStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicCampaignDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicCampaignDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicCampaignDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/issues": {
      "get": {
        "tags": [
          "V1Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/IssueStatus"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/IssueSeverity"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicIssueSummaryDtoPublicPage"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicIssueSummaryDtoPublicPage"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicIssueSummaryDtoPublicPage"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "V1Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicIssueRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicIssueRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicIssueRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePublicIssueResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePublicIssueResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePublicIssueResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/events": {
      "get": {
        "tags": [
          "V1Events"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/events/{eventKey}/sample": {
      "get": {
        "tags": [
          "V1Events"
        ],
        "parameters": [
          {
            "name": "eventKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/issues/{id}": {
      "get": {
        "tags": [
          "V1Issues"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicIssueDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicIssueDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicIssueDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "tags": [
          "V1Me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyContextDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyContextDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyContextDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "tags": [
          "V1Webhooks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicWebhookDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicWebhookDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicWebhookDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "V1Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicWebhookRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicWebhookRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublicWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePublicWebhookResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePublicWebhookResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePublicWebhookResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/webhooks/{id}": {
      "delete": {
        "tags": [
          "V1Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiKeyContextDto": {
        "type": "object",
        "properties": {
          "organization": {
            "$ref": "#/components/schemas/ApiKeyOrganizationDto"
          },
          "key": {
            "$ref": "#/components/schemas/ApiKeyIdentityDto"
          }
        },
        "additionalProperties": false
      },
      "ApiKeyIdentityDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApiKeyOrganizationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CampaignStatus": {
        "enum": [
          "Draft",
          "Active",
          "Paused",
          "Closed"
        ],
        "type": "string"
      },
      "CreatePublicIssueRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "$ref": "#/components/schemas/IssueSeverity"
          },
          "type": {
            "$ref": "#/components/schemas/IssueType"
          },
          "pageUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatePublicIssueResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "seqNumber": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "CreatePublicWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatePublicWebhookResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "secret": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IssueSeverity": {
        "enum": [
          "Critical",
          "High",
          "Medium",
          "Low",
          "Trivial"
        ],
        "type": "string"
      },
      "IssueStatus": {
        "enum": [
          "New",
          "Acknowledged",
          "InProgress",
          "Fixed",
          "RetestRequested",
          "RetestFixed",
          "RetestFailed",
          "Closed",
          "WontFix",
          "Duplicate"
        ],
        "type": "string"
      },
      "IssueType": {
        "enum": [
          "Bug",
          "UxFeedback",
          "ContentError",
          "PerformanceIssue",
          "AccessibilityIssue",
          "Other"
        ],
        "type": "string"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "PublicCampaignDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "siteId": {
            "type": "string",
            "format": "uuid"
          },
          "siteName": {
            "type": "string",
            "nullable": true
          },
          "readinessLevel": {
            "type": "string",
            "nullable": true
          },
          "gate": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PublicIssueDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "seqNumber": {
            "type": "integer",
            "format": "int32"
          },
          "campaignId": {
            "type": "string",
            "format": "uuid"
          },
          "campaignName": {
            "type": "string",
            "nullable": true
          },
          "siteId": {
            "type": "string",
            "format": "uuid"
          },
          "siteName": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "stepsToReproduce": {
            "type": "string",
            "nullable": true
          },
          "expectedBehavior": {
            "type": "string",
            "nullable": true
          },
          "actualBehavior": {
            "type": "string",
            "nullable": true
          },
          "pageUrl": {
            "type": "string",
            "nullable": true
          },
          "pageTitle": {
            "type": "string",
            "nullable": true
          },
          "browserName": {
            "type": "string",
            "nullable": true
          },
          "browserVersion": {
            "type": "string",
            "nullable": true
          },
          "operatingSystem": {
            "type": "string",
            "nullable": true
          },
          "deviceType": {
            "type": "string",
            "nullable": true
          },
          "screenResolution": {
            "type": "string",
            "nullable": true
          },
          "screenshotUrl": {
            "type": "string",
            "nullable": true
          },
          "assigneeName": {
            "type": "string",
            "nullable": true
          },
          "testerEmail": {
            "type": "string",
            "nullable": true
          },
          "duplicateOfId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "duplicateOfSeqNumber": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicIssueHistoryDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicIssueHistoryDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "nullable": true
          },
          "to": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PublicIssueSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "seqNumber": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "assigneeName": {
            "type": "string",
            "nullable": true
          },
          "pageUrl": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PublicIssueSummaryDtoPublicPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicIssueSummaryDto"
            },
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PublicWebhookDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "isEnabled": {
            "type": "boolean"
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": { }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "description": "Organisation API key (Settings → Integrations → API keys). Also accepted as X-Api-Key.",
        "scheme": "bearer",
        "bearerFormat": "ds_live_…"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ]
}