arazzo: 1.0.1 info: title: Convoy Broadcast Event and Track summary: Broadcast an event to all matching subscriptions and trace the resulting event. description: >- Convoy can broadcast a single event to every subscription matching an event type without addressing a specific endpoint. This flow creates a broadcast event, lists recent events filtered by the broadcast event type to locate the generated event, and retrieves that event to confirm its status and fan-out endpoints. 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: convoyApi url: ../openapi/convoy-openapi.yml type: openapi workflows: - workflowId: broadcast-event-and-track summary: Broadcast an event, find it in the event list, and retrieve its detail. description: >- Creates a broadcast event for an event type, lists recent events to locate the generated event, and retrieves that event to confirm its status and the endpoints it fanned out to. inputs: type: object required: - apiKey - projectID - eventType - eventData properties: apiKey: type: string description: Convoy API key used as the Bearer token on the Authorization header. projectID: type: string description: The Convoy project identifier. eventType: type: string description: Event type the broadcast targets (e.g. invoice.paid). eventData: type: object description: Arbitrary JSON payload sent as the webhook body. steps: - stepId: broadcastEvent description: >- Create a broadcast event that is dispatched to every subscription matching the event type. operationId: CreateBroadcastEvent parameters: - name: Authorization in: header value: Bearer $inputs.apiKey - name: projectID in: path value: $inputs.projectID requestBody: contentType: application/json payload: event_type: $inputs.eventType data: $inputs.eventData successCriteria: - condition: $statusCode == 201 outputs: message: $response.body#/message - stepId: findEvent description: >- List recent events for the project to locate the event generated by the broadcast. operationId: GetEventsPaged parameters: - name: Authorization in: header value: Bearer $inputs.apiKey - name: projectID in: path value: $inputs.projectID - name: perPage in: query value: 20 - name: sort in: query value: DESC successCriteria: - condition: $statusCode == 200 outputs: eventId: $response.body#/data/content/0/uid - stepId: getEvent description: >- Retrieve the generated event to confirm its status and the endpoints it fanned out to. operationId: GetEndpointEvent parameters: - name: Authorization in: header value: Bearer $inputs.apiKey - name: projectID in: path value: $inputs.projectID - name: eventID in: path value: $steps.findEvent.outputs.eventId successCriteria: - condition: $statusCode == 200 outputs: eventStatus: $response.body#/data/status endpoints: $response.body#/data/endpoints outputs: eventId: $steps.findEvent.outputs.eventId eventStatus: $steps.getEvent.outputs.eventStatus