{
  "opencollection": "1.0.0",
  "info": {
    "name": "Event Subscriptions API",
    "version": "3.0.0"
  },
  "items": [
    {
      "info": {
        "name": "Connections",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List connections",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/connections",
            "params": [
              {
                "name": "connection_type",
                "value": "",
                "type": "query",
                "description": "Filter by connection type."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Retrieve all connections for the authenticated user's organization."
        },
        {
          "info": {
            "name": "Create a connection",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/connections",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Create a new connection to an external endpoint where event notifications will be delivered."
        },
        {
          "info": {
            "name": "Get a connection",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/connections/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the connection."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Retrieve a specific connection by its id."
        },
        {
          "info": {
            "name": "Update a connection",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/connections/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the connection."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Update an existing connection by its id. Only the fields provided in the request body will be updated."
        },
        {
          "info": {
            "name": "Delete a connection",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/connections/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the connection."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Delete a specific connection by its id. Any subscriptions associated with this connection will also be deleted."
        }
      ]
    },
    {
      "info": {
        "name": "OAuth2",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Start OAuth2 authorization",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/connections/:id/authorization",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the connection to authorize."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Initiate the OAuth2 authorization flow for a connection that requires it (e.g., Klaviyo). Returns an authorization URL to redirect the user to."
        }
      ]
    },
    {
      "info": {
        "name": "Subscriptions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List subscriptions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/subscriptions",
            "params": [
              {
                "name": "event_type",
                "value": "",
                "type": "query",
                "description": "Filter by event type."
              },
              {
                "name": "is_active",
                "value": "",
                "type": "query",
                "description": "Filter by active status."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Retrieve all subscriptions for the authenticated user's organization."
        },
        {
          "info": {
            "name": "Create a subscription",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/subscriptions",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Create a new subscription that routes events of a specific type to a connection."
        },
        {
          "info": {
            "name": "Get a subscription",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/subscriptions/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the subscription."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Retrieve a specific subscription by its id."
        },
        {
          "info": {
            "name": "Update a subscription",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/subscriptions/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the subscription."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Update an existing subscription by its id. Only the fields provided in the request body will be updated."
        },
        {
          "info": {
            "name": "Delete a subscription",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/subscriptions/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the subscription."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Delete a specific subscription by its id. Event delivery for this subscription will stop immediately."
        }
      ]
    },
    {
      "info": {
        "name": "Broadcast",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Broadcast test event",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://panel.sendcloud.sc/api/v3/event-subscriptions/broadcast/test/:subscription_id",
            "params": [
              {
                "name": "subscription_id",
                "value": "",
                "type": "path",
                "description": "The id of the subscription to send a test event to."
              }
            ],
            "auth": {
              "type": "basic",
              "username": "{{username}}",
              "password": "{{password}}"
            }
          },
          "docs": "Send a test event to the connection endpoint configured for a specific subscription. Use this to verify that your connection is set up correctly before relying on it for production events."
        }
      ]
    }
  ],
  "bundled": true
}