openapi: 3.1.0 info: title: Stay AI Account Webhooks API version: '2.0' description: Documented public REST API for Stay AI (formerly Retextion), a subscription retention and growth platform for Shopify DTC brands. All endpoints are authenticated with an API key sent in the X-RETEXTION-ACCESS-TOKEN header. Paths, methods, and query/path parameters are taken from the Stay AI developer documentation at https://docs.stay.ai; request and response body schemas are simplified representations - consult the live reference for full payload details. contact: name: Stay AI url: https://docs.stay.ai servers: - url: https://api.retextion.com/api/v2 security: - accessToken: [] tags: - name: Webhooks paths: /webhooks: get: operationId: get-webhook-subscriptions summary: Get Webhook Subscriptions tags: - Webhooks responses: '200': description: A list of webhook subscriptions post: operationId: create-webhook-subscription summary: Create Webhook Subscription tags: - Webhooks requestBody: content: application/json: schema: type: object required: - event - url properties: event: type: string description: Event type to subscribe to, e.g. SUBSCRIPTION, FAILED_PAYMENT, SUCCESSFUL_PAYMENT. url: type: string description: Destination URL for webhook delivery responses: '200': description: Webhook subscription created /webhooks/{webhookId}: delete: operationId: delete-webhook-subscription summary: Delete Webhook Subscription tags: - Webhooks parameters: - name: webhookId in: path required: true schema: type: string responses: '200': description: Webhook subscription deleted components: securitySchemes: accessToken: type: apiKey in: header name: X-RETEXTION-ACCESS-TOKEN