Svix API
Welcome to the Svix API documentation!
Useful links: | | |
Introduction
This is the reference documentation and schemas for the API. For tutorials and other documentation please refer to .
Main concepts
In Svix you have four important entities you will be interacting with:
messages: these are the webhooks being sent. They can have contents and a few other properties.application: this is wheremessagesare sent to. Usually you want to create one application for each user on your platform.endpoint: endpoints are the URLs messages will be sent to. Each application can have multipleendpointsand each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type).event-type: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint.
Authentication
Get your authentication token (AUTH_TOKEN) from the and use it as part of the Authorization header as such: Authorization: Bearer ${AUTH_TOKEN}.
Code samples
The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to .
Idempotency
Svix supports for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response.
To perform an idempotent request, pass the idempotency key in the Idempotency-Key header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions.
Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result.
Please note that idempotency is only supported for POST requests.
Cross-Origin Resource Sharing
This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with . And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
- Homepage
- https://api.apis.guru/v2/specs/svix.com/1.4.json
- Provider
- svix.com
- OpenAPI version
- 3.0.2
- Spec (JSON)
- https://api.apis.guru/v2/specs/svix.com/1.4/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/svix.com/1.4/openapi.yaml
Tools (54)
Extracted live via the executor SDK.
-
application.createApplicationApiV1AppPostCreate a new application.
-
application.deleteApplicationApiV1AppAppIdDeleteDelete an application.
-
application.getApplicationApiV1AppAppIdGetGet an application.
-
application.listApplicationsApiV1AppGetList of all the organization's applications.
-
application.updateApplicationApiV1AppAppIdPutUpdate an application.
-
authentication.expireAllApiV1AuthAppAppIdExpireAllPostExpire all of the tokens associated with a specific Application
-
authentication.getAppPortalAccessApiV1AuthAppPortalAccessAppIdPostUse this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.
-
authentication.getDashboardAccessApiV1AuthDashboardAccessAppIdPostDEPRECATED: Please use
app-portal-accessinstead.Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.
-
authentication.logoutApiV1AuthLogoutPostLogout an app token.
Trying to log out other tokens will fail.
-
backgroundTasks.getBackgroundTaskApiV1BackgroundTaskTaskIdGetGet a background task by ID.
-
backgroundTasks.listBackgroundTasksApiV1BackgroundTaskGetList background tasks executed in the past 90 days.
-
endpoint.createEndpointApiV1AppAppIdEndpointPostCreate a new endpoint for the application.
When
secretisnullthe secret is automatically generated (recommended) -
endpoint.deleteEndpointApiV1AppAppIdEndpointEndpointIdDeleteDelete an endpoint.
-
endpoint.getEndpointApiV1AppAppIdEndpointEndpointIdGetGet an application.
-
endpoint.getEndpointHeadersApiV1AppAppIdEndpointEndpointIdHeadersGetGet the additional headers to be sent with the webhook
-
endpoint.getEndpointSecretApiV1AppAppIdEndpointEndpointIdSecretGetGet the endpoint's signing secret.
This is used to verify the authenticity of the webhook. For more information please refer to .
-
endpoint.getEndpointStatsApiV1AppAppIdEndpointEndpointIdStatsGetGet basic statistics for the endpoint.
-
endpoint.getEndpointTransformationApiV1AppAppIdEndpointEndpointIdTransformationGetGet the transformation code associated with this endpoint
-
endpoint.listEndpointsApiV1AppAppIdEndpointGetList the application's endpoints.
-
endpoint.patchEndpointHeadersApiV1AppAppIdEndpointEndpointIdHeadersPatchPartially set the additional headers to be sent with the webhook
-
endpoint.recoverFailedWebhooksApiV1AppAppIdEndpointEndpointIdRecoverPostResend all failed messages since a given time.
-
endpoint.replayMissingWebhooksApiV1AppAppIdEndpointEndpointIdReplayMissingPostReplays messages to the endpoint. Only messages that were created after
sincewill be sent. Messages that were previously sent to the endpoint are not resent. -
endpoint.rotateEndpointSecretApiV1AppAppIdEndpointEndpointIdSecretRotatePostRotates the endpoint's signing secret. The previous secret will be valid for the next 24 hours.
-
endpoint.setEndpointTransformationApiV1AppAppIdEndpointEndpointIdTransformationPatchSet or unset the transformation code associated with this endpoint
-
endpoint.updateEndpointApiV1AppAppIdEndpointEndpointIdPutUpdate an endpoint.
-
endpoint.updateEndpointHeadersApiV1AppAppIdEndpointEndpointIdHeadersPutSet the additional headers to be sent with the webhook
-
eventType.createEventTypeApiV1EventTypePostCreate new or unarchive existing event type.
Unarchiving an event type will allow endpoints to filter on it and messages to be sent with it. Endpoints filtering on the event type before archival will continue to filter on it. This operation does not preserve the description and schemas.
-
eventType.deleteEventTypeApiV1EventTypeEventTypeNameDeleteArchive an event type.
Endpoints already configured to filter on an event type will continue to do so after archival. However, new messages can not be sent with it and endpoints can not filter on it. An event type can be unarchived with the .
If
expunge=trueis set then the event type is deleted instead of archived. This can only be used in development environments.__ -
eventType.getEventTypeApiV1EventTypeEventTypeNameGetGet an event type.
-
eventType.listEventTypesApiV1EventTypeGetReturn the list of event types.
-
eventType.updateEventTypeApiV1EventTypeEventTypeNamePutUpdate an event type.
-
health.healthApiV1HealthGetVerify the API server is up and running.
-
integration.createIntegrationApiV1AppAppIdIntegrationPostCreate an integration.
-
integration.deleteIntegrationApiV1AppAppIdIntegrationIntegIdDeleteDelete an integration and revoke it's key.
-
integration.getIntegrationApiV1AppAppIdIntegrationIntegIdGetGet an integration.
-
integration.getIntegrationKeyApiV1AppAppIdIntegrationIntegIdKeyGetGet an integration's key.
-
integration.listIntegrationsApiV1AppAppIdIntegrationGetList the application's integrations.
-
integration.rotateIntegrationKeyApiV1AppAppIdIntegrationIntegIdKeyRotatePostRotate the integration's key. The previous key will be immediately revoked.
-
integration.updateIntegrationApiV1AppAppIdIntegrationIntegIdPutUpdate an integration.
-
message.createMessageApiV1AppAppIdMsgPostCreates a new message and dispatches it to all of the application's endpoints.
The
eventIdis an optional custom unique ID. It's verified to be unique only up to a day, after that no verification will be made. If a message with the sameeventIdalready exists for any application in your environment, a 409 conflict error will be returned.The
eventTypeindicates the type and schema of the event. All messages of a certaineventTypeare expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also havechannels, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don't imply a specific message content or schema.The
payloadproperty is the webhook's body (the actual webhook message). Svix supports payload sizes of up to ~350kb, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.The optional
applicationproperty will be used to create an application if the application referenced in the path does not exist. If it does then this property is ignored. -
message.expungeMessagePayloadApiV1AppAppIdMsgMsgIdContentDeleteDelete the given message's payload. Useful in cases when a message was accidentally sent with sensitive content.
The message can't be replayed or resent once its payload has been deleted or expired.
-
message.getMessageApiV1AppAppIdMsgMsgIdGetGet a message by its ID or eventID.
-
message.listMessagesApiV1AppAppIdMsgGetList all of the application's messages.
The
beforeparameter lets you filter all items created before a certain date and is ignored if an iterator is passed. Theafterparameter lets you filter all items created after a certain date and is ignored if an iterator is passed.beforeandaftercannot be used simultaneously. -
messageAttempt.expungeAttemptContentApiV1AppAppIdMsgMsgIdAttemptAttemptIdContentDeleteDeletes the given attempt's response body. Useful when an endpoint accidentally returned sensitive content.
-
messageAttempt.getAttemptApiV1AppAppIdMsgMsgIdAttemptAttemptIdGetmsg_id: Use a message id or a messageeventId -
messageAttempt.listAttemptedDestinationsApiV1AppAppIdMsgMsgIdEndpointGetmsg_id: Use a message id or a messageeventId -
messageAttempt.listAttemptedMessagesApiV1AppAppIdEndpointEndpointIdMsgGetList messages for a particular endpoint. Additionally includes metadata about the latest message attempt.
The
beforeparameter lets you filter all items created before a certain date and is ignored if an iterator is passed. -
messageAttempt.listAttemptsApiV1AppAppIdMsgMsgIdAttemptGetDeprecated: Please use "List Attempts by Endpoint" and "List Attempts by Msg" instead.
msg_id: Use a message id or a messageeventId -
messageAttempt.listAttemptsByEndpointApiV1AppAppIdAttemptEndpointEndpointIdGetList attempts by endpoint id
-
messageAttempt.listAttemptsByMsgApiV1AppAppIdAttemptMsgMsgIdGetList attempts by message id
-
messageAttempt.listAttemptsForEndpointApiV1AppAppIdMsgMsgIdEndpointEndpointIdAttemptGetDEPRECATED: please use list_attempts with endpoint_id as a query parameter instead.
List the message attempts for a particular endpoint.
Returning the endpoint.
The
beforeparameter lets you filter all items created before a certain date and is ignored if an iterator is passed. -
messageAttempt.resendWebhookApiV1AppAppIdMsgMsgIdEndpointEndpointIdResendPostResend a message to the specified endpoint.
-
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools