Loading...

Quick Start Guide

Create a scoped API key, check cancellation status, and request execution for a case you own.

Before you start

To complete this guide, the caller needs:

  • An FTT account.
  • A case UUID belonging to that account.

API keys must adhere to strict handling rules:

  • Never be shared in chat or support tickets.
  • Be stored in a secret manager.
  • Be transmitted only in the Authorization bearer header.

Get a credential

API keys are generated and managed in the dashboard at API Keys.

To create a credential:

  1. Sign in.
  2. Open the API Keys page.
  3. Enter a key name.
  4. Select the required scopes.
  5. Choose an expiry date.
  6. Create the key.

Verified key management behavior:

  • The default expiry is 90 days.
  • The raw key is displayed once.
  • It must be copied and stored securely.
  • It can be revoked from the same page.
API key scopes and permissions
ScopeAllows
status:readGET /api/status/{case_id}
cancellations:readGET /api/v1/cancellations/{id}/proof
status:writePOST /api/status/{case_id}/execute for requesting execution

We recommend beginning with status:read only.

Environment

  • HTTPS is required.
  • The base URL is https://api.freetrialterminator.com.
  • The status endpoint is /api/status/{case_id} and is not under /api/v1.
  • All snippets must display full URLs assembled from API_ORIGIN.

Step 1 – Check status

To check the status of an existing cancellation case, send an authenticated GET request:

cURL Example

curl -X GET "https://api.freetrialterminator.com/api/status/<CASE_ID>" \
  -H "Authorization: Bearer $FTT_API_KEY" \
  -H "X-Request-Id: $(uuidgen)"

JavaScript Fetch Example

const response = await fetch(`https://api.freetrialterminator.com/api/status/<CASE_ID>`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer $FTT_API_KEY',
    'X-Request-Id': crypto.randomUUID(),
  },
});
const status = await response.json();
Status response fields
FieldDescription
current_stateCanonical cancellation state enum value.
completion_confirmedBoolean indicating provider-side completion confirmation.
reason_for_stateExplanation string describing the current state.
state_updated_atISO 8601 timestamp of last state transition.
at_risk.valueBoolean indicating whether cancellation is at risk.
at_risk.reasonsArray of reasons when the case is flagged at risk.
next_actionPrescribed action when user intervention is required.
last_event.correlation_idCorrelation identifier of the most recent lifecycle event.
contract_versionSchema contract version string.

A verified end-to-end request and response example will be published separately in E15B-04.

Step 2 – Request execution

To request cancellation execution for an owned case, use the bodyless execution endpoint:

  • POST https://api.freetrialterminator.com/api/status/<CASE_ID>/execute
  • Authorization required.
  • Idempotency-Key required.
  • X-Request-Id optional.
  • No request body.
  • No Content-Type header.

cURL Execution Example

curl -X POST "https://api.freetrialterminator.com/api/status/<CASE_ID>/execute" \
  -H "Authorization: Bearer $FTT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "X-Request-Id: $(uuidgen)"

JavaScript Fetch Execution Example

const response = await fetch(`https://api.freetrialterminator.com/api/status/<CASE_ID>/execute`, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer $FTT_API_KEY',
    'Idempotency-Key': crypto.randomUUID(),
    'X-Request-Id': crypto.randomUUID(),
  },
});
const result = await response.json();

Execution rules and idempotency:

  • A non-empty request body is invalid.
  • Generate one idempotency key for one execution intent.
  • Reuse that same key when retrying the same intent.
  • Use a new key only for a genuinely new execution intent.
  • HTTP 200 alone does not prove provider-side completion.
  • Callers must inspect current_state and completion_confirmed.
  • Only current_state: CONFIRMED represents completed cancellation.

This bodyless requirement supersedes the stale body example from the older Week 15A document.

Supported workflow and states

Approved workflow tiers:

  • GUIDE: unauthenticated general guidance with no case access.
  • ASSIST: reads canonical status after verified binding.
  • INITIATE: reads status and requests explicit confirmation without changing state.
  • EXECUTE: submits the canonical execution request with an idempotency key.

ASSIST, INITIATE, and EXECUTE require an FTT-issued HTTPS handoff link valid for no more than 15 minutes.

Passwords and API keys must never be pasted into chat.

Canonical execution states:

CREATEDDETECTEDSCHEDULEDINITIATEDACTION_REQUIREDIN_PROGRESSCONFIRMEDCANCELLEDNO_CANCELLATION_REQUIREDFAILEDDLQINTERRUPTED

  • Only CONFIRMED maps to completed cancellation.
  • ACTION_REQUIRED is non-terminal.
  • When ACTION_REQUIRED is returned, its next_action must be shown to the user.

The channel adapter is staging and experimental. Production channel wiring is unsupported.

Provider limitations

  • FTT execution is separate from provider-controlled completion.
  • Some providers require customer action.
  • Telephone-contact cancellation flows are unsupported.

Errors

API Error Status Codes
HTTP statusRetryable
400No
401No
403No
404No
409No
429Yes
503Yes

Retryable errors are 429 RATE_LIMITED and 503 SERVICE_UNAVAILABLE.

HTTP 403 represents an authorization or required-scope failure.

Next resources

Questions: api@freetrialterminator.com