{"openapi":"3.1.0","info":{"title":"PushFire HTTP API","summary":"Register devices, identify subscribers, tag audiences, execute workflows, and send batch push or email.","description":"All request bodies wrap fields in a `data` object. Authenticate with a project key from Console → Developers → API keys: a public key (pf_pk_) in apps, a secret key (pf_sk_) on servers. Base URL is the Edge Functions origin under /functions/v1. Every error has the body `{ error, errors: [{ code, message, path? }] }`; branch on `code`.","version":"1.1.0","contact":{"name":"Flywheel Studio","email":"hello@flywheel.so","url":"https://www.pushfire.app/docs/guides/console-support"},"license":{"name":"Proprietary","identifier":"LicenseRef-PushFire"}},"externalDocs":{"description":"PushFire REST API (human-readable)","url":"https://www.pushfire.app/docs/guides/developers-api-reference"},"servers":[{"url":"https://api.pushfire.app/functions/v1","description":"Production Edge Functions"}],"tags":[{"name":"Devices","description":"FCM tokens attached to subscribers"},{"name":"Subscribers","description":"End users inside a project"},{"name":"Tags","description":"Labels used for segments and targeting"},{"name":"Workflows","description":"Visual automation executions"},{"name":"Messaging","description":"Batch push and email without a workflow graph"},{"name":"Flagged","description":"Endpoints behind a per-project flag. They are off by default; PushFire turns them on for a project on request."}],"security":[{"bearerAuth":[]}],"paths":{"/register-device":{"post":{"operationId":"registerDevice","tags":["Devices"],"summary":"Register a device","description":"Register an FCM token and create an anonymous subscriber. A repeat registration of the same token in the same project returns 200 with the same deviceId and subscriberId and refreshes the device fields (os, versions, manufacturer, model, language, pushNotificationEnabled).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDeviceRequest"}}}},"responses":{"200":{"description":"Device registered, or the existing device in this project refreshed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDeviceResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/update-device":{"put":{"operationId":"replaceDevice","tags":["Devices"],"summary":"Replace a device","description":"Full update of an existing device. `id` is the device UUID returned at registration. Send every key of register-device; the five nullable keys may be null.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceDeviceRequest"}}}},"responses":{"200":{"description":"Device updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: device_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"device_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"409":{"description":"Another device in this project already has this FCM token (device_token_exists)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Another device in this project already has this FCM token","errors":[{"code":"device_token_exists","message":"Another device in this project already has this FCM token"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}},"patch":{"operationId":"patchDevice","tags":["Devices"],"summary":"Patch a device","description":"Partial update of an existing device. Send `id` and only the fields that change.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchDeviceRequest"}}}},"responses":{"200":{"description":"Device updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: device_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"device_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"409":{"description":"Another device in this project already has this FCM token (device_token_exists)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Another device in this project already has this FCM token","errors":[{"code":"device_token_exists","message":"Another device in this project already has this FCM token"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/delete-device":{"delete":{"operationId":"deleteDevice","tags":["Devices"],"summary":"Delete a device","description":"Delete one device by deviceId or fcmToken (exactly one). The subscriber stays. POST works too, for HTTP clients that drop the body of a DELETE. Secret key (pf_sk_) only, with the devices:delete scope; legacy keys are refused. After this call the app must reset the SDK: its cached device id is gone.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDeviceRequest"}}}},"responses":{"200":{"description":"Device deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDeviceResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"Secret keys (pf_sk_) only. A public key gets public_ceiling, a legacy key (no pf_ prefix) gets legacy_key_not_allowed, and a key without the scope gets scope_denied. A secret key created before this endpoint shipped can lack the scope: create a new secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Legacy API keys cannot use this endpoint","errors":[{"code":"legacy_key_not_allowed","message":"Legacy API keys cannot use this endpoint"}]}}}},"404":{"description":"Not found: device_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"device_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/login-subscriber":{"post":{"operationId":"loginSubscriber","tags":["Subscribers"],"summary":"Login a subscriber","description":"Replace the anonymous subscriber on a device with an identified subscriber keyed by externalId. login-subscriber ignores metadata; set it with update-subscriber.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginSubscriberRequest"}}}},"responses":{"200":{"description":"Subscriber login succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberIdResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/get-subscriber":{"get":{"operationId":"getSubscriber","tags":["Subscribers"],"summary":"Get a subscriber","description":"Read one subscriber with its devices (without FCM tokens), tags and metadata. Send exactly one of the query parameters subscriberId or externalId. Secret key (pf_sk_) only, with the subscribers:read scope; legacy keys are refused.","parameters":[{"name":"subscriberId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"externalId","in":"query","required":false,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"The subscriber","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubscriberResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"Secret keys (pf_sk_) only. A public key gets public_ceiling, a legacy key (no pf_ prefix) gets legacy_key_not_allowed, and a key without the scope gets scope_denied. A secret key created before this endpoint shipped can lack the scope: create a new secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Legacy API keys cannot use this endpoint","errors":[{"code":"legacy_key_not_allowed","message":"Legacy API keys cannot use this endpoint"}]}}}},"404":{"description":"Not found: subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"subscriber_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/create-subscriber":{"post":{"operationId":"createSubscriber","tags":["Subscribers"],"summary":"Create a subscriber","description":"Create a subscriber without a device, keyed by externalId. Idempotent: 201 when created, 200 when the externalId already exists (the fields you send update it). Secret key (pf_sk_) only: a public key gets public_ceiling, although login-subscriber accepts one. Legacy keys are refused.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriberRequest"}}}},"responses":{"200":{"description":"Subscriber already existed; the given fields updated it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriberResponse"}}}},"201":{"description":"Subscriber created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriberResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"Secret keys (pf_sk_) only. A public key gets public_ceiling, a legacy key (no pf_ prefix) gets legacy_key_not_allowed, and a key without the scope gets scope_denied. A secret key created before this endpoint shipped can lack the scope: create a new secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Legacy API keys cannot use this endpoint","errors":[{"code":"legacy_key_not_allowed","message":"Legacy API keys cannot use this endpoint"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/update-subscriber":{"put":{"operationId":"replaceSubscriber","tags":["Subscribers"],"summary":"Replace a subscriber","description":"Full update of a subscriber profile. Send every key: id, externalId, name, email and phone. id, externalId, email and phone may be null. id or externalId must find the subscriber; when you send both, they must match the same one.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceSubscriberRequest"}}}},"responses":{"200":{"description":"Subscriber updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberIdResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"subscriber_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}},"patch":{"operationId":"patchSubscriber","tags":["Subscribers"],"summary":"Patch a subscriber","description":"Partial update. Send id or externalId to find the subscriber, and only the fields that change.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSubscriberRequest"}}}},"responses":{"200":{"description":"Subscriber updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberIdResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"subscriber_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/logout-subscriber":{"post":{"operationId":"logoutSubscriber","tags":["Subscribers"],"summary":"Logout a subscriber","description":"Detach the identified subscriber and recreate an anonymous subscriber for the device. Send exactly one of subscriberId or externalId.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoutSubscriberRequest"}}}},"responses":{"200":{"description":"Subscriber logout succeeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberIdResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: subscriber_not_found, subscriber_device_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"subscriber_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/delete-subscriber":{"delete":{"operationId":"deleteSubscriber","tags":["Subscribers"],"summary":"Erase a subscriber","description":"Erase a subscriber (GDPR): personal data, tags, segment memberships, metadata, message history, queued messages and workflow executions. Its devices stay, each on a new anonymous subscriber. POST works too. Send exactly one of subscriberId or externalId. Secret key (pf_sk_) only, with the subscribers:erase scope; legacy keys are refused.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscriberRequest"}}}},"responses":{"200":{"description":"Subscriber erased","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscriberResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"Secret keys (pf_sk_) only. A public key gets public_ceiling, a legacy key (no pf_ prefix) gets legacy_key_not_allowed, and a key without the scope gets scope_denied. A secret key created before this endpoint shipped can lack the scope: create a new secret key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Legacy API keys cannot use this endpoint","errors":[{"code":"legacy_key_not_allowed","message":"Legacy API keys cannot use this endpoint"}]}}}},"404":{"description":"Not found: subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"subscriber_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/add-subscriber-tag":{"post":{"operationId":"addSubscriberTag","tags":["Tags"],"summary":"Add or set a subscriber tag","description":"Attach a tag and its value to a subscriber. This is an upsert: when the subscriber already has the tag, the call returns 200 and overwrites the value. PUT works the same. Send exactly one of subscriberId or externalId. Send exactly one of tagId or tagKey.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberTagRequest"}}}},"responses":{"200":{"description":"Subscriber tag added or its value replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: tag_not_found, subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"tag_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}},"put":{"operationId":"putSubscriberTag","tags":["Tags"],"summary":"Add or set a subscriber tag (PUT)","description":"Same as POST /add-subscriber-tag: an upsert of the tag value.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberTagRequest"}}}},"responses":{"200":{"description":"Subscriber tag added or its value replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: tag_not_found, subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"tag_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/update-subscriber-tag":{"patch":{"operationId":"patchSubscriberTag","tags":["Tags"],"summary":"Update a subscriber tag value","description":"Change the value of a tag already on the subscriber. Send exactly one of subscriberId or externalId. Send exactly one of tagId or tagKey.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriberTagRequest"}}}},"responses":{"200":{"description":"Subscriber tag updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: tag_not_found, subscriber_not_found, subscriber_tag_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"tag_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/remove-subscriber-tag":{"delete":{"operationId":"removeSubscriberTag","tags":["Tags"],"summary":"Remove a subscriber tag","description":"Remove a tag from a subscriber. This DELETE has a JSON body. Send exactly one of subscriberId or externalId. Send exactly one of tagId or tagKey.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveSubscriberTagRequest"}}}},"responses":{"200":{"description":"Subscriber tag removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A custom key without the scope for this action gets scope_denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"API key does not have the required scope","errors":[{"code":"scope_denied","message":"API key does not have the required scope"}]}}}},"404":{"description":"Not found: tag_not_found, subscriber_not_found, subscriber_tag_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"tag_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/create-workflow-execution":{"post":{"operationId":"createWorkflowExecution","tags":["Workflows"],"summary":"Create a workflow execution","description":"Run a workflow immediately or schedule it. Target subscribers or segments by UUID. `scheduledFor` is required when type is Scheduled. Secret key (pf_sk_) only: call it from a server.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowExecutionRequest"}}}},"responses":{"200":{"description":"Workflow execution created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A public key (pf_pk_) gets public_ceiling; a custom key without the scope gets scope_denied. Call this endpoint from a server with a secret key (pf_sk_).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Client key cannot perform this action","errors":[{"code":"public_ceiling","message":"Client key cannot perform this action"}]}}}},"404":{"description":"Not found: workflow_not_found, not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"workflow_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"409":{"description":"The workflow is off or has no published version (workflow_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"The workflow is off or has no published version","errors":[{"code":"workflow_inactive","message":"The workflow is off or has no published version"}]}}}},"422":{"description":"A value breaks a data rule: constraint_violation, missing_required_field or value_too_long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"A value breaks a data rule","errors":[{"code":"constraint_violation","message":"A value breaks a data rule"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/send-batch-push-notifications":{"post":{"operationId":"sendBatchPushNotifications","tags":["Messaging"],"summary":"Send batch push notifications","description":"Queue a push notification for each subscriberExternalId independently. A valid body returns 200 with the success and errors arrays, also when every subscriber fails (for example, no device that can receive a push). Then success is empty and errors gives the reason per subscriber. 400 means the body failed validation. Secret key (pf_sk_) only: call it from a server.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBatchPushRequest"}}}},"responses":{"200":{"description":"Body accepted. success lists the queued notifications and errors lists each subscriber that failed; success can be empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchMessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A public key (pf_pk_) gets public_ceiling; a custom key without the scope gets scope_denied. Call this endpoint from a server with a secret key (pf_sk_).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Client key cannot perform this action","errors":[{"code":"public_ceiling","message":"Client key cannot perform this action"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/send-batch-email-notifications":{"post":{"operationId":"sendBatchEmailNotifications","tags":["Messaging"],"summary":"Send batch email notifications","description":"Queue an HTML email for each subscriberExternalId independently. Requires an active email connector and a sender on it; a layout is optional and must be published. Body must be valid HTML without scripts, iframes, or event handlers. A valid body returns 200 with the success and errors arrays, also when every subscriber fails (for example, no email address). Then success is empty and errors gives the reason per subscriber. 400 means the body failed validation. Secret key (pf_sk_) only: call it from a server.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBatchEmailRequest"}}}},"responses":{"200":{"description":"Body accepted. success lists the queued emails and errors lists each subscriber that failed; success can be empty","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchMessageResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"A public key (pf_pk_) gets public_ceiling; a custom key without the scope gets scope_denied. Call this endpoint from a server with a secret key (pf_sk_).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Client key cannot perform this action","errors":[{"code":"public_ceiling","message":"Client key cannot perform this action"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/track-event":{"post":{"operationId":"trackEvent","tags":["Flagged"],"summary":"Track an event","description":"Record an event on a subscriber and start every active Event workflow whose eventName matches. A repeat eventId returns 200 with duplicate: true and starts nothing. Send exactly one of subscriberId or externalId. Secret key (pf_sk_) only, with the subscriber_events:create scope; secret keys created before it shipped lack it. Behind a per-project flag, on request: ask PushFire support to turn it on for your project. While the flag is off the endpoint returns 403 feature_disabled.","x-pushfire-feature-flag":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEventRequest"}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEventResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"feature_disabled while the per-project flag is off (the default). A public key gets public_ceiling; a secret key without the scope gets scope_denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"This feature is not enabled for this project","errors":[{"code":"feature_disabled","message":"This feature is not enabled for this project"}]}}}},"404":{"description":"Not found: subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"subscriber_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/set-subscriber-test":{"post":{"operationId":"setSubscriberTest","tags":["Flagged"],"summary":"Mark a test subscriber","description":"Mark a subscriber as a test subscriber, or clear the mark. Segments leave test subscribers out unless a segment includes them. Send exactly one of subscriberId or externalId. Secret key (pf_sk_) only, with the test_subscribers:edit scope; secret keys created before it shipped lack it. Behind a per-project flag, on request: ask PushFire support to turn it on for your project. While the flag is off the endpoint returns 403 feature_disabled.","x-pushfire-feature-flag":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSubscriberTestRequest"}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSubscriberTestResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"feature_disabled while the per-project flag is off (the default). A public key gets public_ceiling; a secret key without the scope gets scope_denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"This feature is not enabled for this project","errors":[{"code":"feature_disabled","message":"This feature is not enabled for this project"}]}}}},"404":{"description":"Not found: subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"subscriber_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/dry-run-workflow":{"post":{"operationId":"dryRunWorkflow","tags":["Flagged"],"summary":"Dry-run a workflow","description":"Walk a workflow's live version for one subscriber and return every step with its simulated time. It sends nothing and writes nothing; the workflow need not be active. Send exactly one of subscriberId or externalId. Secret key (pf_sk_) only, with the workflow_executions:create scope. Behind a per-project flag, on request: ask PushFire support to turn it on for your project. While the flag is off the endpoint returns 403 feature_disabled.","x-pushfire-feature-flag":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRunWorkflowRequest"}}}},"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRunWorkflowResponse"}}}},"400":{"description":"The body or query failed validation (validation_failed, with path), the body is not JSON (invalid_json), or a value has the wrong format (invalid_input)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"FCM token is required","errors":[{"code":"validation_failed","message":"FCM token is required"}]}}}},"401":{"description":"Missing, malformed, unknown or revoked API key (invalid_or_revoked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Missing or invalid token","errors":[{"code":"invalid_or_revoked","message":"Missing or invalid token"}]}}}},"403":{"description":"feature_disabled while the per-project flag is off (the default). A public key gets public_ceiling; a secret key without the scope gets scope_denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"This feature is not enabled for this project","errors":[{"code":"feature_disabled","message":"This feature is not enabled for this project"}]}}}},"404":{"description":"Not found: workflow_not_found, subscriber_not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Not found","errors":[{"code":"workflow_not_found","message":"Not found"}]}}}},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}}}}},"/revenuecat-webhook":{"post":{"operationId":"revenueCatWebhook","tags":["Flagged"],"summary":"RevenueCat webhook","description":"RevenueCat posts subscription events here; your code does not call it. Set it up in RevenueCat → Integrations → Webhooks with the URL and Authorization header that the RevenueCat connector shows once. It takes the connector secret (pf_rc_), not an API key. Behind a per-project flag, on request: ask PushFire support to turn it on for your project. While the flag is off the webhook returns 503 feature_disabled.","x-pushfire-feature-flag":true,"security":[{"revenueCatConnectorSecret":[]}],"parameters":[{"name":"connector","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"RevenueCat webhook payload, at most 64 KB"}}}},"responses":{"200":{"description":"Event stored, or a repeat event id (duplicate: true)"},"401":{"description":"Unknown or inactive connector, or wrong secret"},"405":{"description":"The function does not serve this HTTP method (method_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Method not allowed","errors":[{"code":"method_not_allowed","message":"Method not allowed"}]}}}},"413":{"description":"Body larger than 64 KB"},"500":{"description":"Our fault (internal_error). Retry later; report it if it continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"Internal server error","errors":[{"code":"internal_error","message":"Internal server error"}]}}}},"503":{"description":"The project flag is off (feature_disabled)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":"This feature is not enabled for this project","errors":[{"code":"feature_disabled","message":"This feature is not enabled for this project"}]}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Project key from Console → Developers → API keys. A public key (pf_pk_...) may call register-device, update-device, login-subscriber, update-subscriber, logout-subscriber and the three tag endpoints; it belongs in client apps. A secret key (pf_sk_...) stays on a server. Each endpoint needs its own scope; get-subscriber, create-subscriber, delete-subscriber, delete-device and the flagged endpoints take secret keys only. A secret key created before an endpoint shipped can lack its scope and gets 403 scope_denied: create a new secret key. Legacy project keys (no pf_ prefix) keep working until 2027-11-16 unless revoked, except on get-subscriber, create-subscriber, delete-subscriber and delete-device, which return 403 legacy_key_not_allowed."},"revenueCatConnectorSecret":{"type":"http","scheme":"bearer","description":"RevenueCat connector secret (pf_rc_...), shown once when the connector is created. Only revenuecat-webhook takes it."}},"schemas":{"ErrorEnvelope":{"type":"object","required":["error","errors"],"description":"Every API error has this body. Branch on errors[].code: it is stable. message is English text for people and can change. error repeats the first message for clients that read one string.","properties":{"error":{"type":"string","description":"The first entry’s message"},"errors":{"type":"array","minItems":1,"items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["validation_failed","invalid_json","invalid_input","bad_request","missing_params","invalid_or_revoked","unauthorized","public_ceiling","scope_denied","legacy_key_not_allowed","feature_disabled","forbidden","not_found","subscriber_not_found","device_not_found","subscriber_device_not_found","tag_not_found","subscriber_tag_not_found","workflow_not_found","related_resource_not_found","method_not_allowed","conflict","device_token_exists","workflow_inactive","resource_in_use","unprocessable","constraint_violation","missing_required_field","value_too_long","internal_error"],"description":"Stable error code. Full list: pushfire-backend docs/API_ERRORS.md"},"message":{"type":"string"},"path":{"type":"string","description":"Only on validation_failed: the invalid field, e.g. data.fcmToken"}}}}}},"MessageResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"SubscriberIdResponse":{"type":"object","required":["message","subscriberId"],"properties":{"message":{"type":"string"},"subscriberId":{"type":"string","format":"uuid"}}},"RegisterDeviceRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["fcmToken","os","pushNotificationEnabled","osVersion","appVersion","manufacturer","model","language"],"properties":{"fcmToken":{"type":"string","minLength":1},"os":{"type":"string","enum":["ios","android","web","desktop","other"]},"pushNotificationEnabled":{"type":"boolean"},"osVersion":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"appVersion":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"manufacturer":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"model":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"language":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."}}}}},"RegisterDeviceResponse":{"type":"object","required":["message","deviceId","subscriberId"],"properties":{"message":{"type":"string"},"deviceId":{"type":"string","format":"uuid"},"subscriberId":{"type":"string","format":"uuid"}}},"ReplaceDeviceRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id","fcmToken","os","pushNotificationEnabled","osVersion","appVersion","manufacturer","model","language"],"properties":{"id":{"type":"string","format":"uuid"},"fcmToken":{"type":"string","minLength":1},"os":{"type":"string","enum":["ios","android","web","desktop","other"]},"pushNotificationEnabled":{"type":"boolean"},"osVersion":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"appVersion":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"manufacturer":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"model":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"language":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."}}}}},"PatchDeviceRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"},"fcmToken":{"type":"string","minLength":1},"os":{"type":"string","enum":["ios","android","web","desktop","other"]},"pushNotificationEnabled":{"type":"boolean"},"osVersion":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"appVersion":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"manufacturer":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"model":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."},"language":{"type":["string","null"],"minLength":1,"description":"Required key. Send null when unknown; a string must not be empty."}}}}},"DeleteDeviceRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"deviceId":{"type":"string","format":"uuid"},"fcmToken":{"type":"string","minLength":1}},"oneOf":[{"required":["deviceId"]},{"required":["fcmToken"]}]}}},"DeleteDeviceResponse":{"type":"object","required":["message","deviceId","subscriberId"],"properties":{"message":{"type":"string"},"deviceId":{"type":"string","format":"uuid"},"subscriberId":{"type":["string","null"],"format":"uuid"}}},"LoginSubscriberRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["deviceId","externalId"],"properties":{"deviceId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"},"name":{"type":["string","null"],"minLength":1},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"],"minLength":8},"timezone":{"type":["string","null"],"description":"IANA timezone name, e.g. America/New_York. An empty string clears it."}}}}},"GetSubscriberResponse":{"type":"object","required":["subscriber"],"properties":{"subscriber":{"type":"object","properties":{"subscriberId":{"type":"string","format":"uuid"},"externalId":{"type":["string","null"]},"email":{"type":["string","null"]},"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"timezone":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":true,"description":"Arbitrary JSON (strings, numbers, booleans, nested objects)"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"lastActiveAt":{"type":["string","null"],"format":"date-time"},"devices":{"type":"array","description":"The devices, without FCM tokens","items":{"type":"object","additionalProperties":true}},"tags":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","format":"uuid"},"tagKey":{"type":"string"},"name":{"type":"string"},"value":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"}}}}}}}},"CreateSubscriberRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["externalId"],"properties":{"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"},"email":{"type":["string","null"],"format":"email"},"name":{"type":["string","null"],"minLength":1},"phone":{"type":["string","null"],"minLength":8},"timezone":{"type":["string","null"],"description":"IANA timezone name, e.g. America/New_York. An empty string clears it."},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON (strings, numbers, booleans, nested objects)"}}}}},"CreateSubscriberResponse":{"type":"object","required":["message","subscriberId","created"],"properties":{"message":{"type":"string"},"subscriberId":{"type":"string","format":"uuid"},"created":{"type":"boolean","description":"true with 201, false with 200"}}},"ReplaceSubscriberRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id","externalId","name","email","phone"],"properties":{"id":{"type":["string","null"],"format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"},{"type":"null"}],"description":"Your app's user identifier"},"name":{"type":"string","minLength":1},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"],"minLength":8},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON (strings, numbers, booleans, nested objects)"},"timezone":{"type":["string","null"],"description":"IANA timezone name, e.g. America/New_York. An empty string clears it."}}}}},"PatchSubscriberRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"id":{"type":["string","null"],"format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"},{"type":"null"}],"description":"Your app's user identifier"},"name":{"type":"string","minLength":1},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"],"minLength":8},"metadata":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON (strings, numbers, booleans, nested objects)"},"timezone":{"type":["string","null"],"description":"IANA timezone name, e.g. America/New_York. An empty string clears it."}},"anyOf":[{"required":["id"]},{"required":["externalId"]}]}}},"LogoutSubscriberRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["deviceId"],"properties":{"deviceId":{"type":"string","format":"uuid"},"subscriberId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"}},"oneOf":[{"required":["subscriberId"]},{"required":["externalId"]}]}}},"DeleteSubscriberRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"subscriberId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"}},"oneOf":[{"required":["subscriberId"]},{"required":["externalId"]}]}}},"DeleteSubscriberResponse":{"type":"object","required":["message","subscriberId"],"properties":{"message":{"type":"string"},"subscriberId":{"type":"string","format":"uuid"},"devicesReassigned":{"type":"integer","description":"Devices moved to a new anonymous subscriber each, not deleted"},"deleted":{"type":"object","additionalProperties":{"type":"integer"},"description":"Rows erased, per kind"}}},"SubscriberTagRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["value"],"properties":{"subscriberId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"},"tagId":{"type":"string","format":"uuid"},"tagKey":{"type":"string","minLength":1,"maxLength":64,"description":"Tag key, e.g. paid_plan. PushFire makes it from the tag name; a rename keeps the key."},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}]}},"allOf":[{"oneOf":[{"required":["subscriberId"]},{"required":["externalId"]}]},{"oneOf":[{"required":["tagId"]},{"required":["tagKey"]}]}]}}},"RemoveSubscriberTagRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"subscriberId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"},"tagId":{"type":"string","format":"uuid"},"tagKey":{"type":"string","minLength":1,"maxLength":64,"description":"Tag key, e.g. paid_plan. PushFire makes it from the tag name; a rename keeps the key."}},"allOf":[{"oneOf":[{"required":["subscriberId"]},{"required":["externalId"]}]},{"oneOf":[{"required":["tagId"]},{"required":["tagKey"]}]}]}}},"CreateWorkflowExecutionRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["workflowId","type","target"],"properties":{"workflowId":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["Immediate","Scheduled"]},"scheduledFor":{"type":"string","format":"date-time","description":"Required when type is Scheduled"},"target":{"type":"object","required":["type","values"],"properties":{"type":{"type":"string","enum":["Subscribers","Segments"]},"values":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}}}}}}},"SendBatchPushRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["subscriberExternalIds","notification"],"properties":{"subscriberExternalIds":{"type":"array","items":{"type":"string"},"minItems":1},"notification":{"type":"object","required":["title","description"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"data":{"type":"object","additionalProperties":true,"description":"Arbitrary JSON (strings, numbers, booleans, nested objects)"}}}}}}},"SendBatchEmailRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["subscriberExternalIds","notification"],"properties":{"subscriberExternalIds":{"type":"array","items":{"type":"string"},"minItems":1},"notification":{"type":"object","required":["connectorId","connectorSenderId","subject","body"],"properties":{"connectorId":{"type":"string","format":"uuid","description":"Email connector UUID"},"connectorSenderId":{"type":"string","format":"uuid","description":"Sender UUID on that connector"},"emailLayoutId":{"type":"string","format":"uuid","description":"Optional published layout UUID"},"subject":{"type":"string"},"body":{"type":"string","description":"HTML body without scripts, iframes, or event handlers"}}},"mergeData":{"type":"object","additionalProperties":true,"description":"Values for {{token}} placeholders that the built-in subscriber fields do not cover"}}}}},"BatchMessageResponse":{"type":"object","required":["message","success","errors"],"properties":{"message":{"type":"string"},"success":{"type":"array","items":{"type":"object","required":["subscriberExternalId","message"],"properties":{"subscriberExternalId":{"type":"string"},"message":{"type":"string"}}}},"errors":{"type":"array","items":{"type":"object","required":["subscriberExternalId","error"],"properties":{"subscriberExternalId":{"type":"string"},"error":{"type":"string","description":"English text for people"},"code":{"type":"string","description":"Stable code: subscriber_not_found, no_push_device, no_email_address. When the whole call fails, every item carries that error's code instead.","examples":["subscriber_not_found","no_push_device","no_email_address"]},"message":{"type":"string","description":"Same text as error"}}}}}},"TrackEventRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["name"],"properties":{"subscriberId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"},"name":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,100}$"},"properties":{"type":"object","additionalProperties":true,"description":"At most 8 KB of JSON"},"eventId":{"type":"string","minLength":1,"maxLength":255,"description":"Idempotency key, unique per project"}},"oneOf":[{"required":["subscriberId"]},{"required":["externalId"]}]}}},"TrackEventResponse":{"type":"object","properties":{"duplicate":{"type":"boolean"},"eventId":{"type":["string","null"]},"subscriberId":{"type":"string","format":"uuid"},"startedWorkflowIds":{"type":"array","items":{"type":"string","format":"uuid"}},"skippedWorkflowIds":{"type":"array","items":{"type":"string","format":"uuid"}},"failedWorkflows":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"SetSubscriberTestRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["isTest"],"properties":{"subscriberId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"},"isTest":{"type":"boolean"}},"oneOf":[{"required":["subscriberId"]},{"required":["externalId"]}]}}},"SetSubscriberTestResponse":{"type":"object","required":["subscriberId","isTest"],"properties":{"subscriberId":{"type":"string","format":"uuid"},"isTest":{"type":"boolean"}}},"DryRunWorkflowRequest":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["workflowId"],"properties":{"subscriberId":{"type":"string","format":"uuid"},"externalId":{"oneOf":[{"type":"string","minLength":1},{"type":"number"}],"description":"Your app's user identifier"},"workflowId":{"type":"string","format":"uuid"}},"oneOf":[{"required":["subscriberId"]},{"required":["externalId"]}]}}},"DryRunWorkflowResponse":{"type":"object","additionalProperties":true,"description":"Every step the engine would run, with its simulated time. Nothing is sent or written."}}}}