openapi: 3.0.0 info: contact: email: support@getconvoy.io name: Convoy Support url: https://getconvoy.io/docs description: Convoy is a fast and secure webhooks proxy. This document contains datastore's API specification. license: name: Mozilla Public License 2.0 url: https://www.mozilla.org/en-US/MPL/2.0/ termsOfService: https://getconvoy.io/terms title: Convoy API Reference Delivery Attempts Events API version: 26.3.5 servers: - url: https://us.getconvoy.cloud/api description: US Region - url: https://eu.getconvoy.cloud/api description: EU Region tags: - description: Event related APIs name: Events paths: /v1/projects/{projectID}/events: get: parameters: - description: Project ID in: path name: projectID required: true schema: type: string - in: query name: direction schema: enum: - next - prev type: string x-enum-varnames: - Next - Prev - description: The end date example: '2008-05-02T15:04:05' in: query name: endDate schema: type: string - description: A list of endpoint ids to filter by in: query name: endpointId schema: items: type: string type: array style: form - description: IdempotencyKey to filter by in: query name: idempotencyKey schema: type: string - description: A pagination cursor to fetch the next page of a list example: 01H0JA5MEES38RRK3HTEJC647K in: query name: next_page_cursor schema: type: string - description: The number of items to return per page example: 20 in: query name: perPage schema: type: integer - description: A pagination cursor to fetch the previous page of a list example: 01H0JATTVCXZK8FRDX1M1JN3QY in: query name: prev_page_cursor schema: type: string - description: Any arbitrary value to filter the events payload in: query name: query schema: type: string - description: Sort order, values are `ASC` or `DESC`, defaults to `DESC` example: ASC | DESC in: query name: sort schema: type: string - description: A list of Source IDs to filter the events by. in: query name: sourceId schema: items: type: string type: array style: form - description: The start date example: '2006-01-02T15:04:05' in: query name: startDate schema: type: string responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: allOf: - $ref: '#/components/schemas/models.PagedResponse' - properties: content: items: $ref: '#/components/schemas/models.EventResponse' type: array type: object type: object description: OK '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events description: This endpoint fetches app events with pagination operationId: GetEventsPaged summary: List All Events post: parameters: - description: Project ID in: path name: projectID required: true schema: type: string responses: '201': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Created '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events description: This endpoint creates an endpoint event operationId: CreateEndpointEvent requestBody: content: application/json: schema: $ref: '#/components/schemas/models.CreateEvent' description: Event Details required: true summary: Create an Event /v1/projects/{projectID}/events/batchreplay: post: parameters: - description: Project ID in: path name: projectID required: true schema: type: string - in: query name: direction schema: enum: - next - prev type: string x-enum-varnames: - Next - Prev - description: The end date example: '2008-05-02T15:04:05' in: query name: endDate schema: type: string - description: A list of endpoint ids to filter by in: query name: endpointId schema: items: type: string type: array style: form - description: IdempotencyKey to filter by in: query name: idempotencyKey schema: type: string - description: A pagination cursor to fetch the next page of a list example: 01H0JA5MEES38RRK3HTEJC647K in: query name: next_page_cursor schema: type: string - description: The number of items to return per page example: 20 in: query name: perPage schema: type: integer - description: A pagination cursor to fetch the previous page of a list example: 01H0JATTVCXZK8FRDX1M1JN3QY in: query name: prev_page_cursor schema: type: string - description: Any arbitrary value to filter the events payload in: query name: query schema: type: string - description: Sort order, values are `ASC` or `DESC`, defaults to `DESC` example: ASC | DESC in: query name: sort schema: type: string - description: A list of Source IDs to filter the events by. in: query name: sourceId schema: items: type: string type: array style: form - description: The start date example: '2006-01-02T15:04:05' in: query name: startDate schema: type: string responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: type: string type: object description: OK '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events description: This endpoint replays multiple events at once. operationId: BatchReplayEvents summary: Batch Replay Events /v1/projects/{projectID}/events/broadcast: post: parameters: - description: Project ID in: path name: projectID required: true schema: type: string responses: '201': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/models.EventResponse' type: object description: Created '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events description: This endpoint creates a event that is broadcast to every endpoint whose subscription matches the given event type. operationId: CreateBroadcastEvent requestBody: content: application/json: schema: $ref: '#/components/schemas/models.BroadcastEvent' description: Broadcast Event Details required: true summary: Create a Broadcast Event /v1/projects/{projectID}/events/dynamic: post: parameters: - description: Project ID in: path name: projectID required: true schema: type: string responses: '201': content: application/json: schema: $ref: '#/components/schemas/handlers.Stub' description: Created '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events 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 operationId: CreateDynamicEvent requestBody: content: application/json: schema: $ref: '#/components/schemas/models.DynamicEvent' description: Event Details required: true summary: Dynamic Events /v1/projects/{projectID}/events/fanout: post: parameters: - description: Project ID in: path name: projectID required: true schema: type: string responses: '201': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Created '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events description: This endpoint uses the owner_id to fan out an event to multiple endpoints. operationId: CreateEndpointFanoutEvent requestBody: content: application/json: schema: $ref: '#/components/schemas/models.FanoutEvent' description: Event Details required: true summary: Fan Out an Event /v1/projects/{projectID}/events/{eventID}: get: parameters: - description: Project ID in: path name: projectID required: true schema: type: string - description: event id in: path name: eventID required: true schema: type: string responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/models.EventResponse' type: object description: OK '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events description: This endpoint retrieves an event operationId: GetEndpointEvent summary: Retrieve an Event /v1/projects/{projectID}/events/{eventID}/replay: put: parameters: - description: Project ID in: path name: projectID required: true schema: type: string - description: event id in: path name: eventID required: true schema: type: string responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/models.EventResponse' type: object description: OK '400': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Bad Request '401': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Unauthorized '404': content: application/json: schema: allOf: - $ref: '#/components/schemas/util.ServerResponse' - properties: data: $ref: '#/components/schemas/handlers.Stub' type: object description: Not Found security: - ApiKeyAuth: [] tags: - Events description: This endpoint replays an event afresh assuming it is a new event. operationId: ReplayEndpointEvent summary: Replay Event components: schemas: models.DynamicEvent: properties: custom_headers: additionalProperties: type: string description: Specifies custom headers you want convoy to add when the event is dispatched to your endpoint type: object data: description: 'Data is an arbitrary JSON value that gets sent as the body of the webhook to the endpoints' type: object 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 items: type: string type: array 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 not supported.' type: string type: object datastore.KafkaPubSubConfig: properties: auth: $ref: '#/components/schemas/datastore.KafkaAuth' brokers: items: type: string type: array consumer_group_id: type: string topic_name: type: string type: object datastore.PaginationData: 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 type: object datastore.Secret: properties: created_at: type: string deleted_at: type: string expires_at: type: string uid: type: string updated_at: type: string value: type: string type: object handlers.Stub: type: object datastore.ProviderConfig: properties: twitter: $ref: '#/components/schemas/datastore.TwitterProviderConfig' type: object datastore.PubSubConfig: properties: amqp: $ref: '#/components/schemas/datastore.AmqpPubSubConfig' google: $ref: '#/components/schemas/datastore.GooglePubSubConfig' kafka: $ref: '#/components/schemas/datastore.KafkaPubSubConfig' sqs: $ref: '#/components/schemas/datastore.SQSPubSubConfig' type: $ref: '#/components/schemas/datastore.PubSubType' workers: type: integer type: object datastore.KafkaAuth: properties: hash: type: string password: type: string tls: type: boolean type: type: string username: type: string type: object datastore.SourceProvider: enum: - github - twitter - shopify type: string x-enum-varnames: - GithubSourceProvider - TwitterSourceProvider - ShopifySourceProvider datastore.EncodingType: enum: - base64 - hex type: string x-enum-varnames: - Base64Encoding - HexEncoding datastore.PubSubType: enum: - sqs - google - kafka - amqp type: string x-enum-varnames: - SqsPubSub - GooglePubSub - KafkaPubSub - AmqpPubSub datastore.ApiKey: properties: header_name: type: string header_value: type: string type: object datastore.HMac: properties: encoding: $ref: '#/components/schemas/datastore.EncodingType' hash: type: string header: type: string secret: type: string type: object datastore.OAuth2FieldMapping: 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 type: object datastore.AmqpCredentials: properties: password: type: string user: type: string type: object datastore.VerifierType: enum: - noop - hmac - basic_auth - api_key type: string x-enum-varnames: - NoopVerifier - HMacVerifier - BasicAuthVerifier - APIKeyVerifier datastore.MtlsClientCert: 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 type: object util.ServerResponse: properties: message: type: string status: type: boolean type: object httpheader.HTTPHeader: additionalProperties: items: type: string type: array type: object datastore.OAuth2SigningKey: 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 type: object models.FanoutEvent: properties: custom_headers: additionalProperties: type: string description: Specifies custom headers you want convoy to add when the event is dispatched to your endpoint type: object data: description: 'Data is an arbitrary JSON value that gets sent as the body of the webhook to the endpoints' type: object 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 type: object datastore.GooglePubSubConfig: properties: project_id: type: string service_account: items: type: integer type: array subscription_id: type: string type: object datastore.OAuth2AuthenticationType: enum: - shared_secret - client_assertion type: string x-enum-varnames: - SharedSecretAuth - ClientAssertionAuth datastore.EndpointAuthentication: properties: api_key: $ref: '#/components/schemas/datastore.ApiKey' basic_auth: $ref: '#/components/schemas/datastore.BasicAuth' oauth2: $ref: '#/components/schemas/datastore.OAuth2' type: $ref: '#/components/schemas/datastore.EndpointAuthenticationType' type: object datastore.BasicAuth: properties: password: type: string username: type: string type: object models.PagedResponse: properties: content: {} pagination: allOf: - $ref: '#/components/schemas/datastore.PaginationData' nullable: true type: object datastore.Endpoint: properties: advanced_signatures: type: boolean authentication: $ref: '#/components/schemas/datastore.EndpointAuthentication' content_type: type: string created_at: type: string deleted_at: type: string description: type: string events: type: integer failure_rate: type: number http_timeout: type: integer mtls_client_cert: allOf: - $ref: '#/components/schemas/datastore.MtlsClientCert' description: mTLS client certificate configuration name: type: string owner_id: type: string project_id: type: string rate_limit: type: integer rate_limit_duration: type: integer secrets: items: $ref: '#/components/schemas/datastore.Secret' type: array slack_webhook_url: type: string status: $ref: '#/components/schemas/datastore.EndpointStatus' support_email: type: string uid: type: string updated_at: type: string url: type: string type: object datastore.EndpointStatus: enum: - active - inactive - paused type: string x-enum-varnames: - ActiveEndpointStatus - InactiveEndpointStatus - PausedEndpointStatus datastore.CustomResponse: properties: body: type: string content_type: type: string type: object datastore.OAuth2: properties: audience: type: string authentication_type: $ref: '#/components/schemas/datastore.OAuth2AuthenticationType' client_id: type: string client_secret: description: Encrypted at rest type: string expiry_time_unit: allOf: - $ref: '#/components/schemas/datastore.OAuth2ExpiryTimeUnit' description: Expiry time unit (seconds, milliseconds, minutes, hours) field_mapping: allOf: - $ref: '#/components/schemas/datastore.OAuth2FieldMapping' description: Field mapping for flexible token response parsing grant_type: type: string issuer: type: string scope: type: string signing_algorithm: type: string signing_key: allOf: - $ref: '#/components/schemas/datastore.OAuth2SigningKey' description: Encrypted at rest subject: type: string url: type: string type: object models.CreateEvent: properties: app_id: description: Deprecated but necessary for backward compatibility. type: string custom_headers: additionalProperties: type: string description: Specifies custom headers you want convoy to add when the event is dispatched to your endpoint type: object data: description: 'Data is an arbitrary JSON value that gets sent as the body of the webhook to the endpoints' type: object endpoint_id: description: Specifies the endpoint to send this event to. 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 type: object models.BroadcastEvent: properties: acknowledged_at: type: string custom_headers: additionalProperties: type: string description: Specifies custom headers you want convoy to add when the event is dispatched to your endpoint type: object data: description: 'Data is an arbitrary JSON value that gets sent as the body of the webhook to the endpoints' type: object 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 type: object datastore.SourceType: enum: - http - rest_api - pub_sub - db_change_stream type: string x-enum-varnames: - HTTPSource - RestApiSource - PubSubSource - DBChangeStream datastore.Source: properties: body_function: type: string created_at: type: string custom_response: $ref: '#/components/schemas/datastore.CustomResponse' deleted_at: type: string forward_headers: items: type: string type: array header_function: type: string idempotency_keys: items: type: string type: array is_disabled: type: boolean mask_id: type: string name: type: string project_id: type: string provider: $ref: '#/components/schemas/datastore.SourceProvider' provider_config: $ref: '#/components/schemas/datastore.ProviderConfig' pub_sub: $ref: '#/components/schemas/datastore.PubSubConfig' type: $ref: '#/components/schemas/datastore.SourceType' uid: type: string updated_at: type: string url: type: string verifier: $ref: '#/components/schemas/datastore.VerifierConfig' type: object datastore.OAuth2ExpiryTimeUnit: enum: - seconds - milliseconds - minutes - hours type: string x-enum-varnames: - ExpiryTimeUnitSeconds - ExpiryTimeUnitMilliseconds - ExpiryTimeUnitMinutes - ExpiryTimeUnitHours datastore.EndpointAuthenticationType: enum: - api_key - oauth2 - basic_auth type: string x-enum-varnames: - APIKeyAuthentication - OAuth2Authentication - BasicAuthentication datastore.VerifierConfig: properties: api_key: $ref: '#/components/schemas/datastore.ApiKey' basic_auth: $ref: '#/components/schemas/datastore.BasicAuth' hmac: $ref: '#/components/schemas/datastore.HMac' type: $ref: '#/components/schemas/datastore.VerifierType' type: object datastore.EventStatus: enum: - Processing - Failure - Success - Retry - Pending type: string x-enum-varnames: - ProcessingStatus - FailureStatus - SuccessStatus - RetryStatus - PendingStatus datastore.TwitterProviderConfig: properties: crc_verified_at: type: string type: object models.EventResponse: properties: acknowledged_at: type: string 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 webhook to the endpoints' items: type: integer type: array deleted_at: type: string endpoint_metadata: items: $ref: '#/components/schemas/datastore.Endpoint' type: array endpoints: items: type: string type: array event_type: type: string headers: $ref: '#/components/schemas/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: $ref: '#/components/schemas/datastore.Source' status: $ref: '#/components/schemas/datastore.EventStatus' uid: type: string updated_at: type: string url_query_params: type: string type: object datastore.SQSPubSubConfig: 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 type: object datastore.AmqpPubSubConfig: properties: host: type: string auth: $ref: '#/components/schemas/datastore.AmqpCredentials' bindedExchange: type: string deadLetterExchange: type: string port: type: string queue: type: string routingKey: type: string schema: type: string vhost: type: string type: object securitySchemes: ApiKeyAuth: in: header name: Authorization type: apiKey