Skip to content

API

The Philterd Data Services API allows you to programmatically interact with Philterd Data Services to redact documents, manage policies, and perform risk assessments.

API Reference

We provide a comprehensive and interactive API reference using Swagger UI. This allows you to explore the available endpoints, view request/response schemas, and even test the API directly from your browser.

Authentication

All API requests require an API key to be sent in the Authorization header. You can manage your API keys in the Philterd Data Services dashboard. See API Keys for more information.

Authorization: Bearer <your-api-key>

Webhooks

Webhooks allow you to receive real-time notifications when document redaction events occur. When a document is processed via the API, the system can send an HTTP POST request to a user-configured HTTPS endpoint containing event details in JSON format.

Supported Events

  • document_redaction_complete: Triggered when a document redaction completes successfully.
  • document_redaction_failed: Triggered when a document redaction fails (e.g., invalid content type or processing error).

Each event will include the document ID, status, and any supporting details. An example event payload for a successful document redaction is shown below:

{
    "event_type": "document_redaction_complete",
    "document_id": "1234567890",
    "timestamp": "2023-01-01T12:00:00Z",
    "details": ""
}

An example event payload for a failed document redaction is shown below:

{
    "event_type": "document_redaction_failure",
    "document_id": "1234567890",
    "timestamp": "2023-01-01T12:00:00Z",
    "details": "invalid content-type"
}

Security

All webhook requests include an HMAC-SHA256 signature in the X-PDS-Signature header to verify authenticity. The header contains a timestamp (t) and the signature (v1).

Example header: X-PDS-Signature: t=1673456789000,v1=5a8d9f3b2c1e4f7a...

Configuration

To enable webhooks, you must configure your user profile with:

  1. Webhook URL: A secure HTTPS endpoint to receive the events.
  2. Enabled Events: A list of events you wish to receive.

Differences Between the API and the UI

While both the Philterd Data Services API and the Web UI provide access to the core redaction and risk assessment capabilities, there are some key differences:

  • Webhook Triggers: Webhook notifications are only triggered for documents submitted via the API. Documents uploaded or redacted through the Web UI do not trigger webhooks.
  • Automation: The API is designed for high-volume, automated processing and integration into your own applications and workflows.
  • User Management: Some administrative tasks, such as managing API keys and user settings, are currently only available through the Web UI.