{
  "info": {
    "_postman_id": "5bae57f5-cb6f-46c8-b846-88d0bb9f2515",
    "name": "Auctria Zapier — Svix API",
    "description": "A Postman collection for the 5 Svix API endpoints used by the Auctria Zapier integration.\n\n## Variables\n\n| Variable | Default | Description |\n|---|---|---|\n| `svix_base_url` | `https://api.us.svix.com` | Svix server region base URL |\n| `application_id` | — | The Svix Application ID (set per-customer) |\n| `integration_key` | — | The Svix integration-level API key (Bearer token) |\n| `endpoint_id` | — | Populated by the Subscribe request test script |\n| `message_id` | — | Populated by the List Messages request test script |\n\n## Auth\n\nAll requests use Bearer token authentication with `{{integration_key}}`.\n\n## Source file\n\nAll API calls correspond to functions in `triggers/receive_event.js`:\n\n| # | Request | receive_event.js lines |\n|---|---|---|\n| 1 | Subscribe (Create Endpoint) | 8–18 (`subscribeHook` POST) |\n| 2 | Get Endpoint Secret | 23–27 (GET secret after subscribe) |\n| 3 | List Messages (Get Sample) | 51–56 (`performList` GET messages) |\n| 4 | Get Message | 65–70 (GET full message by ID) |\n| 5 | Unsubscribe (Delete Endpoint) | 39–44 (`unsubscribeHook` DELETE) |\n\n## Reference\n\nFull Svix API documentation: https://api.svix.com/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Subscribe (Create Endpoint)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "accept",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://hooks.zapier.com/hooks/catch/0000000/0000000/\",\n  \"version\": \"1\",\n  \"rateLimit\": 10,\n  \"filterTypes\": [\"participant.registered\"]\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{svix_base_url}}/api/v1/app/{{application_id}}/endpoint/",
          "host": ["{{svix_base_url}}"],
          "path": ["api", "v1", "app", "{{application_id}}", "endpoint", ""]
        },
        "description": "Creates a Svix endpoint (webhook subscription) for the specified event type.\n\nCorresponds to `receive_event.js` lines 8–18 in the `subscribeHook` function.\n\nThe endpoint URL is the Zapier webhook catch URL. After a successful response, the test script\nstores the returned endpoint ID (`ep_...`) in the `endpoint_id` collection variable."
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "const response = pm.response.json();",
              "if (response.id) {",
              "    pm.collectionVariables.set('endpoint_id', response.id);",
              "    console.log('Saved endpoint_id:', response.id);",
              "}"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "response": [
        {
          "name": "201 Created",
          "status": "Created",
          "code": 201,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"channels\": [],\n  \"createdAt\": \"2026-04-01T18:37:21.615Z\",\n  \"filterTypes\": [\"participant.registered\"],\n  \"id\": \"ep_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n  \"rateLimit\": 10,\n  \"status\": \"active\",\n  \"url\": \"https://hooks.zapier.com/hooks/catch/0000000/0000000/\",\n  \"version\": 1\n}"
        }
      ]
    },
    {
      "name": "Get Endpoint Secret",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{svix_base_url}}/api/v1/app/{{application_id}}/endpoint/{{endpoint_id}}/secret/",
          "host": ["{{svix_base_url}}"],
          "path": ["api", "v1", "app", "{{application_id}}", "endpoint", "{{endpoint_id}}", "secret", ""]
        },
        "description": "Retrieves the signing secret for an existing endpoint.\n\nCorresponds to `receive_event.js` lines 23–27, called immediately after creating the endpoint.\nThe secret (`whsec_...`) is used by Zapier to verify incoming webhook signatures.\n\nThe response field `.key.key` contains the raw signing secret string."
      },
      "response": [
        {
          "name": "200 OK",
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"key\": {\n    \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\",\n    \"keyType\": \"endpointSecret\"\n  }\n}"
        }
      ]
    },
    {
      "name": "List Messages (Get Sample)",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{svix_base_url}}/api/v1/app/{{application_id}}/msg/?event_types=participant.registered&limit=1",
          "host": ["{{svix_base_url}}"],
          "path": ["api", "v1", "app", "{{application_id}}", "msg"],
          "query": [
            {
              "key": "event_types",
              "value": "participant.registered"
            },
            {
              "key": "limit",
              "value": "1"
            }
          ]
        },
        "description": "Lists recent messages for the specified event type, limited to one result.\n\nCorresponds to `receive_event.js` lines 51–56 in the `performList` function ($.operation.performList).\n\nIf a message exists, its ID is used to fetch the full message payload in the next request.\nThe test script saves the first result's ID into the `message_id` collection variable.\n\nIf no messages exist, the trigger falls back to the event's example payload (line 62)."
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "const response = pm.response.json();",
              "if (response.data && response.data.length > 0 && response.data[0].id) {",
              "    pm.collectionVariables.set('message_id', response.data[0].id);",
              "    console.log('Saved message_id:', response.data[0].id);",
              "}"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "response": [
        {
          "name": "200 OK",
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"data\": [\n    {\n      \"channels\": [],\n      \"createdAt\": \"2026-04-01T18:37:21.6151313Z\",\n      \"eventId\": \"16300146-f692-480d-9f8e-72078ca9810b\",\n      \"eventType\": \"participant.registered\",\n      \"id\": \"msg_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n      \"payload\": {\n        \"createdAt\": \"2026-04-01T18:37:21.6151313Z\",\n        \"event\": {\n          \"id\": \"16300146-f692-480d-9f8e-72078ca9810b\",\n          \"name\": \"NEW 12\"\n        },\n        \"id\": \"d233b19e-b0a2-45ca-bd2c-fd346dbfffc5\",\n        \"organization\": {\n          \"id\": \"ac2f9f80-c0fc-4003-a13d-a96751c8085a\",\n          \"name\": \"Auctria\"\n        },\n        \"payload\": {\n          \"participant\": {\n            \"address1\": \"\",\n            \"address2\": \"\",\n            \"city\": \"\",\n            \"country\": \"\",\n            \"email\": \"\",\n            \"firstName\": \"Test\",\n            \"id\": \"af15d186-17b5-4f56-a539-83fff77210fc\",\n            \"lastName\": \"participant1\",\n            \"number\": \"72\",\n            \"phoneNumber\": \"\",\n            \"state\": \"\",\n            \"zip\": \"\"\n          }\n        },\n        \"type\": \"participant.registered\"\n      }\n    }\n  ],\n  \"done\": true,\n  \"iterator\": \"msg_1srOrx2ZWZBpBUvZwXKQmoEYga2\"\n}"
        }
      ]
    },
    {
      "name": "Get Message",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{svix_base_url}}/api/v1/app/{{application_id}}/msg/{{message_id}}/",
          "host": ["{{svix_base_url}}"],
          "path": ["api", "v1", "app", "{{application_id}}", "msg", "{{message_id}}", ""]
        },
        "description": "Retrieves the full message payload by message ID.\n\nCorresponds to `receive_event.js` lines 65–70 in the `performList` function, called after\nobtaining the first message ID from the list endpoint.\n\nThe response payload is extracted via `extractSvixMessagePayload()` (line 4), which returns\nthe `.payload` property of the message — the innermost `payload` field nested inside the\nSvix envelope."
      },
      "response": [
        {
          "name": "200 OK",
          "status": "OK",
          "code": 200,
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json; charset=utf-8"
            }
          ],
          "body": "{\n  \"channels\": [],\n  \"createdAt\": \"2026-04-01T18:37:21.6151313Z\",\n  \"eventId\": \"16300146-f692-480d-9f8e-72078ca9810b\",\n  \"eventType\": \"participant.registered\",\n  \"id\": \"msg_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n  \"payload\": {\n    \"createdAt\": \"2026-04-01T18:37:21.6151313Z\",\n    \"event\": {\n      \"id\": \"16300146-f692-480d-9f8e-72078ca9810b\",\n      \"name\": \"NEW 12\"\n    },\n    \"id\": \"d233b19e-b0a2-45ca-bd2c-fd346dbfffc5\",\n    \"organization\": {\n      \"id\": \"ac2f9f80-c0fc-4003-a13d-a96751c8085a\",\n      \"name\": \"Auctria\"\n    },\n    \"payload\": {\n      \"participant\": {\n        \"address1\": \"\",\n        \"address2\": \"\",\n        \"city\": \"\",\n        \"country\": \"\",\n        \"email\": \"\",\n        \"firstName\": \"Test\",\n        \"id\": \"af15d186-17b5-4f56-a539-83fff77210fc\",\n        \"lastName\": \"participant1\",\n        \"number\": \"72\",\n        \"phoneNumber\": \"\",\n        \"state\": \"\",\n        \"zip\": \"\"\n      }\n    },\n    \"type\": \"participant.registered\"\n  }\n}"
        }
      ]
    },
    {
      "name": "Unsubscribe (Delete Endpoint)",
      "request": {
        "method": "DELETE",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "accept",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{svix_base_url}}/api/v1/app/{{application_id}}/endpoint/{{endpoint_id}}/",
          "host": ["{{svix_base_url}}"],
          "path": ["api", "v1", "app", "{{application_id}}", "endpoint", "{{endpoint_id}}", ""]
        },
        "description": "Deletes a Svix endpoint, effectively unsubscribing the Zapier webhook from future events.\n\nCorresponds to `receive_event.js` lines 39–44 in the `unsubscribeHook` function ($.operation.performUnsubscribe).\n\nThe empty JSON body `{}` matches the Zapier app code (line 43).\n\nSvix returns a 204 No Content on successful deletion."
      },
      "response": [
        {
          "name": "204 No Content",
          "status": "No Content",
          "code": 204,
          "header": [],
          "body": ""
        }
      ]
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{integration_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "svix_base_url",
      "value": "https://api.us.svix.com",
      "type": "string"
    },
    {
      "key": "application_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "integration_key",
      "value": "",
      "type": "string"
    },
    {
      "key": "endpoint_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "message_id",
      "value": "",
      "type": "string"
    }
  ]
}