arazzo: 1.0.1 info: title: Svix Rotate Integration Key summary: Rotate an integration's API key and read back the new key value. description: >- Integration keys grant scoped access to manage an application's webhook configuration and should be rotated when compromised or on a schedule. This workflow confirms the integration exists, rotates its key, and reads the new key back so it can be redistributed. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: svixApi url: ../openapi/svix-openapi.json type: openapi workflows: - workflowId: rotate-integration-key summary: Rotate an integration API key and return the new value. description: >- Verifies the integration, rotates its API key, then reads the current key back for redistribution. inputs: type: object required: - appId - integrationId properties: appId: type: string description: The id or uid of the application owning the integration. integrationId: type: string description: The id of the integration whose key is rotated. steps: - stepId: getIntegration description: >- Confirm the integration exists before rotating its key. Returns 200 with the integration object. operationId: v1.integration.get parameters: - name: app_id in: path value: $inputs.appId - name: integ_id in: path value: $inputs.integrationId successCriteria: - condition: $statusCode == 200 outputs: integrationId: $response.body#/id - stepId: rotateKey description: >- Rotate the integration's API key. Returns 200 with the newly generated key. operationId: v1.integration.rotate-key parameters: - name: app_id in: path value: $inputs.appId - name: integ_id in: path value: $steps.getIntegration.outputs.integrationId successCriteria: - condition: $statusCode == 200 outputs: rotatedKey: $response.body#/key - stepId: getKey description: >- Read the integration's current key back to confirm the rotated value. Returns 200 with the key. operationId: v1.integration.get-key parameters: - name: app_id in: path value: $inputs.appId - name: integ_id in: path value: $steps.getIntegration.outputs.integrationId successCriteria: - condition: $statusCode == 200 outputs: integrationKey: $response.body#/key outputs: integrationId: $steps.getIntegration.outputs.integrationId integrationKey: $steps.getKey.outputs.integrationKey