=== DirectRelay Privacy Policy ===

This plugin collects the following data:

1. API Access Logs
When an API key is used to make a request, the following information is recorded:
- Timestamp of the request
- API key ID and key prefix (not the full key)
- Request method and endpoint path
- HTTP response status code
- Response time in milliseconds
- Client IP address

2. API Key Metadata
When an API key is created, the following is stored:
- Key label and description (as entered by the administrator)
- Creation timestamp
- Expiration date (if set)
- Environment (production/staging)
- Assigned scopes
- IP whitelist (if configured)
- Last-used timestamp and total request count

3. Brute-Force Protection Data
To protect against brute-force attacks, the plugin records:
- IP addresses that have failed authentication
- Timestamp and count of failed attempts
- These records are automatically purged when an IP is unblocked or after the configurable block window expires.

4. Webhook Delivery Logs
When webhooks are triggered, the following may be logged:
- Webhook target URL
- Event type that triggered the delivery
- HTTP response from the target server
- Delivery attempt count and final status

5. Analytics Data
Internal analytics track:
- Hourly aggregated request counts per endpoint
- Error counts and average response times
- Used exclusively for display in the plugin dashboard.

=== Data Retention ===

Default log retention is configurable in plugin Settings (default: 30 days; minimum: 1 day; maximum: 365 days).
The retention period is set via the "Log Retention Days" setting on the plugin's Settings page.
Analytics aggregates are retained for 30 days.
Webhook delivery logs are retained for 30 days.
Revoked API keys are disabled immediately; their records remain in the plugin's keys table until the plugin is uninstalled. Request logs follow the retention period above.

=== Data Sharing & External Connections ===

This plugin connects to external services only in the following scenarios, all initiated by the site administrator:
1. Outgoing webhooks: Payloads containing post, page, or taxonomy event metadata are sent to the target URLs explicitly configured by the site administrator (e.g., an n8n instance). The plugin does not connect to any third party by default; webhooks only fire when the admin creates a webhook rule with a destination URL.
2. Optional integrations: The plugin ships with optional, opt-in integrations (IndexNow, Cloudflare cache purge, n8n starter workflow templates). Each integration is disabled by default and only connects to its respective service when the administrator enables it and supplies the required credentials or template.

Except for the above, this plugin does NOT:
- Send any data to other external third parties
- Validate or transmit any purchase code, license key, or Envato/CodeCanyon identifier (the plugin is fully free and license-free)
- Collect or store full API keys in plain text (only truncated prefixes are stored for identification)
- Use cookies or tracking across different websites
- Collect any data from site visitors (only WP admin and API key usage is logged)

=== Security ===

All API keys are securely hashed using bcrypt (via PHP's password_hash) on creation. The raw key is shown only once and cannot be retrieved.
Webhook secrets are stored using AES-256 encryption at rest, keyed with your site's WordPress secret keys, and decrypted only at HMAC signing time.
IP addresses are stored for brute-force protection and are purgeable.
Connections to webhook target URLs are made on-demand when a WordPress post event occurs.

=== GDPR Compliance ===

Site administrators are responsible for:
- Ensuring their site's privacy policy discloses the use of this plugin, its data collection, and external connections (Webhook targets and any optional integrations the administrator enables)
- Responding to data subject requests (e.g., deletion of API key records) by using the plugin's key revocation and log clearing features
- The plugin does not collect data from site visitors or non-authenticated users

To delete all collected data: uninstalling this plugin will remove all database tables and options. Alternatively, use the "Clear Logs" button on the Activity Log page to purge log data without removing the plugin.

=== Changes to This Policy ===

If this privacy policy is updated, the "Last updated" date below will be revised.

Last updated: 2026-04-29