{
  "opencollection": "1.0.0",
  "info": {
    "name": "SuprSend Broadcast Event API",
    "version": "1.2.2"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "Authorization",
      "value": "{{Authorization}}",
      "placement": "header"
    }
  },
  "items": [
    {
      "info": {
        "name": "Event",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Trigger an Event",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://hub.suprsend.com/event/",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "API to pass an event, which in turn triggers workflows where that event is defined as the trigger."
        },
        {
          "info": {
            "name": "List Events",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://hub.suprsend.com/v1/:workspace/event/",
            "params": [
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "Workspace slug (staging, production, etc.)"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Number of events to return per page (max 100)"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query",
                "description": "Number of events to skip for pagination"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "ServiceToken <token>",
              "value": "{{ServiceToken <token>}}",
              "placement": "header"
            }
          },
          "docs": "Retrieve a list of events in a workspace."
        },
        {
          "info": {
            "name": "Create Event",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://hub.suprsend.com/v1/:workspace/event/",
            "params": [
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "Workspace slug (staging, production, etc.)"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "ServiceToken <token>",
              "value": "{{ServiceToken <token>}}",
              "placement": "header"
            }
          },
          "docs": "Add events and their linked schemas in SuprSend"
        },
        {
          "info": {
            "name": "Get Event Details",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://hub.suprsend.com/v1/:workspace/event/:url_encoded_event_name/",
            "params": [
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "Workspace slug (staging, production, etc.)"
              },
              {
                "name": "url_encoded_event_name",
                "value": "",
                "type": "path",
                "description": "URL encoded event name. Example - `SHIPMENT%20ARRIVED`"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "ServiceToken <token>",
              "value": "{{ServiceToken <token>}}",
              "placement": "header"
            }
          },
          "docs": "Fetch event details and its linked schema."
        },
        {
          "info": {
            "name": "Update Event",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://hub.suprsend.com/v1/:workspace/event/:url_encoded_event_name/",
            "params": [
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "Workspace slug (staging, production, etc.)"
              },
              {
                "name": "url_encoded_event_name",
                "value": "",
                "type": "path",
                "description": "URL encoded event name"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "ServiceToken <token>",
              "value": "{{ServiceToken <token>}}",
              "placement": "header"
            }
          },
          "docs": "Update event description and its linked schema."
        },
        {
          "info": {
            "name": "Get Linked Workflows",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://hub.suprsend.com/v1/:workspace/event/:url_encoded_event_name/linked_workflows/",
            "params": [
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "Workspace slug (staging, production, etc.)"
              },
              {
                "name": "url_encoded_event_name",
                "value": "",
                "type": "path",
                "description": "URL encoded event name. Example - `SHIPMENT%20ARRIVED`"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "ServiceToken <token>",
              "value": "{{ServiceToken <token>}}",
              "placement": "header"
            }
          },
          "docs": "Fetch list of all workflows where this event is used"
        },
        {
          "info": {
            "name": "Delink Schema from Event",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://hub.suprsend.com/v1/:workspace/event/:url_encoded_event_name/delink_schema/",
            "params": [
              {
                "name": "workspace",
                "value": "",
                "type": "path",
                "description": "Workspace slug (staging, production, etc.)"
              },
              {
                "name": "url_encoded_event_name",
                "value": "",
                "type": "path",
                "description": "URL encoded event name. Example - `SHIPMENT%20ARRIVED`"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "ServiceToken <token>",
              "value": "{{ServiceToken <token>}}",
              "placement": "header"
            }
          },
          "docs": "Remove the linked schema from an event, making it schema-less. This allows the event to accept any payload structure without validation against a predefined schema."
        }
      ]
    }
  ],
  "bundled": true
}