Create Message
Changed onCreates a new message and dispatches it to all of the application's endpoints.
The eventId is 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 same eventId already exists for the application, a 409 conflict error will be returned.
The eventType indicates the type and schema of the event. All messages of a certain eventType are expected to have the same schema. Endpoints can choose to only listen to specific event types. Messages can also have channels, 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 payload property is the webhook's body (the actual webhook message). Svix supports payload sizes of up to 1MiB, though it's generally a good idea to keep webhook payloads small, probably no larger than 40kb.
Request
- Base URLhttps://api.eu.svix.com
- URLhttps://api.eu.svix.com/api/v1/app/{app_id}/msg
- AuthHTTP bearer
Path parameters
The Application's ID or UID.
Query parameters
When true, message payloads are included in the response.
Defaults to false in v2+ of the Svix SDKs, true in v1 or when manually making a request without specifying this parameter.
Headers
The request's idempotency key
Request body
Example request
{
"application": {
"name": "My first application",
"uid": "unique-identifier"
},
"channels": [
"project_123",
"group_2"
],
"eventId": "unique-identifier",
"eventType": "user.signup",
"payload": {
"type": "user.created",
"email": "test@example.com",
"username": "test_user"
},
"payloadRetentionPeriod": 90,
"tags": [
"my_tag",
"other"
]
}Response
Example response
{
"channels": [
"project_123",
"group_2"
],
"eventId": "unique-identifier",
"eventType": "user.signup",
"id": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2",
"payload": {
"type": "user.created",
"email": "test@example.com",
"username": "test_user"
},
"tags": [
"project_1337"
]
}Changes
- info
added the non-success response with the status
- info
- warning
the
/request property's maxLength was set to512 - info
added the required property
to the response with the status
- warning