svix 0.39.0 → 0.44.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/svix/api/application_api.rb +8 -1
- data/lib/svix/api/authentication_api.rb +1 -1
- data/lib/svix/api/endpoint_api.rb +22 -18
- data/lib/svix/api/environment_api.rb +152 -0
- data/lib/svix/api/environment_settings_api.rb +79 -0
- data/lib/svix/api/event_type_api.rb +5 -1
- data/lib/svix/api/health_api.rb +1 -1
- data/lib/svix/api/integration_api.rb +606 -0
- data/lib/svix/api/message_api.rb +10 -3
- data/lib/svix/api/message_attempt_api.rb +17 -1
- data/lib/svix/api/organization_api.rb +152 -0
- data/lib/svix/api/organization_settings_api.rb +1 -1
- data/lib/svix/api/statistics_api.rb +1 -1
- data/lib/svix/api_client.rb +1 -1
- data/lib/svix/api_error.rb +1 -1
- data/lib/svix/configuration.rb +1 -1
- data/lib/svix/endpoint_api.rb +1 -1
- data/lib/svix/integration_api.rb +38 -0
- data/lib/svix/internal.rb +1 -0
- data/lib/svix/models/application_in.rb +1 -1
- data/lib/svix/models/application_out.rb +1 -1
- data/lib/svix/models/attempt_statistics_data.rb +1 -1
- data/lib/svix/models/attempt_statistics_response.rb +1 -1
- data/lib/svix/models/border_radius_config.rb +1 -1
- data/lib/svix/models/border_radius_enum.rb +1 -1
- data/lib/svix/models/custom_theme_override.rb +1 -1
- data/lib/svix/models/dashboard_access_out.rb +1 -1
- data/lib/svix/models/endpoint_created_event.rb +1 -1
- data/lib/svix/models/endpoint_created_event_data.rb +1 -1
- data/lib/svix/models/endpoint_deleted_event.rb +1 -1
- data/lib/svix/models/endpoint_deleted_event_data.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event_data.rb +1 -1
- data/lib/svix/models/endpoint_headers_in.rb +1 -1
- data/lib/svix/models/endpoint_headers_out.rb +1 -1
- data/lib/svix/models/endpoint_in.rb +38 -2
- data/lib/svix/models/endpoint_message_out.rb +38 -2
- data/lib/svix/models/endpoint_out.rb +38 -2
- data/lib/svix/models/endpoint_secret_out.rb +1 -1
- data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
- data/lib/svix/models/endpoint_stats.rb +1 -1
- data/lib/svix/models/endpoint_update.rb +38 -2
- data/lib/svix/models/endpoint_updated_event.rb +1 -1
- data/lib/svix/models/endpoint_updated_event_data.rb +1 -1
- data/lib/svix/models/environment_in.rb +257 -0
- data/lib/svix/models/environment_out.rb +259 -0
- data/lib/svix/models/environment_settings_out.rb +308 -0
- data/lib/svix/models/event_example_in.rb +1 -1
- data/lib/svix/models/event_type_example_out.rb +1 -1
- data/lib/svix/models/event_type_in.rb +1 -1
- data/lib/svix/models/event_type_out.rb +1 -1
- data/lib/svix/models/event_type_schema_in.rb +1 -1
- data/lib/svix/models/event_type_update.rb +1 -1
- data/lib/svix/models/export_organization_out.rb +259 -0
- data/lib/svix/models/font_size_config.rb +1 -1
- data/lib/svix/models/http_error_out.rb +1 -1
- data/lib/svix/models/http_validation_error.rb +1 -1
- data/lib/svix/models/import_organization_in.rb +257 -0
- data/lib/svix/models/integration_in.rb +223 -0
- data/lib/svix/models/{border_radii_config.rb → integration_key_out.rb} +16 -29
- data/lib/svix/models/integration_out.rb +265 -0
- data/lib/svix/models/integration_update.rb +223 -0
- data/lib/svix/models/list_response_application_out.rb +1 -1
- data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
- data/lib/svix/models/list_response_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_event_type_out.rb +1 -1
- data/lib/svix/models/{endpointd_updated_event.rb → list_response_integration_out.rb} +28 -49
- data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
- data/lib/svix/models/list_response_message_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_message_out.rb +1 -1
- data/lib/svix/models/message_attempt_endpoint_out.rb +1 -1
- data/lib/svix/models/message_attempt_exhausted_event.rb +1 -1
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -1
- data/lib/svix/models/message_attempt_failed_event.rb +1 -1
- data/lib/svix/models/message_attempt_out.rb +1 -1
- data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
- data/lib/svix/models/message_endpoint_out.rb +38 -2
- data/lib/svix/models/message_in.rb +77 -5
- data/lib/svix/models/message_out.rb +38 -2
- data/lib/svix/models/message_status.rb +1 -1
- data/lib/svix/models/portal_settings_out.rb +16 -5
- data/lib/svix/models/recover_in.rb +1 -1
- data/lib/svix/models/settings_in.rb +339 -0
- data/lib/svix/models/settings_out.rb +47 -31
- data/lib/svix/models/statistics_period.rb +1 -1
- data/lib/svix/models/validation_error.rb +1 -1
- data/lib/svix/models/webhook_types.rb +1 -1
- data/lib/svix/svix.rb +6 -4
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +8 -2
- metadata +22 -9
- data/lib/svix/models/radii_enum.rb +0 -39
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Svix
|
17
17
|
class MessageEndpointOut
|
18
|
+
# List of message channels this endpoint listens to (omit for all)
|
19
|
+
attr_accessor :channels
|
20
|
+
|
18
21
|
attr_accessor :created_at
|
19
22
|
|
20
23
|
attr_accessor :description
|
@@ -41,6 +44,7 @@ module Svix
|
|
41
44
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
45
|
def self.attribute_map
|
43
46
|
{
|
47
|
+
:'channels' => :'channels',
|
44
48
|
:'created_at' => :'createdAt',
|
45
49
|
:'description' => :'description',
|
46
50
|
:'disabled' => :'disabled',
|
@@ -63,6 +67,7 @@ module Svix
|
|
63
67
|
# Attribute type mapping.
|
64
68
|
def self.openapi_types
|
65
69
|
{
|
70
|
+
:'channels' => :'Array<String>',
|
66
71
|
:'created_at' => :'Time',
|
67
72
|
:'description' => :'String',
|
68
73
|
:'disabled' => :'Boolean',
|
@@ -98,6 +103,12 @@ module Svix
|
|
98
103
|
h[k.to_sym] = v
|
99
104
|
}
|
100
105
|
|
106
|
+
if attributes.key?(:'channels')
|
107
|
+
if (value = attributes[:'channels']).is_a?(Array)
|
108
|
+
self.channels = value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
101
112
|
if attributes.key?(:'created_at')
|
102
113
|
self.created_at = attributes[:'created_at']
|
103
114
|
end
|
@@ -153,6 +164,14 @@ module Svix
|
|
153
164
|
# @return Array for valid properties with the reasons
|
154
165
|
def list_invalid_properties
|
155
166
|
invalid_properties = Array.new
|
167
|
+
if !@channels.nil? && @channels.length > 10
|
168
|
+
invalid_properties.push('invalid value for "channels", number of items must be less than or equal to 10.')
|
169
|
+
end
|
170
|
+
|
171
|
+
if !@channels.nil? && @channels.length < 1
|
172
|
+
invalid_properties.push('invalid value for "channels", number of items must be greater than or equal to 1.')
|
173
|
+
end
|
174
|
+
|
156
175
|
if @created_at.nil?
|
157
176
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
158
177
|
end
|
@@ -204,6 +223,8 @@ module Svix
|
|
204
223
|
# Check to see if the all the properties in the model are valid
|
205
224
|
# @return true if the model is valid
|
206
225
|
def valid?
|
226
|
+
return false if !@channels.nil? && @channels.length > 10
|
227
|
+
return false if !@channels.nil? && @channels.length < 1
|
207
228
|
return false if @created_at.nil?
|
208
229
|
return false if !@filter_types.nil? && @filter_types.length < 1
|
209
230
|
return false if @id.nil?
|
@@ -218,6 +239,20 @@ module Svix
|
|
218
239
|
true
|
219
240
|
end
|
220
241
|
|
242
|
+
# Custom attribute writer method with validation
|
243
|
+
# @param [Object] channels Value to be assigned
|
244
|
+
def channels=(channels)
|
245
|
+
if !channels.nil? && channels.length > 10
|
246
|
+
fail ArgumentError, 'invalid value for "channels", number of items must be less than or equal to 10.'
|
247
|
+
end
|
248
|
+
|
249
|
+
if !channels.nil? && channels.length < 1
|
250
|
+
fail ArgumentError, 'invalid value for "channels", number of items must be greater than or equal to 1.'
|
251
|
+
end
|
252
|
+
|
253
|
+
@channels = channels
|
254
|
+
end
|
255
|
+
|
221
256
|
# Custom attribute writer method with validation
|
222
257
|
# @param [Object] filter_types Value to be assigned
|
223
258
|
def filter_types=(filter_types)
|
@@ -270,6 +305,7 @@ module Svix
|
|
270
305
|
def ==(o)
|
271
306
|
return true if self.equal?(o)
|
272
307
|
self.class == o.class &&
|
308
|
+
channels == o.channels &&
|
273
309
|
created_at == o.created_at &&
|
274
310
|
description == o.description &&
|
275
311
|
disabled == o.disabled &&
|
@@ -292,7 +328,7 @@ module Svix
|
|
292
328
|
# Calculates hash code according to all attributes.
|
293
329
|
# @return [Integer] Hash code
|
294
330
|
def hash
|
295
|
-
[created_at, description, disabled, filter_types, id, next_attempt, rate_limit, status, uid, url, version].hash
|
331
|
+
[channels, created_at, description, disabled, filter_types, id, next_attempt, rate_limit, status, uid, url, version].hash
|
296
332
|
end
|
297
333
|
|
298
334
|
# Builds the object from hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Svix
|
17
17
|
class MessageIn
|
18
|
+
# List of free-form identifiers that endpoints can filter by
|
19
|
+
attr_accessor :channels
|
20
|
+
|
18
21
|
# Optional unique identifier for the message
|
19
22
|
attr_accessor :event_id
|
20
23
|
|
@@ -22,12 +25,17 @@ module Svix
|
|
22
25
|
|
23
26
|
attr_accessor :payload
|
24
27
|
|
28
|
+
# The retention period for the payload (in days).
|
29
|
+
attr_accessor :payload_retention_period
|
30
|
+
|
25
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
32
|
def self.attribute_map
|
27
33
|
{
|
34
|
+
:'channels' => :'channels',
|
28
35
|
:'event_id' => :'eventId',
|
29
36
|
:'event_type' => :'eventType',
|
30
|
-
:'payload' => :'payload'
|
37
|
+
:'payload' => :'payload',
|
38
|
+
:'payload_retention_period' => :'payloadRetentionPeriod'
|
31
39
|
}
|
32
40
|
end
|
33
41
|
|
@@ -39,9 +47,11 @@ module Svix
|
|
39
47
|
# Attribute type mapping.
|
40
48
|
def self.openapi_types
|
41
49
|
{
|
50
|
+
:'channels' => :'Array<String>',
|
42
51
|
:'event_id' => :'String',
|
43
52
|
:'event_type' => :'String',
|
44
|
-
:'payload' => :'Object'
|
53
|
+
:'payload' => :'Object',
|
54
|
+
:'payload_retention_period' => :'Integer'
|
45
55
|
}
|
46
56
|
end
|
47
57
|
|
@@ -66,6 +76,12 @@ module Svix
|
|
66
76
|
h[k.to_sym] = v
|
67
77
|
}
|
68
78
|
|
79
|
+
if attributes.key?(:'channels')
|
80
|
+
if (value = attributes[:'channels']).is_a?(Array)
|
81
|
+
self.channels = value
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
69
85
|
if attributes.key?(:'event_id')
|
70
86
|
self.event_id = attributes[:'event_id']
|
71
87
|
end
|
@@ -77,12 +93,26 @@ module Svix
|
|
77
93
|
if attributes.key?(:'payload')
|
78
94
|
self.payload = attributes[:'payload']
|
79
95
|
end
|
96
|
+
|
97
|
+
if attributes.key?(:'payload_retention_period')
|
98
|
+
self.payload_retention_period = attributes[:'payload_retention_period']
|
99
|
+
else
|
100
|
+
self.payload_retention_period = 90
|
101
|
+
end
|
80
102
|
end
|
81
103
|
|
82
104
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
105
|
# @return Array for valid properties with the reasons
|
84
106
|
def list_invalid_properties
|
85
107
|
invalid_properties = Array.new
|
108
|
+
if !@channels.nil? && @channels.length > 5
|
109
|
+
invalid_properties.push('invalid value for "channels", number of items must be less than or equal to 5.')
|
110
|
+
end
|
111
|
+
|
112
|
+
if !@channels.nil? && @channels.length < 1
|
113
|
+
invalid_properties.push('invalid value for "channels", number of items must be greater than or equal to 1.')
|
114
|
+
end
|
115
|
+
|
86
116
|
if !@event_id.nil? && @event_id.to_s.length > 256
|
87
117
|
invalid_properties.push('invalid value for "event_id", the character length must be smaller than or equal to 256.')
|
88
118
|
end
|
@@ -113,12 +143,22 @@ module Svix
|
|
113
143
|
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
114
144
|
end
|
115
145
|
|
146
|
+
if !@payload_retention_period.nil? && @payload_retention_period > 90
|
147
|
+
invalid_properties.push('invalid value for "payload_retention_period", must be smaller than or equal to 90.')
|
148
|
+
end
|
149
|
+
|
150
|
+
if !@payload_retention_period.nil? && @payload_retention_period < 5
|
151
|
+
invalid_properties.push('invalid value for "payload_retention_period", must be greater than or equal to 5.')
|
152
|
+
end
|
153
|
+
|
116
154
|
invalid_properties
|
117
155
|
end
|
118
156
|
|
119
157
|
# Check to see if the all the properties in the model are valid
|
120
158
|
# @return true if the model is valid
|
121
159
|
def valid?
|
160
|
+
return false if !@channels.nil? && @channels.length > 5
|
161
|
+
return false if !@channels.nil? && @channels.length < 1
|
122
162
|
return false if !@event_id.nil? && @event_id.to_s.length > 256
|
123
163
|
return false if !@event_id.nil? && @event_id.to_s.length < 1
|
124
164
|
return false if !@event_id.nil? && @event_id !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
@@ -126,9 +166,25 @@ module Svix
|
|
126
166
|
return false if @event_type.to_s.length > 256
|
127
167
|
return false if @event_type !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
128
168
|
return false if @payload.nil?
|
169
|
+
return false if !@payload_retention_period.nil? && @payload_retention_period > 90
|
170
|
+
return false if !@payload_retention_period.nil? && @payload_retention_period < 5
|
129
171
|
true
|
130
172
|
end
|
131
173
|
|
174
|
+
# Custom attribute writer method with validation
|
175
|
+
# @param [Object] channels Value to be assigned
|
176
|
+
def channels=(channels)
|
177
|
+
if !channels.nil? && channels.length > 5
|
178
|
+
fail ArgumentError, 'invalid value for "channels", number of items must be less than or equal to 5.'
|
179
|
+
end
|
180
|
+
|
181
|
+
if !channels.nil? && channels.length < 1
|
182
|
+
fail ArgumentError, 'invalid value for "channels", number of items must be greater than or equal to 1.'
|
183
|
+
end
|
184
|
+
|
185
|
+
@channels = channels
|
186
|
+
end
|
187
|
+
|
132
188
|
# Custom attribute writer method with validation
|
133
189
|
# @param [Object] event_id Value to be assigned
|
134
190
|
def event_id=(event_id)
|
@@ -167,14 +223,30 @@ module Svix
|
|
167
223
|
@event_type = event_type
|
168
224
|
end
|
169
225
|
|
226
|
+
# Custom attribute writer method with validation
|
227
|
+
# @param [Object] payload_retention_period Value to be assigned
|
228
|
+
def payload_retention_period=(payload_retention_period)
|
229
|
+
if !payload_retention_period.nil? && payload_retention_period > 90
|
230
|
+
fail ArgumentError, 'invalid value for "payload_retention_period", must be smaller than or equal to 90.'
|
231
|
+
end
|
232
|
+
|
233
|
+
if !payload_retention_period.nil? && payload_retention_period < 5
|
234
|
+
fail ArgumentError, 'invalid value for "payload_retention_period", must be greater than or equal to 5.'
|
235
|
+
end
|
236
|
+
|
237
|
+
@payload_retention_period = payload_retention_period
|
238
|
+
end
|
239
|
+
|
170
240
|
# Checks equality by comparing each attribute.
|
171
241
|
# @param [Object] Object to be compared
|
172
242
|
def ==(o)
|
173
243
|
return true if self.equal?(o)
|
174
244
|
self.class == o.class &&
|
245
|
+
channels == o.channels &&
|
175
246
|
event_id == o.event_id &&
|
176
247
|
event_type == o.event_type &&
|
177
|
-
payload == o.payload
|
248
|
+
payload == o.payload &&
|
249
|
+
payload_retention_period == o.payload_retention_period
|
178
250
|
end
|
179
251
|
|
180
252
|
# @see the `==` method
|
@@ -186,7 +258,7 @@ module Svix
|
|
186
258
|
# Calculates hash code according to all attributes.
|
187
259
|
# @return [Integer] Hash code
|
188
260
|
def hash
|
189
|
-
[event_id, event_type, payload].hash
|
261
|
+
[channels, event_id, event_type, payload, payload_retention_period].hash
|
190
262
|
end
|
191
263
|
|
192
264
|
# Builds the object from hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Svix
|
17
17
|
class MessageOut
|
18
|
+
# List of free-form identifiers that endpoints can filter by
|
19
|
+
attr_accessor :channels
|
20
|
+
|
18
21
|
# Optional unique identifier for the message
|
19
22
|
attr_accessor :event_id
|
20
23
|
|
@@ -29,6 +32,7 @@ module Svix
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
33
|
def self.attribute_map
|
31
34
|
{
|
35
|
+
:'channels' => :'channels',
|
32
36
|
:'event_id' => :'eventId',
|
33
37
|
:'event_type' => :'eventType',
|
34
38
|
:'id' => :'id',
|
@@ -45,6 +49,7 @@ module Svix
|
|
45
49
|
# Attribute type mapping.
|
46
50
|
def self.openapi_types
|
47
51
|
{
|
52
|
+
:'channels' => :'Array<String>',
|
48
53
|
:'event_id' => :'String',
|
49
54
|
:'event_type' => :'String',
|
50
55
|
:'id' => :'String',
|
@@ -74,6 +79,12 @@ module Svix
|
|
74
79
|
h[k.to_sym] = v
|
75
80
|
}
|
76
81
|
|
82
|
+
if attributes.key?(:'channels')
|
83
|
+
if (value = attributes[:'channels']).is_a?(Array)
|
84
|
+
self.channels = value
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
77
88
|
if attributes.key?(:'event_id')
|
78
89
|
self.event_id = attributes[:'event_id']
|
79
90
|
end
|
@@ -99,6 +110,14 @@ module Svix
|
|
99
110
|
# @return Array for valid properties with the reasons
|
100
111
|
def list_invalid_properties
|
101
112
|
invalid_properties = Array.new
|
113
|
+
if !@channels.nil? && @channels.length > 5
|
114
|
+
invalid_properties.push('invalid value for "channels", number of items must be less than or equal to 5.')
|
115
|
+
end
|
116
|
+
|
117
|
+
if !@channels.nil? && @channels.length < 1
|
118
|
+
invalid_properties.push('invalid value for "channels", number of items must be greater than or equal to 1.')
|
119
|
+
end
|
120
|
+
|
102
121
|
if !@event_id.nil? && @event_id.to_s.length > 256
|
103
122
|
invalid_properties.push('invalid value for "event_id", the character length must be smaller than or equal to 256.')
|
104
123
|
end
|
@@ -143,6 +162,8 @@ module Svix
|
|
143
162
|
# Check to see if the all the properties in the model are valid
|
144
163
|
# @return true if the model is valid
|
145
164
|
def valid?
|
165
|
+
return false if !@channels.nil? && @channels.length > 5
|
166
|
+
return false if !@channels.nil? && @channels.length < 1
|
146
167
|
return false if !@event_id.nil? && @event_id.to_s.length > 256
|
147
168
|
return false if !@event_id.nil? && @event_id.to_s.length < 1
|
148
169
|
return false if !@event_id.nil? && @event_id !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
@@ -155,6 +176,20 @@ module Svix
|
|
155
176
|
true
|
156
177
|
end
|
157
178
|
|
179
|
+
# Custom attribute writer method with validation
|
180
|
+
# @param [Object] channels Value to be assigned
|
181
|
+
def channels=(channels)
|
182
|
+
if !channels.nil? && channels.length > 5
|
183
|
+
fail ArgumentError, 'invalid value for "channels", number of items must be less than or equal to 5.'
|
184
|
+
end
|
185
|
+
|
186
|
+
if !channels.nil? && channels.length < 1
|
187
|
+
fail ArgumentError, 'invalid value for "channels", number of items must be greater than or equal to 1.'
|
188
|
+
end
|
189
|
+
|
190
|
+
@channels = channels
|
191
|
+
end
|
192
|
+
|
158
193
|
# Custom attribute writer method with validation
|
159
194
|
# @param [Object] event_id Value to be assigned
|
160
195
|
def event_id=(event_id)
|
@@ -198,6 +233,7 @@ module Svix
|
|
198
233
|
def ==(o)
|
199
234
|
return true if self.equal?(o)
|
200
235
|
self.class == o.class &&
|
236
|
+
channels == o.channels &&
|
201
237
|
event_id == o.event_id &&
|
202
238
|
event_type == o.event_type &&
|
203
239
|
id == o.id &&
|
@@ -214,7 +250,7 @@ module Svix
|
|
214
250
|
# Calculates hash code according to all attributes.
|
215
251
|
# @return [Integer] Hash code
|
216
252
|
def hash
|
217
|
-
[event_id, event_type, id, payload, timestamp].hash
|
253
|
+
[channels, event_id, event_type, id, payload, timestamp].hash
|
218
254
|
end
|
219
255
|
|
220
256
|
# Builds the object from hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -23,13 +23,16 @@ module Svix
|
|
23
23
|
|
24
24
|
attr_accessor :custom_theme_override
|
25
25
|
|
26
|
+
attr_accessor :enable_channels
|
27
|
+
|
26
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
29
|
def self.attribute_map
|
28
30
|
{
|
29
31
|
:'custom_color' => :'customColor',
|
30
32
|
:'custom_font_family' => :'customFontFamily',
|
31
33
|
:'custom_logo_url' => :'customLogoUrl',
|
32
|
-
:'custom_theme_override' => :'customThemeOverride'
|
34
|
+
:'custom_theme_override' => :'customThemeOverride',
|
35
|
+
:'enable_channels' => :'enableChannels'
|
33
36
|
}
|
34
37
|
end
|
35
38
|
|
@@ -44,7 +47,8 @@ module Svix
|
|
44
47
|
:'custom_color' => :'String',
|
45
48
|
:'custom_font_family' => :'String',
|
46
49
|
:'custom_logo_url' => :'String',
|
47
|
-
:'custom_theme_override' => :'CustomThemeOverride'
|
50
|
+
:'custom_theme_override' => :'CustomThemeOverride',
|
51
|
+
:'enable_channels' => :'Boolean'
|
48
52
|
}
|
49
53
|
end
|
50
54
|
|
@@ -84,6 +88,12 @@ module Svix
|
|
84
88
|
if attributes.key?(:'custom_theme_override')
|
85
89
|
self.custom_theme_override = attributes[:'custom_theme_override']
|
86
90
|
end
|
91
|
+
|
92
|
+
if attributes.key?(:'enable_channels')
|
93
|
+
self.enable_channels = attributes[:'enable_channels']
|
94
|
+
else
|
95
|
+
self.enable_channels = false
|
96
|
+
end
|
87
97
|
end
|
88
98
|
|
89
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -148,7 +158,8 @@ module Svix
|
|
148
158
|
custom_color == o.custom_color &&
|
149
159
|
custom_font_family == o.custom_font_family &&
|
150
160
|
custom_logo_url == o.custom_logo_url &&
|
151
|
-
custom_theme_override == o.custom_theme_override
|
161
|
+
custom_theme_override == o.custom_theme_override &&
|
162
|
+
enable_channels == o.enable_channels
|
152
163
|
end
|
153
164
|
|
154
165
|
# @see the `==` method
|
@@ -160,7 +171,7 @@ module Svix
|
|
160
171
|
# Calculates hash code according to all attributes.
|
161
172
|
# @return [Integer] Hash code
|
162
173
|
def hash
|
163
|
-
[custom_color, custom_font_family, custom_logo_url, custom_theme_override].hash
|
174
|
+
[custom_color, custom_font_family, custom_logo_url, custom_theme_override, enable_channels].hash
|
164
175
|
end
|
165
176
|
|
166
177
|
# Builds the object from hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are sent to. Usually you want to create one application for each
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## 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 where `messages` are 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 multiple `endpoints` and 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 [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## 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 [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) 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 [W3C spec](https://www.w3.org/TR/cors/). 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.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|