Skip to main content

API reference

Manage projects, scan for vulnerabilities and export compliance reports and SBOMs from your own scripts and pipelines. Anything you can do in the dashboard is available here.

Getting started

All API requests are made to the base URL:

Base URL
https://api.resiliencewp.com

Authentication

Include your API key as a Bearer token in the Authorization header. You can generate an API key from the dashboard under Settings.

Example request
curl https://api.resiliencewp.com/api/me \
  -H "Authorization: Bearer YOUR_API_KEY"

Organization scope

If your account belongs to multiple organizations, pass the X-Org-Id header to scope the request to a specific organization. If omitted, the request targets your default organization.

Org-scoped request
curl https://api.resiliencewp.com/api/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Org-Id: org_abc123"

Response format

All responses return JSON. Successful responses include the data directly. Error responses include an error field with a human-readable message.

Error response
{
  "error": "Unauthorized"
}

Supported ecosystems

The following ecosystems are supported for dependency monitoring:

  • npm
  • PyPI
  • Go
  • crates.io
  • Maven
  • Packagist
  • NuGet
  • wordpress-plugin

Authentication

GET/api/me

Get current user profile

Returns the authenticated user's profile, organization, and plan details.

Response
{
  "id": "usr_abc123",
  "email": "dev@example.com",
  "name": "Jane Developer",
  "org_id": "org_abc123",
  "plan": "pro",
  "created_at": "2026-01-15T10:30:00Z"
}

POST/api/verify-key

Verify an API key

Checks whether the provided API key is valid and returns the associated user. Useful for validating keys stored in CI/CD pipelines or WordPress plugin settings.

Response
{
  "valid": true,
  "user_id": "usr_abc123",
  "plan": "pro",
  "org_id": "org_abc123"
}

Dashboard

GET/api/dashboard

Get dashboard statistics

Returns a summary of compliance score, vulnerability counts by severity, and scan activity for the current organization.

Response
{
  "compliance_score": 87,
  "vulnerabilities": {
    "critical": 0,
    "high": 2,
    "medium": 5,
    "low": 12
  },
  "scans": {
    "total": 142,
    "last_scan_at": "2026-05-03T08:15:00Z"
  },
  "projects_count": 8,
  "plugins_count": 3
}

Projects (dependencies)

GET/api/projects

List monitored projects

Returns a paginated list of dependency projects being monitored.

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
per_pageintegerNoResults per page (default: 25, max: 100)
searchstringNoFilter by project name or package name
sort_bystringNoSort field: name, created_at, ecosystem (default: created_at)
sort_dirstringNoSort direction: asc or desc (default: desc)
Response
{
  "data": [
    {
      "id": "prj_abc123",
      "name": "my-react-app",
      "ecosystem": "npm",
      "package_name": "my-react-app",
      "version": "2.1.0",
      "vulnerabilities_count": 3,
      "last_scan_at": "2026-05-03T08:15:00Z",
      "created_at": "2026-03-01T12:00:00Z"
    }
  ],
  "total": 42,
  "page": 1,
  "per_page": 25
}

POST/api/projects

Add a project

Add a new dependency project to monitor.

ParameterTypeRequiredDescription
namestringYesDisplay name for the project
ecosystemstringYesPackage ecosystem (e.g. npm, PyPI, Go)
package_namestringYesPackage identifier in the ecosystem
versionstringYesCurrent version to monitor
Request body
{
  "name": "my-react-app",
  "ecosystem": "npm",
  "package_name": "my-react-app",
  "version": "2.1.0"
}

DELETE/api/projects

Remove a project

Remove a project from monitoring. This does not delete historical scan data.

ParameterTypeRequiredDescription
project_idstringYesThe project ID to remove
Request body
{
  "project_id": "prj_abc123"
}

WordPress plugins

GET/api/plugins

List monitored plugins

Returns all WordPress plugins being monitored for vulnerabilities.

Response
{
  "data": [
    {
      "id": "plg_abc123",
      "slug": "woocommerce",
      "name": "WooCommerce",
      "version": "8.9.1",
      "vulnerabilities_count": 0,
      "last_scan_at": "2026-05-03T08:15:00Z"
    }
  ]
}

POST/api/plugins

Add a plugin

Add a WordPress plugin to monitor.

ParameterTypeRequiredDescription
slugstringYesWordPress.org plugin slug
namestringYesDisplay name
versionstringYesInstalled version
Request body
{
  "slug": "woocommerce",
  "name": "WooCommerce",
  "version": "8.9.1"
}

DELETE/api/plugins

Remove a plugin

Remove a WordPress plugin from monitoring.

ParameterTypeRequiredDescription
plugin_idstringYesThe plugin ID to remove

Vulnerabilities

GET/api/vulnerabilities

List vulnerabilities

Returns a paginated, filterable list of discovered vulnerabilities.

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
per_pageintegerNoResults per page (default: 25, max: 100)
severitystringNoFilter by severity: critical, high, medium, low
statusstringNoFilter by status: open, resolved, ignored
searchstringNoSearch by CVE ID, package name, or description
Response
{
  "data": [
    {
      "id": "vul_abc123",
      "cve_id": "CVE-2026-12345",
      "severity": "high",
      "status": "open",
      "package_name": "lodash",
      "ecosystem": "npm",
      "affected_version": "<4.17.21",
      "fixed_version": "4.17.21",
      "description": "Prototype Pollution in lodash",
      "discovered_at": "2026-05-01T14:00:00Z"
    }
  ],
  "total": 19,
  "page": 1,
  "per_page": 25
}

PATCH/api/vulnerabilities

Update vulnerability status

Update the status of a vulnerability (e.g. mark as resolved or ignored).

ParameterTypeRequiredDescription
vulnerability_idstringYesThe vulnerability ID
statusstringYesNew status: open, resolved, or ignored
Request body
{
  "vulnerability_id": "vul_abc123",
  "status": "resolved"
}

Scanning

POST/api/scan

Trigger a scan

Trigger an on-demand vulnerability scan for a specific plugin or project. Provide either plugin_id or project_id, not both.

ParameterTypeRequiredDescription
plugin_idstringNoThe plugin ID to scan
project_idstringNoThe project ID to scan
Request body
{
  "project_id": "prj_abc123"
}
Response
{
  "success": true,
  "data": {
    "scan_id": "scn_abc123",
    "vulnerabilities_found": 3,
    "new_vulnerabilities": 1,
    "newly_exploited": 0,
    "project_status": "vulnerable",
    "data_source": "current"
  }
}

The scan runs before the response returns. Plugin scans answer with plugin_status in place of project_status. Every scan that runs counts towards your plan’s monthly allowance, automatic ones included; failed scans don’t. When it is used up, this endpoint returns 429 with "code": "scan_limit" until the 1st of next month. Automatic scans keep running.

Reports

GET/api/reports?format=compliance

Compliance report data

Returns structured data for generating a PDF compliance report, including CRA Article 13 conformity status, vulnerability summary, and patch history.

Response (truncated)
{
  "format": "compliance",
  "generated_at": "2026-05-03T10:00:00Z",
  "organization": "Acme Corp",
  "compliance_score": 87,
  "articles": [
    {
      "id": "art-13-6",
      "title": "Software Bill of Materials",
      "status": "compliant",
      "details": "SBOM generated in CycloneDX 1.5 format"
    }
  ],
  "vulnerabilities_summary": {
    "total": 19,
    "resolved": 14,
    "open": 5
  }
}

GET/api/reports?format=sbom

CycloneDX SBOM

Returns a CycloneDX 1.6 JSON Software Bill of Materials covering all monitored projects and plugins. Add &repo=owner/name for a single product. The CRA asks for an SBOM in a commonly used, machine-readable format (Annex I, Part II(1)); CycloneDX is one of the two most widely used.

Response (truncated)
{
  "bomFormat": "CycloneDX",
  "specVersion": "1.6",
  "serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
  "version": 1,
  "components": [
    {
      "type": "library",
      "name": "lodash",
      "version": "4.17.21",
      "purl": "pkg:npm/lodash@4.17.21"
    }
  ]
}

GET/api/reports?format=spdx

SPDX 2.3 SBOM

Returns an SPDX 2.3 JSON Software Bill of Materials. SPDX is the other widely used SBOM format; an earlier version (2.2.1) is published as ISO/IEC 5962:2021.

Response (truncated)
{
  "spdxVersion": "SPDX-2.3",
  "dataLicense": "CC0-1.0",
  "SPDXID": "SPDXRef-DOCUMENT",
  "name": "acme-corp-sbom",
  "packages": [
    {
      "SPDXID": "SPDXRef-Package-lodash",
      "name": "lodash",
      "versionInfo": "4.17.21",
      "externalRefs": [
        {
          "referenceCategory": "PACKAGE-MANAGER",
          "referenceType": "purl",
          "referenceLocator": "pkg:npm/lodash@4.17.21"
        }
      ]
    }
  ]
}

Webhooks Pro plan

Configure webhooks in the dashboard to receive real-time notifications when events occur. Webhooks are sent as POST requests with a JSON payload.

Events

EventDescription
scan.completedA vulnerability scan has finished
vulnerability.foundA new vulnerability has been discovered
incident.createdA security incident has been created
incident.updatedA security incident status has changed

Signature verification

Each webhook request includes an X-Webhook-Signature header containing an HMAC-SHA256 signature of the request body, signed with your webhook secret. Always verify this signature before processing the payload.

Verifying the signature (Node.js)
import crypto from 'crypto';

function verifyWebhookSignature(
  body: string,
  signature: string,
  secret: string
): boolean {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Example payload

vulnerability.found
{
  "event": "vulnerability.found",
  "timestamp": "2026-05-03T10:00:00Z",
  "data": {
    "vulnerability_id": "vul_abc123",
    "cve_id": "CVE-2026-12345",
    "severity": "high",
    "package_name": "lodash",
    "ecosystem": "npm",
    "project_id": "prj_abc123"
  }
}

Rate limits

API requests are rate-limited per API key. Current limits are returned in response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

If you exceed the rate limit, the API returns a 429 Too Many Requests response. Wait until the reset time before retrying.