{ "schemes": [ "https" ], "swagger": "2.0", "info": { "description": "Convoy is a fast and secure webhooks proxy. This document contains datastore's API specification.", "title": "Convoy API Reference", "termsOfService": "https://getconvoy.io/terms", "contact": { "name": "Convoy Support", "url": "https://getconvoy.io/docs", "email": "support@getconvoy.io" }, "license": { "name": "Mozilla Public License 2.0", "url": "https://www.mozilla.org/en-US/MPL/2.0/" }, "version": "26.3.5" }, "host": "us.getconvoy.cloud", "basePath": "/api", "paths": { "/v1/projects": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches projects for an organisation. Authenticate with a personal API key or JWT and pass the organisation id as the orgID query parameter.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "List all projects", "operationId": "GetProjects", "parameters": [ { "type": "string", "description": "Organisation ID", "name": "orgID", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.ProjectResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a project. Authenticate with a personal API key or JWT and pass the organisation id as the orgID query parameter. The response includes the project and a one-time project API key.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Create a project", "operationId": "CreateProject", "parameters": [ { "type": "string", "description": "Organisation ID", "name": "orgID", "in": "query", "required": true }, { "description": "Project Details", "name": "project", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateProject" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.CreateProjectResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "402": { "description": "Payment Required", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "403": { "description": "Forbidden", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches a project by its id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Retrieve a project", "operationId": "GetProject", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.ProjectResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a project's name, logo, and config", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Update a project", "operationId": "UpdateProject", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Project Details", "name": "project", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateProject" } } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.ProjectResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "403": { "description": "Forbidden", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes a project", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Projects" ], "summary": "Delete a project", "operationId": "DeleteProject", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "403": { "description": "Forbidden", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/endpoints": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an endpoints", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "List all endpoints", "operationId": "GetEndpoints", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "The owner ID of the endpoint", "name": "ownerId", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "example": "endpoint-1", "description": "The name of the endpoint", "name": "q", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/models.PagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.EndpointResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Create an endpoint", "operationId": "CreateEndpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Endpoint Details", "name": "endpoint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateEndpoint" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EndpointResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/oauth2/test": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint tests the OAuth2 connection by attempting to exchange a token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Test OAuth2 connection", "operationId": "TestOAuth2Connection", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "OAuth2 Configuration", "name": "oauth2", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.TestOAuth2Request" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.TestOAuth2Response" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Retrieve endpoint", "operationId": "GetEndpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EndpointResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Update an endpoint", "operationId": "UpdateEndpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true }, { "description": "Endpoint Details", "name": "endpoint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateEndpoint" } } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EndpointResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes an endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Delete endpoint", "operationId": "DeleteEndpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}/activate": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "Activated an inactive endpoint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Activate endpoint", "operationId": "ActivateEndpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EndpointResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}/expire_secret": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint expires and re-generates the endpoint secret.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Roll endpoint secret", "operationId": "ExpireSecret", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true }, { "description": "Expire Secret Body Parameters", "name": "endpoint", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.ExpireSecret" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EndpointResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/endpoints/{endpointID}/pause": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "Toggles an endpoint's status between active and paused states", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Endpoints" ], "summary": "Pause endpoint", "operationId": "PauseEndpoint", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Endpoint ID", "name": "endpointID", "in": "path", "required": true } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EndpointResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/event-types": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches the project's event types", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "EventTypes" ], "summary": "Retrieves a project's event types", "operationId": "GetEventTypes", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.EventTypeResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates an event type", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "EventTypes" ], "summary": "Create an event type", "operationId": "CreateEventType", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Event Type Details", "name": "eventType", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateEventType" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventTypeResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/event-types/import": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint imports event types from an OpenAPI specification", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "EventTypes" ], "summary": "Import event types from OpenAPI spec", "operationId": "ImportOpenApiSpec", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "OpenAPI specification", "name": "spec", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.ImportOpenAPISpec" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.EventTypeResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/event-types/{eventTypeId}": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates an event type", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "EventTypes" ], "summary": "Updates an event type", "operationId": "UpdateEventType", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Event Type ID", "name": "eventTypeId", "in": "path", "required": true }, { "description": "Event Type Details", "name": "eventType", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateEventType" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventTypeResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/event-types/{eventTypeId}/deprecate": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deprecates an event type", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "EventTypes" ], "summary": "Deprecates an event type", "operationId": "DeprecateEventType", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Event Type ID", "name": "eventTypeId", "in": "path", "required": true } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventTypeResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves all event deliveries paginated.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "List all event deliveries", "operationId": "GetEventDeliveriesPaged", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "2008-05-02T15:04:05", "description": "The end date", "name": "endDate", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of endpoint IDs to filter by", "name": "endpointId", "in": "query" }, { "type": "string", "description": "Event ID to filter by", "name": "eventId", "in": "query" }, { "type": "string", "description": "EventType to filter by", "name": "event_type", "in": "query" }, { "type": "string", "description": "IdempotencyKey to filter by", "name": "idempotencyKey", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" }, { "type": "string", "example": "2006-01-02T15:04:05", "description": "The start date", "name": "startDate", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of event delivery statuses to filter by", "name": "status", "in": "query" }, { "type": "string", "description": "SubscriptionID to filter by", "name": "subscriptionId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/models.PagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.EventDeliveryResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/batchretry": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint batch retries multiple event deliveries at once.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Batch retry event delivery", "operationId": "BatchRetryEventDelivery", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "2008-05-02T15:04:05", "description": "The end date", "name": "endDate", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of endpoint IDs to filter by", "name": "endpointId", "in": "query" }, { "type": "string", "description": "Event ID to filter by", "name": "eventId", "in": "query" }, { "type": "string", "description": "EventType to filter by", "name": "event_type", "in": "query" }, { "type": "string", "description": "IdempotencyKey to filter by", "name": "idempotencyKey", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" }, { "type": "string", "example": "2006-01-02T15:04:05", "description": "The start date", "name": "startDate", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of event delivery statuses to filter by", "name": "status", "in": "query" }, { "type": "string", "description": "SubscriptionID to filter by", "name": "subscriptionId", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/forceresend": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint enables you retry a previously successful event delivery", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Force retry event delivery", "operationId": "ForceResendEventDeliveries", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "event delivery ids", "name": "deliveryIds", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.IDs" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an event delivery.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Retrieve an event delivery", "operationId": "GetEventDelivery", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventDeliveryResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}/deliveryattempts": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an app message's delivery attempts", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Delivery Attempts" ], "summary": "List delivery attempts", "operationId": "GetDeliveryAttempts", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/datastore.DeliveryAttempt" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}/deliveryattempts/{deliveryAttemptID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches an app event delivery attempt", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Delivery Attempts" ], "summary": "Retrieve a delivery attempt", "operationId": "GetDeliveryAttempt", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true }, { "type": "string", "description": "delivery attempt id", "name": "deliveryAttemptID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.DeliveryAttempt" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/eventdeliveries/{eventDeliveryID}/resend": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retries an event delivery.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Event Deliveries" ], "summary": "Retry event delivery", "operationId": "ResendEventDelivery", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event delivery id", "name": "eventDeliveryID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventDeliveryResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches app events with pagination", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "List all events", "operationId": "GetEventsPaged", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "2008-05-02T15:04:05", "description": "The end date", "name": "endDate", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of endpoint ids to filter by", "name": "endpointId", "in": "query" }, { "type": "string", "description": "IdempotencyKey to filter by", "name": "idempotencyKey", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "description": "Any arbitrary value to filter the events payload", "name": "query", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of Source IDs to filter the events by.", "name": "sourceId", "in": "query" }, { "type": "string", "example": "2006-01-02T15:04:05", "description": "The start date", "name": "startDate", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/models.PagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.EventResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates an endpoint event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Create an event", "operationId": "CreateEndpointEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Event Details", "name": "event", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateEvent" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events/batchreplay": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint replays multiple events at once.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Batch replay events", "operationId": "BatchReplayEvents", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "2008-05-02T15:04:05", "description": "The end date", "name": "endDate", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of endpoint ids to filter by", "name": "endpointId", "in": "query" }, { "type": "string", "description": "IdempotencyKey to filter by", "name": "idempotencyKey", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "description": "Any arbitrary value to filter the events payload", "name": "query", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of Source IDs to filter the events by.", "name": "sourceId", "in": "query" }, { "type": "string", "example": "2006-01-02T15:04:05", "description": "The start date", "name": "startDate", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events/broadcast": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a event that is broadcast to every endpoint whose subscription matches the given event type.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Create a broadcast event", "operationId": "CreateBroadcastEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Broadcast Event Details", "name": "event", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.BroadcastEvent" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events/countbatchreplayevents": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint returns how many events would be affected by a batch replay with the given filters.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Count events matching batch replay filters", "operationId": "CountAffectedEvents", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "2008-05-02T15:04:05", "description": "The end date", "name": "endDate", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of endpoint ids to filter by", "name": "endpointId", "in": "query" }, { "type": "string", "description": "IdempotencyKey to filter by", "name": "idempotencyKey", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "description": "Any arbitrary value to filter the events payload", "name": "query", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of Source IDs to filter the events by.", "name": "sourceId", "in": "query" }, { "type": "string", "example": "2006-01-02T15:04:05", "description": "The start date", "name": "startDate", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.CountResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events/dynamic": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint does not require creating endpoint and subscriptions ahead of time. Instead, you supply the endpoint and the payload, and Convoy delivers the events", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Dynamic Events", "operationId": "CreateDynamicEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Event Details", "name": "event", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.DynamicEvent" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events/fanout": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint uses the owner_id to fan out an event to multiple endpoints.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Fan out an event", "operationId": "CreateEndpointFanoutEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Event Details", "name": "event", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.FanoutEvent" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events/{eventID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves an event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Retrieve an event", "operationId": "GetEndpointEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event id", "name": "eventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/events/{eventID}/replay": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint replays an event afresh assuming it is a new event.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Events" ], "summary": "Replay event", "operationId": "ReplayEndpointEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "event id", "name": "eventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.EventResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/meta-events": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches meta events with pagination", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Meta Events" ], "summary": "List all meta events", "operationId": "GetMetaEventsPaged", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "2008-05-02T15:04:05", "description": "The end date", "name": "endDate", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" }, { "type": "string", "example": "2006-01-02T15:04:05", "description": "The start date", "name": "startDate", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/models.PagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.MetaEventResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/meta-events/{metaEventID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a meta event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Meta Events" ], "summary": "Retrieve a meta event", "operationId": "GetMetaEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "meta event id", "name": "metaEventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.MetaEventResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/meta-events/{metaEventID}/resend": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retries a meta event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Meta Events" ], "summary": "Retry meta event", "operationId": "ResendMetaEvent", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "meta event id", "name": "metaEventID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.MetaEventResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/onboard": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint bulk-creates endpoints with subscriptions from a JSON body. A CSV file upload is also accepted over raw HTTP as multipart/form-data with a \"file\" field; generated SDK clients only expose the JSON body.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Onboard" ], "summary": "Bulk onboard endpoints with subscriptions", "operationId": "BulkOnboard", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "boolean", "description": "Validate without creating", "name": "dry_run", "in": "query" }, { "description": "Onboard Details (JSON)", "name": "onboard", "in": "body", "schema": { "$ref": "#/definitions/models.BulkOnboardRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.BulkOnboardDryRunResponse" } } } ] } }, "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.BulkOnboardAcceptedResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/portal-links": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches multiple portal links", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "List all portal links", "operationId": "LoadPortalLinksPaged", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "The owner ID of the endpoint", "name": "ownerId", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "example": "endpoint-1", "description": "The name of the endpoint", "name": "q", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/models.PagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/datastore.PortalLinkResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a portal link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Create a portal link", "operationId": "CreatePortalLink", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Portal Link Details", "name": "portallink", "in": "body", "required": true, "schema": { "$ref": "#/definitions/datastore.CreatePortalLinkRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.PortalLinkResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/portal-links/{portalLinkID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a portal link by its id.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Retrieve a portal link", "operationId": "GetPortalLink", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "portal link id", "name": "portalLinkID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.PortalLinkResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a portal link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Update a portal link", "operationId": "UpdatePortalLink", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "portal link id", "name": "portalLinkID", "in": "path", "required": true }, { "description": "Portal Link Details", "name": "portallink", "in": "body", "required": true, "schema": { "$ref": "#/definitions/datastore.UpdatePortalLinkRequest" } } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/datastore.PortalLinkResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/portal-links/{portalLinkID}/refresh_token": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a portal link auth token", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Get a portal link auth token", "operationId": "RefreshPortalLinkAuthToken", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "portal link id", "name": "portalLinkID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/portal-links/{portalLinkID}/revoke": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint revokes a portal link", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Portal Links" ], "summary": "Revoke a portal link", "operationId": "RevokePortalLink", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "portal link id", "name": "portalLinkID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/sources": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches multiple sources", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "List all sources", "operationId": "LoadSourcesPaged", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "example": "twitter", "description": "The custom source provider e.g. twitter, shopify", "name": "provider", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" }, { "type": "string", "example": "http", "description": "The source type e.g. http, pub_sub", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/models.PagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.SourceResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a source", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Create a source", "operationId": "CreateSource", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Source Details", "name": "source", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateSource" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.SourceResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/sources/test_function": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint validates that a filter will match a certain payload structure.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Validate source function", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Function Details", "name": "filter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.FunctionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.FunctionResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/sources/{sourceID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a source by its id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Retrieve a source", "operationId": "GetSource", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Source ID", "name": "sourceID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.SourceResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a source", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Update a source", "operationId": "UpdateSource", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "source id", "name": "sourceID", "in": "path", "required": true }, { "description": "Source Details", "name": "source", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateSource" } } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.SourceResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes a source", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Sources" ], "summary": "Delete a source", "operationId": "DeleteSource", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "source id", "name": "sourceID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches all the subscriptions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "List all subscriptions", "operationId": "GetSubscriptions", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "enum": [ "next", "prev" ], "type": "string", "x-enum-varnames": [ "Next", "Prev" ], "name": "direction", "in": "query" }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "description": "A list of endpointIDs to filter by", "name": "endpointId", "in": "query" }, { "type": "string", "description": "Subscription name to filter by", "name": "name", "in": "query" }, { "type": "string", "example": "01H0JA5MEES38RRK3HTEJC647K", "description": "A pagination cursor to fetch the next page of a list", "name": "next_page_cursor", "in": "query" }, { "type": "integer", "example": 20, "description": "The number of items to return per page", "name": "perPage", "in": "query" }, { "type": "string", "example": "01H0JATTVCXZK8FRDX1M1JN3QY", "description": "A pagination cursor to fetch the previous page of a list", "name": "prev_page_cursor", "in": "query" }, { "type": "string", "example": "ASC | DESC", "description": "Sort order, values are `ASC` or `DESC`, defaults to `DESC`", "name": "sort", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/models.PagedResponse" }, { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/models.SubscriptionResponse" } } } } ] } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a subscriptions", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Create a subscription", "operationId": "CreateSubscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Subscription details", "name": "subscription", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateSubscription" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.SubscriptionResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/test_filter": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint validates that a filter will match a certain payload structure.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Validate subscription filter", "operationId": "TestSubscriptionFilter", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Filter Details", "name": "filter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.TestFilter" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/test_function": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint test runs a transform function against a payload.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Test a subscription function", "operationId": "TestSubscriptionFunction", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "description": "Function Details", "name": "filter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.FunctionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.FunctionResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a single subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Retrieve a subscription", "operationId": "GetSubscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "subscription id", "name": "subscriptionID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.SubscriptionResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Update a subscription", "operationId": "UpdateSubscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "subscription id", "name": "subscriptionID", "in": "path", "required": true }, { "description": "Subscription Details", "name": "subscription", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateSubscription" } } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.SubscriptionResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Delete subscription", "operationId": "DeleteSubscription", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "subscription id", "name": "subscriptionID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}/filters": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint fetches all filters for a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "List all filters", "operationId": "GetFilters", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.FilterResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates a new filter for a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "Create a new filter", "operationId": "CreateFilter", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true }, { "description": "Filter to create", "name": "filter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.CreateFilterRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.FilterResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}/filters/bulk": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint creates multiple filters for a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "Create multiple subscription filters", "operationId": "BulkCreateFilters", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true }, { "description": "Filters to create", "name": "filters", "in": "body", "required": true, "schema": { "type": "array", "items": { "$ref": "#/definitions/models.CreateFilterRequest" } } } ], "responses": { "201": { "description": "Created", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.FilterResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}/filters/bulk_update": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates multiple filters for a subscription", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "Update multiple subscription filters", "operationId": "BulkUpdateFilters", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true }, { "description": "Filters to update", "name": "filters", "in": "body", "required": true, "schema": { "type": "array", "items": { "$ref": "#/definitions/models.BulkUpdateFilterRequest" } } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/models.FilterResponse" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}/filters/test/{eventType}": { "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint tests a filter against a payload", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "Test a filter", "operationId": "TestFilter", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true }, { "type": "string", "description": "Event Type", "name": "eventType", "in": "path", "required": true }, { "description": "Payload to test", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.TestFilterRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.TestFilterResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}/filters/{filterID}": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint retrieves a single filter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "Get a filter", "operationId": "GetFilter", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true }, { "type": "string", "description": "Filter ID", "name": "filterID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.FilterResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint updates an existing filter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "Update a filter", "operationId": "UpdateFilter", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true }, { "type": "string", "description": "Filter ID", "name": "filterID", "in": "path", "required": true }, { "description": "Updated filter", "name": "filter", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateFilterRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/models.FilterResponse" } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } }, "delete": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint deletes a filter", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Filters" ], "summary": "Delete a filter", "operationId": "DeleteFilter", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "Subscription ID", "name": "subscriptionID", "in": "path", "required": true }, { "type": "string", "description": "Filter ID", "name": "filterID", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } }, "/v1/projects/{projectID}/subscriptions/{subscriptionID}/toggle_status": { "put": { "security": [ { "ApiKeyAuth": [] } ], "description": "This endpoint toggles a subscription status. Retained for backward compatibility.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Subscriptions" ], "summary": "Toggle subscription status", "operationId": "ToggleSubscriptionStatus", "parameters": [ { "type": "string", "description": "Project ID", "name": "projectID", "in": "path", "required": true }, { "type": "string", "description": "subscription id", "name": "subscriptionID", "in": "path", "required": true } ], "responses": { "202": { "description": "Accepted", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "400": { "description": "Bad Request", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "401": { "description": "Unauthorized", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } }, "404": { "description": "Not Found", "schema": { "allOf": [ { "$ref": "#/definitions/util.ServerResponse" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/handlers.Stub" } ], "x-nullable": true } } } ] } } } } } }, "definitions": { "auth.RoleType": { "type": "string", "enum": [ "instance_admin", "organisation_admin", "billing_admin", "project_admin", "project_viewer", "api", "" ], "x-enum-comments": { "RoleBillingAdmin": "Organisation level - can manage billing only TODO:", "RoleInstanceAdmin": "Instance level - can manage all orgs and projects", "RoleOrganisationAdmin": "Organisation level - can manage org and all projects", "RoleProjectAdmin": "Project level - can manage project settings and users", "RoleProjectViewer": "Project level - can view project data only" }, "x-enum-descriptions": [ "Instance level - can manage all orgs and projects", "Organisation level - can manage org and all projects", "Organisation level - can manage billing only TODO:", "Project level - can manage project settings and users", "Project level - can view project data only", "" ], "x-enum-varnames": [ "RoleInstanceAdmin", "RoleOrganisationAdmin", "RoleBillingAdmin", "RoleProjectAdmin", "RoleProjectViewer", "RoleAPI" ] }, "config.RequestIDHeaderProvider": { "type": "string", "enum": [ "X-Convoy-Idempotency-Key", "" ], "x-enum-varnames": [ "DefaultRequestIDHeader" ] }, "config.SignatureHeaderProvider": { "type": "string", "enum": [ "X-Convoy-Signature", "" ], "x-enum-varnames": [ "DefaultSignatureHeader" ] }, "datastore.APIKeyResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "expires_at": { "type": "string", "x-nullable": true }, "key": { "type": "string" }, "key_type": { "type": "string" }, "name": { "type": "string" }, "role": { "$ref": "#/definitions/datastore.Role" }, "uid": { "type": "string" }, "user_id": { "type": "string" } } }, "datastore.AlertConfiguration": { "type": "object", "properties": { "count": { "type": "integer" }, "threshold": { "type": "string" } } }, "datastore.AmqpCredentials": { "type": "object", "properties": { "password": { "type": "string" }, "user": { "type": "string" } } }, "datastore.AmqpPubSubConfig": { "type": "object", "properties": { "auth": { "allOf": [ { "$ref": "#/definitions/datastore.AmqpCredentials" } ], "x-nullable": true }, "bindedExchange": { "type": "string", "x-nullable": true }, "deadLetterExchange": { "type": "string", "x-nullable": true }, "host": { "type": "string" }, "port": { "type": "string" }, "queue": { "type": "string" }, "routingKey": { "type": "string" }, "schema": { "type": "string" }, "vhost": { "type": "string", "x-nullable": true } } }, "datastore.ApiKey": { "type": "object", "properties": { "header_name": { "type": "string" }, "header_value": { "type": "string" } } }, "datastore.BasicAuth": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "datastore.CLIMetadata": { "type": "object", "properties": { "event_type": { "type": "string" }, "source_id": { "type": "string" } } }, "datastore.CircuitBreakerConfiguration": { "type": "object", "properties": { "consecutive_failure_threshold": { "type": "integer" }, "error_timeout": { "type": "integer" }, "failure_threshold": { "type": "integer" }, "minimum_request_count": { "type": "integer" }, "observability_window": { "type": "integer" }, "sample_rate": { "type": "integer" }, "success_threshold": { "type": "integer" } } }, "datastore.CreatePortalLinkRequest": { "type": "object", "properties": { "auth_type": { "type": "string" }, "can_manage_endpoint": { "description": "Specify whether endpoint management can be done through the Portal Link UI", "type": "boolean" }, "endpoints": { "description": "Deprecated\nIDs of endpoints in this portal link", "type": "array", "items": { "type": "string" } }, "name": { "description": "Portal Link Name", "type": "string" }, "owner_id": { "description": "OwnerID, the portal link will inherit all the endpoints with this owner ID", "type": "string" } } }, "datastore.CustomResponse": { "type": "object", "properties": { "body": { "type": "string" }, "content_type": { "type": "string" } } }, "datastore.DeliveryAttempt": { "type": "object", "properties": { "api_version": { "type": "string" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "endpoint_id": { "type": "string" }, "error": { "type": "string" }, "http_status": { "type": "string" }, "ip_address": { "type": "string" }, "method": { "type": "string" }, "msg_id": { "type": "string" }, "project_id": { "type": "string" }, "request_http_header": { "$ref": "#/definitions/datastore.HttpHeader" }, "requested_at": { "type": "string", "x-nullable": true }, "responded_at": { "type": "string", "x-nullable": true }, "response_data": { "type": "string" }, "response_http_header": { "$ref": "#/definitions/datastore.HttpHeader" }, "status": { "type": "boolean" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } } }, "datastore.DeliveryMode": { "type": "string", "enum": [ "at_least_once", "at_most_once", "" ], "x-enum-varnames": [ "AtLeastOnceDeliveryMode", "AtMostOnceDeliveryMode" ] }, "datastore.Device": { "type": "object", "properties": { "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "endpoint_id": { "type": "string" }, "host_name": { "type": "string" }, "last_seen_at": { "type": "string" }, "project_id": { "type": "string" }, "status": { "$ref": "#/definitions/datastore.DeviceStatus" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "datastore.DeviceStatus": { "type": "string", "enum": [ "offline", "online", "disabled", "" ], "x-enum-varnames": [ "DeviceStatusOffline", "DeviceStatusOnline", "DeviceStatusDisabled" ] }, "datastore.EncodingType": { "type": "string", "enum": [ "base64", "hex", "" ], "x-enum-varnames": [ "Base64Encoding", "HexEncoding" ] }, "datastore.Endpoint": { "type": "object", "properties": { "advanced_signatures": { "type": "boolean" }, "authentication": { "allOf": [ { "$ref": "#/definitions/datastore.EndpointAuthentication" } ], "x-nullable": true }, "cb_state": { "description": "CBState is the circuit breaker state (\"open\", \"half-open\", \"closed\") so the UI\ncan reflect a tripped breaker on the endpoint status. Nil when CB is\noff/unlicensed or has no sample for this endpoint.", "type": "string", "x-nullable": true }, "content_type": { "type": "string" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "description": { "type": "string" }, "events": { "type": "integer" }, "failure_count": { "type": "integer", "x-nullable": true }, "failure_rate": { "description": "FailureRate is the circuit breaker's rolling failure rate for this endpoint.\nIt is a pointer so the API can return null when no rate was computed (circuit\nbreaker feature off, or sampler not running), distinct from a genuine 0%.", "type": "number", "x-nullable": true }, "http_timeout": { "type": "integer" }, "mtls_client_cert": { "description": "mTLS client certificate configuration", "allOf": [ { "$ref": "#/definitions/datastore.MtlsClientCert" } ], "x-nullable": true }, "name": { "type": "string" }, "owner_id": { "type": "string" }, "period_failure_rate": { "description": "PeriodFailureRate is the period failure rate from event_deliveries,\n(Failure+Retry)/(Success+Failure+Retry). Retry counts as failed-so-far.\nNil when the range has no counted deliveries; sibling counts are transient.", "type": "number", "x-nullable": true }, "project_id": { "type": "string" }, "rate_limit": { "type": "integer" }, "rate_limit_duration": { "type": "integer" }, "retry_count": { "type": "integer", "x-nullable": true }, "secrets": { "type": "array", "items": { "$ref": "#/definitions/datastore.Secret" } }, "slack_webhook_url": { "type": "string" }, "status": { "$ref": "#/definitions/datastore.EndpointStatus" }, "success_count": { "type": "integer", "x-nullable": true }, "support_email": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } } }, "datastore.EndpointAuthentication": { "type": "object", "properties": { "api_key": { "allOf": [ { "$ref": "#/definitions/datastore.ApiKey" } ], "x-nullable": true }, "basic_auth": { "allOf": [ { "$ref": "#/definitions/datastore.BasicAuth" } ], "x-nullable": true }, "oauth2": { "allOf": [ { "$ref": "#/definitions/datastore.OAuth2" } ], "x-nullable": true }, "type": { "$ref": "#/definitions/datastore.EndpointAuthenticationType" } } }, "datastore.EndpointAuthenticationType": { "type": "string", "enum": [ "api_key", "oauth2", "basic_auth", "" ], "x-enum-varnames": [ "APIKeyAuthentication", "OAuth2Authentication", "BasicAuthentication" ] }, "datastore.EndpointStatus": { "type": "string", "enum": [ "active", "inactive", "paused", "" ], "x-enum-varnames": [ "ActiveEndpointStatus", "InactiveEndpointStatus", "PausedEndpointStatus" ] }, "datastore.Event": { "type": "object", "properties": { "acknowledged_at": { "type": "string", "x-nullable": true }, "app_id": { "description": "Deprecated", "type": "string" }, "created_at": { "type": "string" }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "object", "additionalProperties": true, "x-nullable": true }, "deleted_at": { "type": "string", "x-nullable": true }, "endpoint_metadata": { "type": "array", "items": { "$ref": "#/definitions/datastore.Endpoint" } }, "endpoints": { "type": "array", "items": { "type": "string" } }, "event_type": { "type": "string" }, "headers": { "$ref": "#/definitions/httpheader.HTTPHeader" }, "idempotency_key": { "type": "string" }, "is_duplicate_event": { "type": "boolean" }, "metadata": { "type": "string" }, "project_id": { "type": "string" }, "raw": { "type": "string" }, "source_id": { "type": "string" }, "source_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Source" } ], "x-nullable": true }, "status": { "$ref": "#/definitions/datastore.EventStatus" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url_path": { "type": "string" }, "url_query_params": { "type": "string" } } }, "datastore.EventDeliveryStatus": { "type": "string", "enum": [ "Scheduled", "Processing", "Discarded", "Failure", "Success", "Retry", "" ], "x-enum-varnames": [ "ScheduledEventStatus", "ProcessingEventStatus", "DiscardedEventStatus", "FailureEventStatus", "SuccessEventStatus", "RetryEventStatus" ] }, "datastore.EventStatus": { "type": "string", "enum": [ "Processing", "Failure", "Success", "Retry", "Pending", "" ], "x-enum-varnames": [ "ProcessingStatus", "FailureStatus", "SuccessStatus", "RetryStatus", "PendingStatus" ] }, "datastore.FilterConfiguration": { "type": "object", "properties": { "event_types": { "type": "array", "items": { "type": "string" } }, "filter": { "$ref": "#/definitions/datastore.FilterSchema" } } }, "datastore.FilterSchema": { "type": "object", "properties": { "body": { "$ref": "#/definitions/datastore.M" }, "headers": { "$ref": "#/definitions/datastore.M" }, "is_flattened": { "type": "boolean" }, "path": { "$ref": "#/definitions/datastore.M" }, "query": { "$ref": "#/definitions/datastore.M" } } }, "datastore.GooglePubSubConfig": { "type": "object", "properties": { "project_id": { "type": "string" }, "service_account": { "description": "encoding/json marshals []byte as a base64 string on the wire.", "type": "string", "format": "byte" }, "subscription_id": { "type": "string" } } }, "datastore.HMac": { "type": "object", "properties": { "encoding": { "$ref": "#/definitions/datastore.EncodingType" }, "hash": { "type": "string" }, "header": { "type": "string" }, "secret": { "type": "string" } } }, "datastore.HttpHeader": { "type": "object", "additionalProperties": { "type": "string" }, "x-nullable": true }, "datastore.KafkaAuth": { "type": "object", "properties": { "hash": { "type": "string" }, "password": { "type": "string" }, "tls": { "type": "boolean" }, "type": { "type": "string" }, "username": { "type": "string" } } }, "datastore.KafkaPubSubConfig": { "type": "object", "properties": { "auth": { "allOf": [ { "$ref": "#/definitions/datastore.KafkaAuth" } ], "x-nullable": true }, "brokers": { "type": "array", "items": { "type": "string" } }, "consumer_group_id": { "type": "string" }, "topic_name": { "type": "string" } } }, "datastore.M": { "type": "object", "additionalProperties": true, "x-nullable": true }, "datastore.MetaEventAttempt": { "type": "object", "properties": { "request_http_header": { "$ref": "#/definitions/datastore.HttpHeader" }, "response_data": { "type": "string" }, "response_http_header": { "$ref": "#/definitions/datastore.HttpHeader" } } }, "datastore.MetaEventConfiguration": { "type": "object", "properties": { "event_type": { "type": "array", "items": { "type": "string" } }, "is_enabled": { "type": "boolean" }, "pub_sub": { "allOf": [ { "$ref": "#/definitions/datastore.PubSubConfig" } ], "x-nullable": true }, "secret": { "type": "string" }, "type": { "$ref": "#/definitions/datastore.MetaEventType" }, "url": { "type": "string" } } }, "datastore.MetaEventType": { "type": "string", "enum": [ "http", "pub_sub", "" ], "x-enum-varnames": [ "HTTPMetaEvent", "PubSubMetaEvent" ] }, "datastore.Metadata": { "type": "object", "properties": { "data": { "description": "Data to be sent to endpoint.", "type": "object", "additionalProperties": true, "x-nullable": true }, "interval_seconds": { "type": "integer" }, "max_retry_seconds": { "type": "integer" }, "next_send_time": { "type": "string" }, "num_trials": { "description": "NumTrials: number of times we have tried to deliver this Event to\nan application", "type": "integer" }, "raw": { "type": "string" }, "retry_limit": { "type": "integer" }, "strategy": { "$ref": "#/definitions/datastore.StrategyProvider" } } }, "datastore.MtlsClientCert": { "type": "object", "properties": { "client_cert": { "description": "ClientCert is the client certificate PEM string", "type": "string" }, "client_key": { "description": "ClientKey is the client private key PEM string", "type": "string" } } }, "datastore.OAuth2": { "type": "object", "properties": { "audience": { "type": "string" }, "authentication_type": { "$ref": "#/definitions/datastore.OAuth2AuthenticationType" }, "client_id": { "type": "string" }, "client_secret": { "description": "Encrypted at rest", "type": "string" }, "expiry_time_unit": { "description": "Expiry time unit (seconds, milliseconds, minutes, hours)", "allOf": [ { "$ref": "#/definitions/datastore.OAuth2ExpiryTimeUnit" } ] }, "field_mapping": { "description": "Field mapping for flexible token response parsing", "allOf": [ { "$ref": "#/definitions/datastore.OAuth2FieldMapping" } ], "x-nullable": true }, "grant_type": { "type": "string" }, "issuer": { "type": "string" }, "scope": { "type": "string" }, "signing_algorithm": { "type": "string" }, "signing_key": { "description": "Encrypted at rest", "allOf": [ { "$ref": "#/definitions/datastore.OAuth2SigningKey" } ], "x-nullable": true }, "subject": { "type": "string" }, "url": { "type": "string" } } }, "datastore.OAuth2AuthenticationType": { "type": "string", "enum": [ "shared_secret", "client_assertion", "" ], "x-enum-varnames": [ "SharedSecretAuth", "ClientAssertionAuth" ] }, "datastore.OAuth2ExpiryTimeUnit": { "type": "string", "enum": [ "seconds", "milliseconds", "minutes", "hours", "" ], "x-enum-varnames": [ "ExpiryTimeUnitSeconds", "ExpiryTimeUnitMilliseconds", "ExpiryTimeUnitMinutes", "ExpiryTimeUnitHours" ] }, "datastore.OAuth2FieldMapping": { "type": "object", "properties": { "access_token": { "description": "Field name for access token (e.g., \"accessToken\", \"access_token\", \"token\")", "type": "string" }, "expires_in": { "description": "Field name for expiry time (e.g., \"expiresIn\", \"expires_in\", \"expiresAt\")", "type": "string" }, "token_type": { "description": "Field name for token type (e.g., \"tokenType\", \"token_type\")", "type": "string" } } }, "datastore.OAuth2SigningKey": { "type": "object", "properties": { "crv": { "description": "EC (Elliptic Curve) key fields", "type": "string" }, "d": { "description": "Private key (EC only)", "type": "string" }, "dp": { "description": "RSA first factor CRT exponent (RSA private key only)", "type": "string" }, "dq": { "description": "RSA second factor CRT exponent (RSA private key only)", "type": "string" }, "e": { "description": "RSA public exponent (RSA only)", "type": "string" }, "kid": { "description": "Key ID", "type": "string" }, "kty": { "description": "Key type: \"EC\" or \"RSA\"", "type": "string" }, "n": { "description": "RSA key fields", "type": "string" }, "p": { "description": "RSA first prime factor (RSA private key only)", "type": "string" }, "q": { "description": "RSA second prime factor (RSA private key only)", "type": "string" }, "qi": { "description": "RSA first CRT coefficient (RSA private key only)", "type": "string" }, "x": { "description": "X coordinate (EC only)", "type": "string" }, "y": { "description": "Y coordinate (EC only)", "type": "string" } } }, "datastore.PageDirection": { "type": "string", "enum": [ "next", "prev", "" ], "x-enum-varnames": [ "Next", "Prev" ] }, "datastore.PaginationData": { "type": "object", "properties": { "has_next_page": { "type": "boolean" }, "has_prev_page": { "type": "boolean" }, "next_page_cursor": { "type": "string" }, "per_page": { "type": "integer" }, "prev_page_cursor": { "type": "string" }, "total": { "type": "integer" } } }, "datastore.PortalAuthType": { "type": "string", "enum": [ "refresh_token", "static_token", "" ], "x-enum-varnames": [ "PortalAuthTypeRefreshToken", "PortalAuthTypeStaticToken" ] }, "datastore.PortalLinkResponse": { "type": "object", "properties": { "auth_key": { "type": "string" }, "auth_type": { "$ref": "#/definitions/datastore.PortalAuthType" }, "can_manage_endpoint": { "type": "boolean" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "endpoint_count": { "type": "integer" }, "endpoints": { "type": "array", "items": { "type": "string" } }, "endpoints_metadata": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/datastore.Endpoint" } ], "x-nullable": true } }, "name": { "type": "string" }, "owner_id": { "type": "string" }, "project_id": { "type": "string" }, "token": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } } }, "datastore.ProjectConfig": { "type": "object", "properties": { "add_event_id_trace_headers": { "type": "boolean" }, "circuit_breaker": { "allOf": [ { "$ref": "#/definitions/datastore.CircuitBreakerConfiguration" } ], "x-nullable": true }, "disable_endpoint": { "type": "boolean" }, "max_payload_read_size": { "type": "integer" }, "meta_event": { "allOf": [ { "$ref": "#/definitions/datastore.MetaEventConfiguration" } ], "x-nullable": true }, "multiple_endpoint_subscriptions": { "type": "boolean" }, "ratelimit": { "allOf": [ { "$ref": "#/definitions/datastore.RateLimitConfiguration" } ], "x-nullable": true }, "replay_attacks_prevention_enabled": { "type": "boolean" }, "request_id_header": { "$ref": "#/definitions/config.RequestIDHeaderProvider" }, "search_policy": { "type": "string" }, "signature": { "allOf": [ { "$ref": "#/definitions/datastore.SignatureConfiguration" } ], "x-nullable": true }, "ssl": { "allOf": [ { "$ref": "#/definitions/datastore.SSLConfiguration" } ], "x-nullable": true }, "strategy": { "allOf": [ { "$ref": "#/definitions/datastore.StrategyConfiguration" } ], "x-nullable": true }, "sync_dynamic_event_ack": { "description": "SyncDynamicEventAck waits for endpoint/subscription resolve before\nreturning 2xx from POST /events/dynamic. Default false keeps 201-on-queue.", "type": "boolean" } } }, "datastore.ProjectStatistics": { "type": "object", "properties": { "endpoints_exist": { "type": "boolean" }, "events_exist": { "type": "boolean" }, "sources_exist": { "type": "boolean" }, "subscriptions_exist": { "type": "boolean" } } }, "datastore.ProjectType": { "type": "string", "enum": [ "outgoing", "incoming", "" ], "x-enum-varnames": [ "OutgoingProject", "IncomingProject" ] }, "datastore.ProviderConfig": { "type": "object", "properties": { "twitter": { "allOf": [ { "$ref": "#/definitions/datastore.TwitterProviderConfig" } ], "x-nullable": true } } }, "datastore.PubSubConfig": { "type": "object", "properties": { "amqp": { "allOf": [ { "$ref": "#/definitions/datastore.AmqpPubSubConfig" } ], "x-nullable": true }, "google": { "allOf": [ { "$ref": "#/definitions/datastore.GooglePubSubConfig" } ], "x-nullable": true }, "kafka": { "allOf": [ { "$ref": "#/definitions/datastore.KafkaPubSubConfig" } ], "x-nullable": true }, "sqs": { "allOf": [ { "$ref": "#/definitions/datastore.SQSPubSubConfig" } ], "x-nullable": true }, "type": { "$ref": "#/definitions/datastore.PubSubType" }, "workers": { "type": "integer" } } }, "datastore.PubSubType": { "type": "string", "enum": [ "sqs", "google", "kafka", "amqp", "" ], "x-enum-varnames": [ "SqsPubSub", "GooglePubSub", "KafkaPubSub", "AmqpPubSub" ] }, "datastore.RateLimitConfiguration": { "type": "object", "properties": { "count": { "type": "integer" }, "duration": { "type": "integer" } } }, "datastore.RetryConfiguration": { "type": "object", "properties": { "duration": { "type": "integer" }, "retry_count": { "type": "integer" }, "type": { "$ref": "#/definitions/datastore.StrategyProvider" } } }, "datastore.Role": { "type": "object", "properties": { "app": { "type": "string" }, "project": { "type": "string" }, "type": { "$ref": "#/definitions/auth.RoleType" } } }, "datastore.SQSPubSubConfig": { "type": "object", "properties": { "access_key_id": { "type": "string" }, "default_region": { "type": "string" }, "endpoint": { "description": "Optional: for LocalStack testing", "type": "string" }, "queue_name": { "type": "string" }, "secret_key": { "type": "string" } } }, "datastore.SSLConfiguration": { "type": "object", "properties": { "enforce_secure_endpoints": { "type": "boolean" } } }, "datastore.Secret": { "type": "object", "properties": { "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "expires_at": { "type": "string", "x-nullable": true }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "value": { "type": "string" } } }, "datastore.SignatureConfiguration": { "type": "object", "properties": { "header": { "$ref": "#/definitions/config.SignatureHeaderProvider" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/datastore.SignatureVersion" } } } }, "datastore.SignatureVersion": { "type": "object", "properties": { "created_at": { "type": "string" }, "encoding": { "$ref": "#/definitions/datastore.EncodingType" }, "hash": { "type": "string" }, "uid": { "type": "string" } } }, "datastore.Source": { "type": "object", "properties": { "body_function": { "type": "string", "x-nullable": true }, "created_at": { "type": "string" }, "custom_response": { "$ref": "#/definitions/datastore.CustomResponse" }, "deleted_at": { "type": "string", "x-nullable": true }, "event_type_location": { "type": "string" }, "forward_headers": { "type": "array", "items": { "type": "string" } }, "header_function": { "type": "string", "x-nullable": true }, "idempotency_keys": { "type": "array", "items": { "type": "string" } }, "is_disabled": { "type": "boolean" }, "mask_id": { "type": "string" }, "name": { "type": "string" }, "project_id": { "type": "string" }, "provider": { "$ref": "#/definitions/datastore.SourceProvider" }, "provider_config": { "allOf": [ { "$ref": "#/definitions/datastore.ProviderConfig" } ], "x-nullable": true }, "pub_sub": { "allOf": [ { "$ref": "#/definitions/datastore.PubSubConfig" } ], "x-nullable": true }, "type": { "$ref": "#/definitions/datastore.SourceType" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "verifier": { "allOf": [ { "$ref": "#/definitions/datastore.VerifierConfig" } ], "x-nullable": true } } }, "datastore.SourceProvider": { "type": "string", "enum": [ "github", "twitter", "shopify", "" ], "x-enum-varnames": [ "GithubSourceProvider", "TwitterSourceProvider", "ShopifySourceProvider" ] }, "datastore.SourceType": { "type": "string", "enum": [ "http", "rest_api", "pub_sub", "db_change_stream", "" ], "x-enum-varnames": [ "HTTPSource", "RestApiSource", "PubSubSource", "DBChangeStream" ] }, "datastore.StrategyConfiguration": { "type": "object", "properties": { "duration": { "type": "integer" }, "retry_count": { "type": "integer" }, "type": { "$ref": "#/definitions/datastore.StrategyProvider" } } }, "datastore.StrategyProvider": { "type": "string", "enum": [ "linear", "exponential", "" ], "x-enum-varnames": [ "LinearStrategyProvider", "ExponentialStrategyProvider" ] }, "datastore.SubscriptionType": { "type": "string", "enum": [ "cli", "api", "" ], "x-enum-varnames": [ "SubscriptionTypeCLI", "SubscriptionTypeAPI" ] }, "datastore.TwitterProviderConfig": { "type": "object", "properties": { "crc_verified_at": { "type": "string", "x-nullable": true } } }, "datastore.UpdatePortalLinkRequest": { "type": "object", "properties": { "auth_type": { "type": "string" }, "can_manage_endpoint": { "description": "Specify whether endpoint management can be done through the Portal Link UI", "type": "boolean" }, "endpoints": { "description": "Deprecated\nIDs of endpoints in this portal link", "type": "array", "items": { "type": "string" } }, "name": { "description": "Portal Link Name", "type": "string" }, "owner_id": { "description": "OwnerID, the portal link will inherit all the endpoints with this owner ID", "type": "string" } } }, "datastore.VerifierConfig": { "type": "object", "properties": { "api_key": { "allOf": [ { "$ref": "#/definitions/datastore.ApiKey" } ], "x-nullable": true }, "basic_auth": { "allOf": [ { "$ref": "#/definitions/datastore.BasicAuth" } ], "x-nullable": true }, "hmac": { "allOf": [ { "$ref": "#/definitions/datastore.HMac" } ], "x-nullable": true }, "type": { "$ref": "#/definitions/datastore.VerifierType" } } }, "datastore.VerifierType": { "type": "string", "enum": [ "noop", "hmac", "basic_auth", "api_key", "" ], "x-enum-varnames": [ "NoopVerifier", "HMacVerifier", "BasicAuthVerifier", "APIKeyVerifier" ] }, "handlers.Stub": { "type": "object", "additionalProperties": true, "x-nullable": true }, "httpheader.HTTPHeader": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "x-nullable": true }, "models.AlertConfiguration": { "type": "object", "properties": { "count": { "description": "Count", "type": "integer" }, "threshold": { "description": "Threshold", "type": "string" } } }, "models.AmqpAuth": { "type": "object", "properties": { "password": { "type": "string" }, "user": { "type": "string" } } }, "models.AmqpExchange": { "type": "object", "properties": { "exchange": { "type": "string" }, "routingKey": { "type": "string" } } }, "models.AmqpPubSubconfig": { "type": "object", "properties": { "auth": { "$ref": "#/definitions/models.AmqpAuth" }, "bindExchange": { "$ref": "#/definitions/models.AmqpExchange" }, "deadLetterExchange": { "type": "string" }, "host": { "type": "string" }, "port": { "type": "string" }, "queue": { "type": "string" }, "schema": { "type": "string" }, "vhost": { "type": "string" } } }, "models.ApiKey": { "type": "object", "required": [ "header_name", "header_value" ], "properties": { "header_name": { "type": "string" }, "header_value": { "type": "string" } } }, "models.BasicAuth": { "type": "object", "required": [ "password", "username" ], "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "models.BroadcastEvent": { "type": "object", "properties": { "acknowledged_at": { "type": "string" }, "custom_headers": { "description": "Specifies custom headers you want convoy to add when the event is dispatched to your endpoint", "type": "object", "additionalProperties": { "type": "string" }, "x-nullable": true }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "object", "additionalProperties": true, "x-nullable": true }, "event_type": { "description": "Event Type is used for filtering and debugging e.g invoice.paid", "type": "string" }, "idempotency_key": { "description": "Specify a key for event deduplication", "type": "string" } } }, "models.BulkOnboardAcceptedResponse": { "type": "object", "properties": { "batch_count": { "type": "integer" }, "message": { "type": "string" }, "total_items": { "type": "integer" } } }, "models.BulkOnboardDryRunResponse": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/definitions/models.OnboardValidationError" } }, "total_rows": { "type": "integer" }, "valid_count": { "type": "integer" } } }, "models.BulkOnboardRequest": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/models.OnboardItem" } } } }, "models.BulkUpdateFilterRequest": { "type": "object", "required": [ "uid" ], "properties": { "body": { "type": "object", "additionalProperties": true, "x-nullable": true }, "enabled_at": { "$ref": "#/definitions/models.OptionalTime" }, "event_type": { "type": "string" }, "headers": { "type": "object", "additionalProperties": true, "x-nullable": true }, "path": { "type": "object", "additionalProperties": true, "x-nullable": true }, "query": { "type": "object", "additionalProperties": true, "x-nullable": true }, "uid": { "type": "string" } } }, "models.CountResponse": { "type": "object", "properties": { "num": { "type": "integer" } } }, "models.CreateEndpoint": { "type": "object", "properties": { "advanced_signatures": { "description": "Convoy supports two [signature formats](https://getconvoy.io/docs/product-manual/signatures)\n-- simple or advanced. If left unspecified, we default to false.", "type": "boolean" }, "appID": { "description": "Deprecated but necessary for backward compatibility", "type": "string" }, "authentication": { "description": "This is used to define any custom authentication required by the endpoint. This\nshouldn't be needed often because webhook endpoints usually should be exposed to\nthe internet.", "allOf": [ { "$ref": "#/definitions/models.EndpointAuthentication" } ] }, "content_type": { "description": "Content type for the endpoint. Defaults to application/json if not specified.", "type": "string" }, "description": { "description": "Human-readable description of the endpoint. Think of this as metadata describing\nthe endpoint", "type": "string" }, "http_timeout": { "description": "Define endpoint http timeout in seconds.", "type": "integer" }, "is_disabled": { "description": "This is used to manually enable/disable the endpoint.", "type": "boolean" }, "mtls_client_cert": { "description": "mTLS client certificate configuration for the endpoint", "allOf": [ { "$ref": "#/definitions/models.MtlsClientCert" } ] }, "name": { "description": "Endpoint name.", "type": "string" }, "owner_id": { "description": "The OwnerID is used to group more than one endpoint together to achieve\n[fanout](https://getconvoy.io/docs/manual/endpoints#Endpoint%20Owner%20ID)", "type": "string" }, "rate_limit": { "description": "Rate limit is the total number of requests to be sent to an endpoint in\nthe time duration specified in RateLimitDuration", "type": "integer" }, "rate_limit_duration": { "description": "Rate limit duration specifies the time range for the rate limit.", "type": "integer" }, "secret": { "description": "Endpoint's webhook secret. If not provided, Convoy autogenerates one for the endpoint.", "type": "string" }, "slack_webhook_url": { "description": "Slack webhook URL is an alternative method to support email where endpoint developers\ncan receive failure notifications on a slack channel.", "type": "string" }, "support_email": { "description": "Endpoint developers support email. This is used for communicating endpoint state\nchanges. You should always turn this on when disabling endpoints are enabled.", "type": "string" }, "url": { "description": "URL is the endpoint's URL prefixed with https. non-https urls are currently\nnot supported.", "type": "string" } } }, "models.CreateEvent": { "type": "object", "properties": { "app_id": { "description": "Deprecated but necessary for backward compatibility.", "type": "string" }, "custom_headers": { "description": "Specifies custom headers you want convoy to add when the event is dispatched to your endpoint", "type": "object", "additionalProperties": { "type": "string" }, "x-nullable": true }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "object", "additionalProperties": true, "x-nullable": true }, "endpoint_id": { "description": "Specifies the endpoint to send this event to. Required unless the\ndeprecated app_id is provided.", "type": "string" }, "event_type": { "description": "Event Type is used for filtering and debugging e.g invoice.paid", "type": "string" }, "idempotency_key": { "description": "Specify a key for event deduplication", "type": "string" } } }, "models.CreateEventType": { "type": "object", "properties": { "category": { "description": "Category is a product-specific grouping for the event type", "type": "string" }, "description": { "description": "Description is used to describe what the event type does", "type": "string" }, "json_schema": { "description": "JSONSchema is the JSON structure of the event type", "type": "object", "additionalProperties": true, "x-nullable": true }, "name": { "description": "Name is the event type name. E.g., invoice.created", "type": "string" } } }, "models.CreateFilterRequest": { "type": "object", "required": [ "event_type" ], "properties": { "body": { "description": "Body matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] }, "enabled_at": { "description": "Non-null when this filter is active. Defaults to now when omitted.", "allOf": [ { "$ref": "#/definitions/models.OptionalTime" } ] }, "event_type": { "description": "Type of event this filter applies to (required)", "type": "string" }, "headers": { "description": "Header matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] }, "path": { "description": "Path matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] }, "query": { "description": "Query matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] } } }, "models.CreateProject": { "type": "object", "properties": { "config": { "description": "Project Config", "allOf": [ { "$ref": "#/definitions/models.ProjectConfig" } ] }, "logo_url": { "type": "string" }, "name": { "description": "Project Name", "type": "string" }, "type": { "description": "Project Type, supported values are `outgoing`, `incoming`", "type": "string" } } }, "models.CreateProjectResponse": { "type": "object", "properties": { "api_key": { "allOf": [ { "$ref": "#/definitions/datastore.APIKeyResponse" } ], "x-nullable": true }, "project": { "allOf": [ { "$ref": "#/definitions/models.ProjectResponse" } ], "x-nullable": true } } }, "models.CreateSource": { "type": "object", "properties": { "body_function": { "description": "Function is a javascript function used to mutate the payload\nimmediately after ingesting an event", "type": "string" }, "custom_response": { "description": "Custom response is used to define a custom response for incoming\nwebhooks project sources only.", "allOf": [ { "$ref": "#/definitions/models.CustomResponse" } ] }, "event_type_location": { "description": "EventTypeLocation is used to specify where Convoy should read the event type\nfrom an incoming webhook request.", "type": "string" }, "header_function": { "description": "Function is a javascript function used to mutate the headers\nimmediately after ingesting an event", "type": "string" }, "idempotency_keys": { "description": "IdempotencyKeys are used to specify parts of a webhook request to uniquely\nidentify the event in an incoming webhooks project.", "type": "array", "items": { "type": "string" } }, "name": { "description": "Source name.", "type": "string" }, "provider": { "description": "Use this to specify one of our predefined source types.", "allOf": [ { "$ref": "#/definitions/datastore.SourceProvider" } ] }, "pub_sub": { "description": "PubSub are used to specify message broker sources for outgoing\nwebhooks projects.", "allOf": [ { "$ref": "#/definitions/models.PubSubConfig" } ] }, "type": { "description": "Source Type.", "allOf": [ { "$ref": "#/definitions/datastore.SourceType" } ] }, "verifier": { "description": "Verifiers are used to verify webhook events ingested in incoming\nwebhooks projects. If set, type is required and match the verifier\ntype object you choose.", "allOf": [ { "$ref": "#/definitions/models.VerifierConfig" } ] } } }, "models.CreateSubscription": { "type": "object", "properties": { "alert_config": { "description": "Alert configuration", "allOf": [ { "$ref": "#/definitions/models.AlertConfiguration" } ] }, "app_id": { "description": "Deprecated but necessary for backward compatibility", "type": "string" }, "delivery_mode": { "description": "Delivery mode configuration", "allOf": [ { "$ref": "#/definitions/datastore.DeliveryMode" } ] }, "endpoint_id": { "description": "Destination endpoint ID", "type": "string" }, "filter_config": { "description": "Filter configuration", "allOf": [ { "$ref": "#/definitions/models.FilterConfiguration" } ] }, "function": { "description": "Convoy supports mutating your request payload using a js function. Use this field\nto specify a `transform` function for this purpose. See this[https://docs.getconvoy.io/product-manual/subscriptions#functions] for more", "type": "string" }, "name": { "description": "Subscription Nme", "type": "string" }, "rate_limit_config": { "description": "Rate limit configuration", "allOf": [ { "$ref": "#/definitions/models.RateLimitConfiguration" } ] }, "source_id": { "description": "Source Id", "type": "string" } } }, "models.CustomResponse": { "type": "object", "properties": { "body": { "type": "string" }, "content_type": { "type": "string" } } }, "models.DynamicEvent": { "type": "object", "properties": { "custom_headers": { "description": "Specifies custom headers you want convoy to add when the event is dispatched to your endpoint", "type": "object", "additionalProperties": { "type": "string" }, "x-nullable": true }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "object", "additionalProperties": true, "x-nullable": true }, "event_type": { "description": "Event Type is used for filtering and debugging e.g invoice.paid", "type": "string" }, "event_types": { "description": "A list of event types for the subscription filter config", "type": "array", "items": { "type": "string" } }, "idempotency_key": { "description": "Specify a key for event deduplication", "type": "string" }, "secret": { "description": "Endpoint's webhook secret. If not provided, Convoy autogenerates one for the endpoint.", "type": "string" }, "url": { "description": "URL is the endpoint's URL prefixed with https. non-https urls are currently\nnot supported.", "type": "string" } } }, "models.EndpointAuthentication": { "type": "object", "properties": { "api_key": { "$ref": "#/definitions/models.ApiKey" }, "basic_auth": { "$ref": "#/definitions/models.BasicAuth" }, "oauth2": { "$ref": "#/definitions/models.OAuth2" }, "type": { "$ref": "#/definitions/datastore.EndpointAuthenticationType" } } }, "models.EndpointResponse": { "type": "object", "properties": { "advanced_signatures": { "type": "boolean" }, "authentication": { "allOf": [ { "$ref": "#/definitions/datastore.EndpointAuthentication" } ], "x-nullable": true }, "cb_state": { "description": "CBState is the circuit breaker state (\"open\", \"half-open\", \"closed\") so the UI\ncan reflect a tripped breaker on the endpoint status. Nil when CB is\noff/unlicensed or has no sample for this endpoint.", "type": "string", "x-nullable": true }, "content_type": { "type": "string" }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "description": { "type": "string" }, "events": { "type": "integer" }, "failure_count": { "type": "integer", "x-nullable": true }, "failure_rate": { "description": "FailureRate is the circuit breaker's rolling failure rate for this endpoint.\nIt is a pointer so the API can return null when no rate was computed (circuit\nbreaker feature off, or sampler not running), distinct from a genuine 0%.", "type": "number", "x-nullable": true }, "http_timeout": { "type": "integer" }, "mtls_client_cert": { "description": "mTLS client certificate configuration", "allOf": [ { "$ref": "#/definitions/datastore.MtlsClientCert" } ], "x-nullable": true }, "name": { "type": "string" }, "owner_id": { "type": "string" }, "period_failure_rate": { "description": "PeriodFailureRate is the period failure rate from event_deliveries,\n(Failure+Retry)/(Success+Failure+Retry). Retry counts as failed-so-far.\nNil when the range has no counted deliveries; sibling counts are transient.", "type": "number", "x-nullable": true }, "project_id": { "type": "string" }, "rate_limit": { "type": "integer" }, "rate_limit_duration": { "type": "integer" }, "retry_count": { "type": "integer", "x-nullable": true }, "secrets": { "type": "array", "items": { "$ref": "#/definitions/datastore.Secret" } }, "slack_webhook_url": { "type": "string" }, "status": { "$ref": "#/definitions/datastore.EndpointStatus" }, "success_count": { "type": "integer", "x-nullable": true }, "support_email": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" } } }, "models.EventDeliveryResponse": { "type": "object", "properties": { "acknowledged_at": { "type": "string", "x-nullable": true }, "cli_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.CLIMetadata" } ], "x-nullable": true }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "delivery_mode": { "$ref": "#/definitions/datastore.DeliveryMode" }, "description": { "type": "string" }, "device_id": { "type": "string" }, "device_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Device" } ], "x-nullable": true }, "endpoint_id": { "type": "string" }, "endpoint_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Endpoint" } ], "x-nullable": true }, "event_id": { "type": "string" }, "event_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Event" } ], "x-nullable": true }, "event_type": { "type": "string" }, "headers": { "$ref": "#/definitions/httpheader.HTTPHeader" }, "idempotency_key": { "type": "string" }, "latency": { "description": "Deprecated: Latency is deprecated.", "type": "string" }, "latency_seconds": { "type": "number" }, "metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Metadata" } ], "x-nullable": true }, "project_id": { "type": "string" }, "source_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Source" } ], "x-nullable": true }, "status": { "$ref": "#/definitions/datastore.EventDeliveryStatus" }, "subscription_id": { "type": "string" }, "target_url": { "type": "string" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url_query_params": { "type": "string" } } }, "models.EventResponse": { "type": "object", "properties": { "acknowledged_at": { "type": "string", "x-nullable": true }, "app_id": { "description": "Deprecated", "type": "string" }, "created_at": { "type": "string" }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "object", "additionalProperties": true, "x-nullable": true }, "deleted_at": { "type": "string", "x-nullable": true }, "endpoint_metadata": { "type": "array", "items": { "$ref": "#/definitions/datastore.Endpoint" } }, "endpoints": { "type": "array", "items": { "type": "string" } }, "event_type": { "type": "string" }, "headers": { "$ref": "#/definitions/httpheader.HTTPHeader" }, "idempotency_key": { "type": "string" }, "is_duplicate_event": { "type": "boolean" }, "metadata": { "type": "string" }, "project_id": { "type": "string" }, "raw": { "type": "string" }, "source_id": { "type": "string" }, "source_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Source" } ], "x-nullable": true }, "status": { "$ref": "#/definitions/datastore.EventStatus" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url_path": { "type": "string" }, "url_query_params": { "type": "string" } } }, "models.EventTypeResponse": { "type": "object", "properties": { "category": { "type": "string" }, "deprecated_at": { "type": "string", "x-nullable": true }, "description": { "type": "string" }, "json_schema": { "type": "object", "additionalProperties": true, "x-nullable": true }, "name": { "type": "string" }, "uid": { "type": "string" } } }, "models.ExpireSecret": { "type": "object", "properties": { "expiration": { "description": "Amount of time to wait before expiring the old endpoint secret.\nIf AdvancedSignatures is turned on for the project, signatures for both secrets will be generated up until\nthe old signature is expired.", "type": "integer" }, "secret": { "description": "New Endpoint secret value.", "type": "string" } } }, "models.FS": { "type": "object", "properties": { "body": { "$ref": "#/definitions/datastore.M" }, "headers": { "$ref": "#/definitions/datastore.M" }, "path": { "$ref": "#/definitions/datastore.M" }, "query": { "$ref": "#/definitions/datastore.M" } } }, "models.FanoutEvent": { "type": "object", "properties": { "custom_headers": { "description": "Specifies custom headers you want convoy to add when the event is dispatched to your endpoint", "type": "object", "additionalProperties": { "type": "string" }, "x-nullable": true }, "data": { "description": "Data is an arbitrary JSON value that gets sent as the body of the\nwebhook to the endpoints", "type": "object", "additionalProperties": true, "x-nullable": true }, "event_type": { "description": "Event Type is used for filtering and debugging e.g invoice.paid", "type": "string" }, "idempotency_key": { "description": "Specify a key for event deduplication", "type": "string" }, "owner_id": { "description": "Used for fanout, sends this event to all endpoints with this OwnerID.", "type": "string" } } }, "models.FilterConfiguration": { "type": "object", "properties": { "event_types": { "description": "List of event types that the subscription should match", "type": "array", "items": { "type": "string" } }, "filter": { "description": "Body & Header filters", "allOf": [ { "$ref": "#/definitions/models.FS" } ] } } }, "models.FilterResponse": { "type": "object", "properties": { "body": { "$ref": "#/definitions/datastore.M" }, "enabled_at": { "type": "string", "x-nullable": true }, "event_type": { "type": "string" }, "headers": { "$ref": "#/definitions/datastore.M" }, "path": { "$ref": "#/definitions/datastore.M" }, "query": { "$ref": "#/definitions/datastore.M" }, "raw_body": { "$ref": "#/definitions/datastore.M" }, "raw_headers": { "$ref": "#/definitions/datastore.M" }, "raw_path": { "$ref": "#/definitions/datastore.M" }, "raw_query": { "$ref": "#/definitions/datastore.M" }, "subscription_id": { "type": "string" }, "uid": { "type": "string" } } }, "models.FilterSchema": { "type": "object", "properties": { "body": {}, "header": {}, "path": {}, "query": {} } }, "models.FunctionRequest": { "type": "object", "properties": { "function": { "type": "string" }, "payload": { "type": "object", "additionalProperties": {}, "x-nullable": true }, "type": { "type": "string" } } }, "models.FunctionResponse": { "type": "object", "properties": { "log": { "type": "array", "items": { "type": "string" } }, "payload": {} } }, "models.GooglePubSubConfig": { "type": "object", "properties": { "project_id": { "type": "string" }, "service_account": { "description": "encoding/json marshals []byte as a base64 string on the wire.", "type": "string", "format": "byte" }, "subscription_id": { "type": "string" } } }, "models.HMac": { "type": "object", "required": [ "encoding", "hash", "header", "secret" ], "properties": { "encoding": { "$ref": "#/definitions/datastore.EncodingType" }, "hash": { "type": "string" }, "header": { "type": "string" }, "secret": { "type": "string" } } }, "models.IDs": { "type": "object", "properties": { "ids": { "description": "A list of event delivery IDs to forcefully resend.", "type": "array", "items": { "type": "string" } } } }, "models.ImportOpenAPISpec": { "type": "object", "properties": { "spec": { "type": "string" } } }, "models.KafkaAuth": { "type": "object", "properties": { "hash": { "type": "string" }, "password": { "type": "string" }, "tls": { "type": "boolean" }, "type": { "type": "string" }, "username": { "type": "string" } } }, "models.KafkaPubSubConfig": { "type": "object", "properties": { "auth": { "$ref": "#/definitions/models.KafkaAuth" }, "brokers": { "type": "array", "items": { "type": "string" } }, "consumer_group_id": { "type": "string" }, "topic_name": { "type": "string" } } }, "models.MetaEventConfiguration": { "type": "object", "properties": { "event_type": { "type": "array", "items": { "type": "string" } }, "is_enabled": { "type": "boolean" }, "secret": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" } } }, "models.MetaEventResponse": { "type": "object", "properties": { "attempt": { "allOf": [ { "$ref": "#/definitions/datastore.MetaEventAttempt" } ], "x-nullable": true }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "event_type": { "type": "string" }, "metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Metadata" } ], "x-nullable": true }, "project_id": { "type": "string" }, "status": { "$ref": "#/definitions/datastore.EventDeliveryStatus" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "models.MtlsClientCert": { "type": "object", "properties": { "client_cert": { "description": "ClientCert is the client certificate PEM string", "type": "string" }, "client_key": { "description": "ClientKey is the client private key PEM string", "type": "string" } } }, "models.OAuth2": { "type": "object", "properties": { "audience": { "type": "string" }, "authentication_type": { "type": "string" }, "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "expiry_time_unit": { "description": "Expiry time unit (seconds, milliseconds, minutes, hours)", "type": "string" }, "field_mapping": { "description": "Field mapping for flexible token response parsing", "allOf": [ { "$ref": "#/definitions/models.OAuth2FieldMapping" } ] }, "grant_type": { "type": "string" }, "issuer": { "type": "string" }, "scope": { "type": "string" }, "signing_algorithm": { "type": "string" }, "signing_key": { "$ref": "#/definitions/models.OAuth2SigningKey" }, "subject": { "type": "string" }, "url": { "type": "string" } } }, "models.OAuth2FieldMapping": { "type": "object", "properties": { "access_token": { "description": "Field name for access token (e.g., \"accessToken\", \"access_token\", \"token\")", "type": "string" }, "expires_in": { "description": "Field name for expiry time (e.g., \"expiresIn\", \"expires_in\", \"expiresAt\")", "type": "string" }, "token_type": { "description": "Field name for token type (e.g., \"tokenType\", \"token_type\")", "type": "string" } } }, "models.OAuth2SigningKey": { "type": "object", "properties": { "crv": { "description": "EC (Elliptic Curve) key fields", "type": "string" }, "d": { "description": "Private key (EC) or private exponent (RSA)", "type": "string" }, "dp": { "description": "RSA first factor CRT exponent (RSA private key only)", "type": "string" }, "dq": { "description": "RSA second factor CRT exponent (RSA private key only)", "type": "string" }, "e": { "description": "RSA public exponent (RSA only)", "type": "string" }, "kid": { "description": "Key ID", "type": "string" }, "kty": { "description": "Key type: \"EC\" or \"RSA\"", "type": "string" }, "n": { "description": "RSA key fields", "type": "string" }, "p": { "description": "RSA first prime factor (RSA private key only)", "type": "string" }, "q": { "description": "RSA second prime factor (RSA private key only)", "type": "string" }, "qi": { "description": "RSA first CRT coefficient (RSA private key only)", "type": "string" }, "x": { "description": "X coordinate (EC only)", "type": "string" }, "y": { "description": "Y coordinate (EC only)", "type": "string" } } }, "models.OnboardItem": { "type": "object", "properties": { "auth_password": { "type": "string" }, "auth_username": { "type": "string" }, "event_type": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } } }, "models.OnboardValidationError": { "type": "object", "properties": { "field": { "type": "string" }, "message": { "type": "string" }, "row": { "type": "integer" } } }, "models.OptionalTime": { "type": "object", "properties": { "set": { "type": "boolean" }, "time": { "type": "string" } } }, "models.PagedResponse": { "type": "object", "properties": { "content": {}, "pagination": { "allOf": [ { "$ref": "#/definitions/datastore.PaginationData" } ], "x-nullable": true } } }, "models.ProjectConfig": { "type": "object", "properties": { "add_event_id_trace_headers": { "description": "Controls of the Event ID and Event Delivery ID Headers are added to the request when events are dispatched to endpoints", "type": "boolean" }, "circuit_breaker": { "description": "CircuitBreaker is used to configure the project's circuit breaker settings", "allOf": [ { "$ref": "#/definitions/datastore.CircuitBreakerConfiguration" } ] }, "disable_endpoint": { "description": "Controls if the project will disable and endpoint after the retry threshold for an event is reached", "type": "boolean" }, "max_payload_read_size": { "description": "Specifies how many bytes and incoming project should read from the ingest request, and how many bytes an outgoing project should from the response of your endpoints\nDefaults to 50KB.", "type": "integer" }, "meta_event": { "description": "MetaEvent is used to configure the project's meta events", "allOf": [ { "$ref": "#/definitions/models.MetaEventConfiguration" } ] }, "multiple_endpoint_subscriptions": { "description": "MultipleEndpointSubscriptions is used to configure if multiple subscriptions\ncan be created for the endpoint in a project", "type": "boolean" }, "ratelimit": { "description": "RateLimit is used to configure the projects rate limiting config values", "allOf": [ { "$ref": "#/definitions/models.RateLimitConfiguration" } ] }, "replay_attacks_prevention_enabled": { "description": "Controls if your project will add a timestamp to it's webhook signature header to prevent a replay attack, See this blog post[https://getconvoy.io/blog/generating-stripe-like-webhook-signatures] for more]", "type": "boolean" }, "request_id_header": { "description": "RequestIDHeader is the outbound header name for the stable request id sent on webhook deliveries.", "allOf": [ { "$ref": "#/definitions/config.RequestIDHeaderProvider" } ] }, "search_policy": { "description": "Specify the interval in hours for which the event tokenizer runs", "type": "string" }, "signature": { "description": "Signature is used to configure the project's signature header versions", "allOf": [ { "$ref": "#/definitions/models.SignatureConfiguration" } ] }, "ssl": { "description": "SSL is used to configure the project's endpoint ssl enforcement rules", "allOf": [ { "$ref": "#/definitions/models.SSLConfiguration" } ] }, "strategy": { "description": "Strategy is used to configure the project's retry strategies for failing events.", "allOf": [ { "$ref": "#/definitions/models.StrategyConfiguration" } ] }, "sync_dynamic_event_ack": { "description": "SyncDynamicEventAck waits for dynamic endpoint/subscription resolve before\nacknowledging POST /events/dynamic. When false, the handler returns 201 after enqueue.", "type": "boolean" } } }, "models.ProjectResponse": { "type": "object", "properties": { "config": { "allOf": [ { "$ref": "#/definitions/datastore.ProjectConfig" } ], "x-nullable": true }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "logo_url": { "type": "string" }, "name": { "type": "string" }, "organisation_id": { "type": "string" }, "retained_events": { "type": "integer" }, "statistics": { "allOf": [ { "$ref": "#/definitions/datastore.ProjectStatistics" } ], "x-nullable": true }, "type": { "$ref": "#/definitions/datastore.ProjectType" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "models.PubSubConfig": { "type": "object", "properties": { "amqp": { "$ref": "#/definitions/models.AmqpPubSubconfig" }, "google": { "$ref": "#/definitions/models.GooglePubSubConfig" }, "kafka": { "$ref": "#/definitions/models.KafkaPubSubConfig" }, "sqs": { "$ref": "#/definitions/models.SQSPubSubConfig" }, "type": { "$ref": "#/definitions/datastore.PubSubType" }, "workers": { "type": "integer" } } }, "models.RateLimitConfiguration": { "type": "object", "properties": { "count": { "type": "integer" }, "duration": { "type": "integer" } } }, "models.RetryConfiguration": { "type": "object", "properties": { "duration": { "description": "Used to specify a valid Go time duration e.g 10s, 1h3m for how long to wait between event delivery retries", "type": "string" }, "interval_seconds": { "description": "Used to specify a time in seconds for how long to wait between event delivery retries,", "type": "integer" }, "retry_count": { "description": "Used to specify the max number of retries", "type": "integer" }, "type": { "description": "Retry Strategy type", "allOf": [ { "$ref": "#/definitions/datastore.StrategyProvider" } ] } } }, "models.SQSPubSubConfig": { "type": "object", "properties": { "access_key_id": { "type": "string" }, "default_region": { "type": "string" }, "queue_name": { "type": "string" }, "secret_key": { "type": "string" } } }, "models.SSLConfiguration": { "type": "object", "properties": { "enforce_secure_endpoints": { "type": "boolean" } } }, "models.SignatureConfiguration": { "type": "object", "properties": { "header": { "$ref": "#/definitions/config.SignatureHeaderProvider" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/models.SignatureVersion" } } } }, "models.SignatureVersion": { "type": "object", "properties": { "created_at": { "type": "string" }, "encoding": { "type": "string" }, "hash": { "type": "string" }, "uid": { "type": "string" } } }, "models.SourceResponse": { "type": "object", "properties": { "body_function": { "type": "string", "x-nullable": true }, "created_at": { "type": "string" }, "custom_response": { "$ref": "#/definitions/datastore.CustomResponse" }, "deleted_at": { "type": "string", "x-nullable": true }, "event_type_location": { "type": "string" }, "forward_headers": { "type": "array", "items": { "type": "string" } }, "header_function": { "type": "string", "x-nullable": true }, "idempotency_keys": { "type": "array", "items": { "type": "string" } }, "is_disabled": { "type": "boolean" }, "mask_id": { "type": "string" }, "name": { "type": "string" }, "project_id": { "type": "string" }, "provider": { "$ref": "#/definitions/datastore.SourceProvider" }, "provider_config": { "allOf": [ { "$ref": "#/definitions/datastore.ProviderConfig" } ], "x-nullable": true }, "pub_sub": { "allOf": [ { "$ref": "#/definitions/datastore.PubSubConfig" } ], "x-nullable": true }, "type": { "$ref": "#/definitions/datastore.SourceType" }, "uid": { "type": "string" }, "updated_at": { "type": "string" }, "url": { "type": "string" }, "verifier": { "allOf": [ { "$ref": "#/definitions/datastore.VerifierConfig" } ], "x-nullable": true } } }, "models.StrategyConfiguration": { "type": "object", "properties": { "duration": { "type": "integer" }, "retry_count": { "type": "integer" }, "type": { "type": "string" } } }, "models.SubscriptionResponse": { "type": "object", "properties": { "alert_config": { "description": "subscription config", "allOf": [ { "$ref": "#/definitions/datastore.AlertConfiguration" } ], "x-nullable": true }, "created_at": { "type": "string" }, "deleted_at": { "type": "string", "x-nullable": true }, "delivery_mode": { "$ref": "#/definitions/datastore.DeliveryMode" }, "device_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Device" } ], "x-nullable": true }, "endpoint_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Endpoint" } ], "x-nullable": true }, "filter_config": { "allOf": [ { "$ref": "#/definitions/datastore.FilterConfiguration" } ], "x-nullable": true }, "function": { "type": "string", "x-nullable": true }, "name": { "type": "string" }, "project_id": { "type": "string" }, "rate_limit_config": { "allOf": [ { "$ref": "#/definitions/datastore.RateLimitConfiguration" } ], "x-nullable": true }, "retry_config": { "allOf": [ { "$ref": "#/definitions/datastore.RetryConfiguration" } ], "x-nullable": true }, "source_metadata": { "allOf": [ { "$ref": "#/definitions/datastore.Source" } ], "x-nullable": true }, "type": { "$ref": "#/definitions/datastore.SubscriptionType" }, "uid": { "type": "string" }, "updated_at": { "type": "string" } } }, "models.TestFilter": { "type": "object", "properties": { "request": { "description": "Same Request & Headers", "allOf": [ { "$ref": "#/definitions/models.FilterSchema" } ] }, "schema": { "description": "Sample test schema", "allOf": [ { "$ref": "#/definitions/models.FilterSchema" } ] } } }, "models.TestFilterRequest": { "type": "object", "properties": { "payload": { "description": "Sample payload to test against body filter rules. Optional when request scopes are supplied." }, "request": { "description": "Request scopes to test against the filter.", "allOf": [ { "$ref": "#/definitions/models.TestFilterRequestScopes" } ] } } }, "models.TestFilterRequestScopes": { "type": "object", "properties": { "body": {}, "header": { "$ref": "#/definitions/datastore.M" }, "headers": { "description": "Headers accepts either \"headers\" or \"header\" for compatibility with the subscription filter tester.", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] }, "path": { "$ref": "#/definitions/datastore.M" }, "query": { "$ref": "#/definitions/datastore.M" } } }, "models.TestFilterResponse": { "type": "object", "properties": { "is_match": { "description": "Whether the payload matches the filter criteria", "type": "boolean" } } }, "models.TestOAuth2Request": { "type": "object", "properties": { "oauth2": { "$ref": "#/definitions/models.OAuth2" } } }, "models.TestOAuth2Response": { "type": "object", "properties": { "access_token": { "type": "string" }, "error": { "type": "string" }, "expires_at": { "type": "string" }, "message": { "type": "string" }, "success": { "type": "boolean" }, "token_type": { "type": "string" } } }, "models.UpdateCustomResponse": { "type": "object", "properties": { "body": { "type": "string", "x-nullable": true }, "content_type": { "type": "string", "x-nullable": true } } }, "models.UpdateEndpoint": { "type": "object", "properties": { "advanced_signatures": { "description": "Convoy supports two [signature formats](https://getconvoy.io/docs/product-manual/signatures)\n-- simple or advanced. If left unspecified, we default to false.", "type": "boolean" }, "authentication": { "description": "This is used to define any custom authentication required by the endpoint. This\nshouldn't be needed often because webhook endpoints usually should be exposed to\nthe internet.", "allOf": [ { "$ref": "#/definitions/models.EndpointAuthentication" } ] }, "content_type": { "description": "Content type for the endpoint. Defaults to application/json if not specified.", "type": "string" }, "description": { "description": "Human-readable description of the endpoint. Think of this as metadata describing\nthe endpoint", "type": "string" }, "http_timeout": { "description": "Define endpoint http timeout in seconds.", "type": "integer" }, "is_disabled": { "description": "This is used to manually enable/disable the endpoint.", "type": "boolean" }, "mtls_client_cert": { "description": "mTLS client certificate configuration for the endpoint", "allOf": [ { "$ref": "#/definitions/models.MtlsClientCert" } ] }, "name": { "type": "string" }, "owner_id": { "description": "The OwnerID is used to group more than one endpoint together to achieve\n[fanout](https://getconvoy.io/docs/manual/endpoints#Endpoint%20Owner%20ID)", "type": "string" }, "rate_limit": { "description": "Rate limit is the total number of requests to be sent to an endpoint in\nthe time duration specified in RateLimitDuration", "type": "integer" }, "rate_limit_duration": { "description": "Rate limit duration specifies the time range for the rate limit.", "type": "integer" }, "secret": { "description": "Endpoint's webhook secret. If not provided, Convoy autogenerates one for the endpoint.", "type": "string" }, "slack_webhook_url": { "description": "Slack webhook URL is an alternative method to support email where endpoint developers\ncan receive failure notifications on a slack channel.", "type": "string" }, "support_email": { "description": "Endpoint developers support email. This is used for communicating endpoint state\nchanges. You should always turn this on when disabling endpoints are enabled.", "type": "string" }, "url": { "description": "URL is the endpoint's URL prefixed with https. non-https urls are currently\nnot supported.", "type": "string" } } }, "models.UpdateEventType": { "type": "object", "properties": { "category": { "description": "Category is a product-specific grouping for the event type", "type": "string" }, "description": { "description": "Description is used to describe what the event type does", "type": "string" }, "json_schema": { "description": "JSONSchema is the JSON structure of the event type", "type": "object", "additionalProperties": true, "x-nullable": true } } }, "models.UpdateFilterRequest": { "type": "object", "properties": { "body": { "description": "Body matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] }, "enabled_at": { "description": "Non-null when this filter is active.", "allOf": [ { "$ref": "#/definitions/models.OptionalTime" } ] }, "event_type": { "description": "Type of event this filter applies to (optional)", "type": "string" }, "headers": { "description": "Header matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] }, "is_flattened": { "description": "Whether the filter uses flattened JSON paths (optional)", "type": "boolean" }, "path": { "description": "Path matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] }, "query": { "description": "Query matching criteria (optional)", "allOf": [ { "$ref": "#/definitions/datastore.M" } ] } } }, "models.UpdateProject": { "type": "object", "properties": { "config": { "description": "Project Config", "allOf": [ { "$ref": "#/definitions/models.ProjectConfig" } ] }, "logo_url": { "type": "string" }, "name": { "description": "Project Name", "type": "string" } } }, "models.UpdateSource": { "type": "object", "properties": { "body_function": { "description": "Function is a javascript function used to mutate the payload\nimmediately after ingesting an event", "type": "string" }, "custom_response": { "description": "Custom response is used to define a custom response for incoming\nwebhooks project sources only.", "allOf": [ { "$ref": "#/definitions/models.UpdateCustomResponse" } ] }, "event_type_location": { "description": "EventTypeLocation is used to specify where Convoy should read the event type\nfrom an incoming webhook request.", "type": "string" }, "forward_headers": { "description": "Soecfy header you want convoy to save from the ingest request and forward to your endpoints when the event is dispatched.", "type": "array", "items": { "type": "string" } }, "header_function": { "description": "Function is a javascript function used to mutate the headers\nimmediately after ingesting an event", "type": "string" }, "idempotency_keys": { "description": "IdempotencyKeys are used to specify parts of a webhook request to uniquely\nidentify the event in an incoming webhooks project.", "type": "array", "items": { "type": "string" } }, "is_disabled": { "description": "This is used to manually enable/disable the source.", "type": "boolean" }, "name": { "description": "Source name.", "type": "string" }, "pub_sub": { "description": "PubSub are used to specify message broker sources for outgoing\nwebhooks projects, you only need to specify this when the source type is `pub_sub`.", "allOf": [ { "$ref": "#/definitions/models.PubSubConfig" } ] }, "type": { "description": "Source Type.", "allOf": [ { "$ref": "#/definitions/datastore.SourceType" } ] }, "verifier": { "description": "Verifiers are used to verify webhook events ingested in incoming\nwebhooks projects. If set, type is required and match the verifier\ntype object you choose.", "allOf": [ { "$ref": "#/definitions/models.VerifierConfig" } ] } } }, "models.UpdateSubscription": { "type": "object", "properties": { "alert_config": { "description": "Alert configuration", "allOf": [ { "$ref": "#/definitions/models.AlertConfiguration" } ] }, "app_id": { "description": "Deprecated but necessary for backward compatibility", "type": "string" }, "delivery_mode": { "description": "Delivery mode configuration", "allOf": [ { "$ref": "#/definitions/datastore.DeliveryMode" } ] }, "endpoint_id": { "description": "Destination endpoint ID", "type": "string" }, "filter_config": { "description": "Filter configuration", "allOf": [ { "$ref": "#/definitions/models.FilterConfiguration" } ] }, "function": { "description": "Convoy supports mutating your request payload using a js function. Use this field\nto specify a `transform` function for this purpose. See this[https://docs.getconvoy.io/product-manual/subscriptions#functions] for more", "type": "string" }, "name": { "description": "Subscription Nme", "type": "string" }, "rate_limit_config": { "description": "Rate limit configuration", "allOf": [ { "$ref": "#/definitions/models.RateLimitConfiguration" } ] }, "retry_config": { "description": "Retry configuration", "allOf": [ { "$ref": "#/definitions/models.RetryConfiguration" } ] }, "source_id": { "description": "Source Id", "type": "string" } } }, "models.VerifierConfig": { "type": "object", "required": [ "type" ], "properties": { "api_key": { "$ref": "#/definitions/models.ApiKey" }, "basic_auth": { "$ref": "#/definitions/models.BasicAuth" }, "hmac": { "$ref": "#/definitions/models.HMac" }, "type": { "$ref": "#/definitions/datastore.VerifierType" } } }, "util.ServerResponse": { "type": "object", "properties": { "message": { "type": "string" }, "status": { "type": "boolean" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "tags": [ { "description": "Project related APIs", "name": "Projects" }, { "description": "Subscription related APIs", "name": "Subscriptions" }, { "description": "Endpoint related APIs", "name": "Endpoints" }, { "description": "Event related APIs", "name": "Events" }, { "description": "Source related APIs", "name": "Sources" }, { "description": "EventDelivery related APIs", "name": "Event Deliveries" }, { "description": "Delivery Attempt related APIs", "name": "Delivery Attempts" }, { "description": "Portal Links related APIs", "name": "Portal Links" }, { "description": "Meta Events related APIs", "name": "Meta Events" }, { "description": "Event Types related APIs", "name": "EventTypes" }, { "description": "Filters related APIs", "name": "Filters" }, { "description": "Onboard related APIs", "name": "Onboard" } ], "produces": [ "application/json" ], "consumes": [ "application/json" ] }