Loading...
Integration Guide

Zapier Integration Guide

Technical reference for connecting Free Trial Terminator to Zapier: scoped API-key authentication, canonical actions, trigger catalog, idempotency, signed webhooks, and boundary constraints.

Documentation Metadata

Documentation version
e15d-z01.v1
Contract version
2026-10-11.c15b-z01.v1
Last updated
October 16, 2026
Stable versioned URL
/developers/zapier

1. Integration Status & Scope Boundary

Repository-Supported Specification

This integration is repository-supported. All routes, actions, triggers, database migrations, outbox dispatchers, error registries, and security mechanisms are fully implemented and verified via automated test suites within the repository contracts. This guide does not claim third-party Zapier marketplace listing approval, live external validation, or OAuth 2.0 self-serve app directory publication.

The integration connects to FTT's deterministic cancellation infrastructure using direct, scoped API keys and signed HTTP callbacks.

2. Authentication Flow

Zapier integrations authenticate using scoped, revocable API keys passed in the standard HTTP Authorization header:

Authorization: Bearer <FTT_API_KEY>

Callers may supply optional caller identification headers for tracking and audit logs:

X-FTT-Caller-ID: zapier-app
X-FTT-Caller-Type: THIRD_PARTY_APP

Credential Security Rules

  • Never paste API keys or user account passwords into Zapier chat or support threads.
  • Store API keys securely in Zapier's encrypted connection credentials storage.
  • Do not supply end-user JWT session tokens to API-key-only Zapier routes; JWTs will be rejected with HTTP 403.
  • Keys can be revoked instantly from the Free Trial Terminator dashboard without affecting user data.

Verify Connection Identity

Use the identity endpoint to verify API key validity, account binding, and granted scopes:

curl -X GET "https://api.freetrialterminator.com/api/v1/integrations/zapier/identity" \
  -H "Authorization: Bearer $FTT_API_KEY" \
  -H "X-Request-Id: $(uuidgen)"

Expected Response (200 OK):

{
  "success": true,
  "data": {
    "integration": "zapier",
    "environment": "staging",
    "connection_label": "FTT Staging",
    "connection_id": "018f3a5e-99e2-763d-82d1-0f72ec8b49e2",
    "scopes": ["cancellations:read", "status:read"]
  },
  "case_id": "UNKNOWN_CASE",
  "current_state": "DETECTED",
  "reason_for_state": "UNKNOWN_REASON",
  "last_event": {
    "event_id": "UNKNOWN_EVENT_ID",
    "event_type": "UNKNOWN_EVENT",
    "event_at": "2026-10-10T12:00:00.000Z",
    "correlation_id": "UNKNOWN_CORRELATION_ID"
  },
  "explainability": {
    "decision_history_url": null,
    "decision_source": "SYSTEM_INFERRED"
  },
  "timestamp": "2026-10-10T12:00:00.000Z"
}

3. Required API-Key Scopes

Free Trial Terminator enforces granular least-privilege permission scopes. Each API request validates required scopes:

ScopePermitted OperationsFailure Error
status:readInspect Zapier identity (/identity) and read case status (/cancellations/{id})FORBIDDEN (403)
status:writeConditionally execute cancellation requests (/cancellations/{case_id}/execute)FORBIDDEN (403)
cancellations:readRetrieve verified cryptographic cancellation proof (/cancellations/{id}/proof)FORBIDDEN (403)
webhooks:readInspect outbound webhook subscription status and configurations (/webhooks/{id})FORBIDDEN (403)
webhooks:writeRegister new outbound webhook endpoints and delete existing subscriptions (/webhooks)FORBIDDEN (403)

4. Supported Actions Catalog

Zapier actions correspond directly to authorized endpoints in the public OpenAPI 3.1 specification:

Action NameHTTP Route & ScopeInputs & OutputsState Semantics & Errors
Read Cancellation Status
GET /api/v1/cancellations/{id}
Scope: status:read
In: id (Case UUID)
Out: case_id, current_state, reason_for_state, capability, outcome_level, completion_confirmed, last_event
Read-only. Returns deterministic state machine progress.
Errors: UNAUTHORIZED, FORBIDDEN, CASE_NOT_FOUND (404, ownership-safe).
Read Cancellation Proof
GET /api/v1/cancellations/{id}/proof
Scope: cancellations:read
In: id (Case UUID)
Out: current_state, reason_for_state, outcome_status, proof_type
Read-only. Returns canonical state truth aligned across top-level and proof data envelope.
Errors: UNAUTHORIZED, FORBIDDEN, PROOF_NOT_READY (409), CASE_NOT_FOUND (404).
Retrieve Asynchronous Status
GET /api/v1/cancellations/{id}
Scope: status:read
In: id (Case UUID)
Out: Latest canonical state and confidence
Polling retrieval against the canonical case route. FTT does not expose an ad-hoc job status endpoint.
Errors: CASE_NOT_FOUND, RATE_LIMIT_EXCEEDED.
Conditionally Execute Cancellation
POST /api/v1/integrations/zapier/cancellations/{case_id}/execute
Scope: status:write
In: no request body is accepted. A non-empty body returns 400 INVALID_REQUEST.
Header: Idempotency-Key (required; execution fails closed with 503 if the idempotency store is unavailable)
Out: canonical payload returned verbatim — case_id, current_state, capability, outcome_level, completion_confirmed, scheduled, correlation_id
Flag-gated thin delegate to the canonical execution service; it reproduces no queue, state, safety, provider or Provider Intelligence logic. Completion is never claimed by accepting a request: completion_confirmed and outcome_level are reported only from confirmed provider evidence, and progress is polled through GET /api/v1/cancellations/{id}.
Errors: INVALID_REQUEST, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_REUSED, IDEMPOTENCY_REQUEST_IN_PROGRESS, ZAPIER_EXECUTION_DISABLED, ENTITLEMENT_REQUIRED, INVALID_STATUS_TRANSITION, EXECUTION_BLOCKED.

5. Supported Triggers Catalog

FTT projects six approved canonical trigger events via transactional outbox subscriptions:

Trigger NameEvent Type StringCanonical Trigger Predicate
Cancellation State Changedcancellation.state_changedFires on every committed canonical case-state transition across the 12-state lifecycle.
Cancellation Completedcancellation.completedFires when the case transitions to CONFIRMED with canonical completion confirmation.
Cancellation Failedcancellation.failedFires when the case transitions to FAILED with terminal error reason.
Action Requiredcancellation.action_requiredFires when the case transitions to ACTION_REQUIRED with the customer as the required actor.
Proof Readycancellation.proof_readyFires when durable proof becomes available after its database transaction commits.
Human Attention Requiredcancellation.human_attention_requiredFires when operator attention is required or the case enters the approved DLQ condition.

6. Human Attention & Admin Authority

The cancellation.human_attention_required trigger notifies automated workflows that manual operational review or dead-letter escalation is underway.

System of Record Authority

The FTT Admin Dashboard remains the sole authoritative system of record for cases requiring human attention. Zapier automations can listen for alerts, create ticketing tickets, or notify Slack channels, but they cannot resolve, override, or clear operator-required cases via API.

7. Webhook Failure Isolation

Free Trial Terminator implements strict failure isolation between external webhook delivery and canonical core business state:

  • Outbox Segregation: Webhook deliveries are queued into a transactional outbox table atomically with state transitions.
  • Delivery Failure Boundaries: External HTTP timeouts, 5xx server errors on Zapier endpoints, DNS resolution errors, or retry exhaustion update only the webhook delivery log status (FAILED / EXHAUSTED).
  • State Immutability: A webhook delivery failure never alters, rolls back, or erases canonical case state, cancellation proof, audit EventLog truth, or confidence score.
  • Killswitch Safety: Disabling the Zapier integration halts outbound webhook delivery without interrupting internal cancellation execution.

8. ACTION_REQUIRED Semantics & Non-Completion Rule

When a cancellation requires direct customer interaction (e.g., SMS two-factor verification, phone confirmation callback, or proprietary provider questionnaire), the case transitions to ACTION_REQUIRED.

Critical Non-Completion Rule

  • The payload explicitly specifies "required_actor": "CUSTOMER" and the specific instruction description.
  • Zapier recipes and consuming applications must never treat ACTION_REQUIRED as a completed cancellation.
  • Zapier cannot automatically resolve or bypass customer actions; the end-user must perform the necessary action through the FTT customer portal.

9. Idempotency Requirements

To prevent duplicate cancellation execution or duplicate outbox subscriptions during network retries:

  • Execution Header: All POST /execute requests require an Idempotency-Key header containing a unique UUIDv4 string.
  • Safe Replays: Repeating a request with the exact same idempotency key and body returns the original cached response.
  • Key Conflict Detection: Reusing the same key with different payload parameters returns IDEMPOTENCY_KEY_REUSED (409).
  • Concurrent In-Progress Guard: Concurrent execution calls with the same key return IDEMPOTENCY_REQUEST_IN_PROGRESS (409).
  • Webhook Deduplication: Webhook registrations enforce uniqueness on (webhook_id, event_id, event_type) to guarantee at-least-once outbox processing without duplicate event delivery.

10. Webhook Signature Verification

Every outbound webhook delivery includes cryptographic headers signed with your webhook endpoint secret:

Header NameFormat & Description
X-FTT-Event-IdUnique UUID identifying this specific event emission.
X-FTT-TimestampUnix timestamp (in seconds) of event dispatch. Consumers must reject timestamps older than 300 seconds.
X-FTT-SignatureHMAC-SHA256 signature in format: v1=<hex_digest> computed over "<timestamp>.<raw_utf8_body>".

Verification Code Example (Node.js)

import crypto from 'node:crypto';

export function verifyWebhookSignature({
  rawBody,
  signatureHeader,
  timestampHeader,
  webhookSecret,
  toleranceSeconds = 300,
}: {
  rawBody: string;
  signatureHeader: string;
  timestampHeader: string;
  webhookSecret: string;
  toleranceSeconds?: number;
}): boolean {
  const now = Math.floor(Date.now() / 1000);
  const ts = parseInt(timestampHeader, 10);
  if (Number.isNaN(ts) || Math.abs(now - ts) > toleranceSeconds) {
    return false; // Stale timestamp outside tolerance window
  }

  const expectedSignature = 'v1=' + crypto
    .createHmac('sha256', webhookSecret)
    .update(`${timestampHeader}.${rawBody}`)
    .digest('hex');

  const providedBuf = Buffer.from(signatureHeader, 'utf8');
  const expectedBuf = Buffer.from(expectedSignature, 'utf8');

  if (providedBuf.length !== expectedBuf.length) {
    return false;
  }

  return crypto.timingSafeEqual(providedBuf, expectedBuf);
}

11. Replay Protection & Retry Backoff

Consuming endpoints and Zapier receivers must follow these delivery guidelines:

  • Replay Rejection: Store recent X-FTT-Event-Id values in a key-value cache (e.g., Redis with 24-hour TTL). If an event ID has already been processed, return HTTP 200 immediately without reprocessing business actions.
  • Retry Backoff Schedule: FTT retries temporary delivery failures (HTTP 429, 500, 502, 503, 504, or network timeouts) using jittered exponential backoff with an initial delay of 15 seconds (nominal retries: 15s, 30s, 60s, 120s with ±20% jitter) capped at 1 hour, for up to 5 total attempts before terminal failure.
  • Rate Limit Honor: If your receiver responds with HTTP 429 or 503 containing a valid Retry-After header, FTT pauses delivery retries for that duration.
  • Terminal Rejection: Client errors (HTTP 400, 401, 403, 404, 422, SSRF rejections) are treated as terminal; delivery is marked permanently failed without retry.

12. Asynchronous Status Polling Example

When webhooks cannot be utilized, Zapier polling triggers should retrieve status via the canonical case endpoint using an owned case ID:

curl -X GET "https://api.freetrialterminator.com/api/v1/cancellations/c9b1f2e0-47b2-4d1a-8c76-52f10b7f0001" \
  -H "Authorization: Bearer $FTT_API_KEY" \
  -H "X-Request-Id: $(uuidgen)"

Response Example (AgenticCaseResponse):

{
  "success": true,
  "data": {
    "case_id": "c9b1f2e0-47b2-4d1a-8c76-52f10b7f0001",
    "status": "CONFIRMED",
    "safe_to_retry": false,
    "retry_count": 0,
    "next_action_type": null,
    "blocking_condition": null,
    "reason_for_state": "PROVIDER_CONFIRMED"
  },
  "case_id": "c9b1f2e0-47b2-4d1a-8c76-52f10b7f0001",
  "current_state": "CONFIRMED",
  "reason_for_state": "PROVIDER_CONFIRMED",
  "last_event": {
    "event_id": "evt_018f3a5e99e2",
    "event_type": "cancellation.completed",
    "event_at": "2026-10-15T12:04:30.000Z",
    "correlation_id": "corr_018f3a5e99e2"
  },
  "explainability": {
    "decision_history_url": null,
    "decision_source": "SYSTEM_INFERRED"
  },
  "timestamp": "2026-10-15T12:04:30.000Z"
}

To read the sanitized cancellation proof after status reaches CONFIRMED (the response includes the X-Request-Id tracking header):

curl -X GET "https://api.freetrialterminator.com/api/v1/cancellations/c9b1f2e0-47b2-4d1a-8c76-52f10b7f0001/proof" \
  -H "Authorization: Bearer $FTT_API_KEY" \
  -H "X-Request-Id: $(uuidgen)"

Response Example (CancellationProofResponse):

{
  "success": true,
  "data": {
    "schema_version": "2.0",
    "case_id": "c9b1f2e0-47b2-4d1a-8c76-52f10b7f0001",
    "current_state": "CONFIRMED",
    "reason_for_state": "PROVIDER_CONFIRMED",
    "proof_type": "CONFIRMED_CANCELLATION",
    "proof_classification": "CONFIRMED_CANCELLATION",
    "proof_source": "ADMIN_VERIFIED",
    "outcome_status": "CONFIRMED",
    "verification_method": "PROVIDER_ACCOUNT_PAGE",
    "verified_at": "2026-10-15T12:04:30.000Z",
    "artifact_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "confidence_band": "HIGH"
  }
}

Proof responses return exactly these fields and nothing else. No storage location, signed URL, raw artifact, admin note, or internal lineage metadata is ever exposed; artifact_sha256 is populated only for a validated admin-verified proof.

13. Structured Error Registry Table

All API errors return consistent JSON envelopes containing a stable error_code and correlation identifier:

Error CodeHTTP StatusCondition & Resolution
UNAUTHORIZED401Missing, expired, malformed, or revoked API key. Generate a new key in the FTT portal.
FORBIDDEN403API key lacks required scope, or a JWT session token was used on an API-key-only route.
CASE_NOT_FOUND404Case does not exist or is not owned by the authenticated caller (ownership-safe enumeration guard).
VALIDATION_ERROR400Malformed request parameters, invalid UUID format, or invalid payload schema.
IDEMPOTENCY_KEY_REQUIRED400Execution request omitted the mandatory Idempotency-Key header.
IDEMPOTENCY_KEY_REUSED409The same idempotency key was reused with different payload parameters.
IDEMPOTENCY_REQUEST_IN_PROGRESS409A concurrent request with the same idempotency key is actively being processed.
INVALID_STATUS_TRANSITION409The case is not in a valid state for execution (e.g., already confirmed, failed, or active).
EXECUTION_BLOCKED409Execution is prevented by unresolved prerequisites or security lockouts.
ZAPIER_EXECUTION_DISABLED403Server feature flag has disabled execution requests via the Zapier integration.
ENTITLEMENT_REQUIRED402 / 403Caller account lacks the active subscription tier required for API-initiated execution.
RATE_LIMIT_EXCEEDED429Request quota exceeded. Inspect the Retry-After header for wait duration.
INTERNAL_ERROR500Transient server error. Safe to retry with exponential backoff.

14. Privacy & PII Safeguards

Free Trial Terminator maintains strict perimeter privacy boundaries. All Zapier payloads, event emissions, and webhook envelopes utilize explicit schema allowlists:

  • Never Exposed: User passwords, banking credentials, full credit card numbers, CVVs, raw provider session cookies, raw conversational chat transcripts, or prompt history.
  • Internal Engine Redaction: Internal Provider Intelligence heuristic formulas, private anti-bot evasion techniques, and raw scraping telemetry are strictly excluded from all Zapier responses.
  • Safe Delivery Payloads: Webhook envelopes and status responses provide only authorized identifiers (case_id, provider_id), canonical state enum strings, high-level outcome reasons, and verified evidence URLs.

15. Limitations & Governance Statement

Accurate Representation Notice

Free Trial Terminator provides complete repository-supported technical implementation of Zapier actions, triggers, webhook subscriptions, and authentication protocols. However:

  • Repository-controlled completion: actions, triggers, authentication, webhook subscriptions, retry and idempotency behaviour and this documentation are implemented and verified by repository test contracts, and are reproduced by the Extended publication gate.
  • Marketplace review (external): this integration is not published in the public Zapier App Directory and has not received third-party partner certification or listing approval. Submission, review and approval remain external and pending.
  • Live external validation (external): no real Zap has been created or run against live Zapier staging for this release, so end-to-end live validation remains pending outside this repository.
  • No OAuth 2.0 public authorization flow is provided; all connections use developer-managed, scoped API keys.
  • Live production self-serve deployment validation requires operational deployment sign-off outside this repository codebase, and the Zapier execution action stays disabled until the execution flag is explicitly enabled for an environment.

Documentation version e15d-z01.v1 against contract version 2026-10-11.c15b-z01.v1. Last updated October 16, 2026.