sendpost_ruby_sdk 2.0.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +612 -531
- data/docs/AccountCycleUsage.md +18 -0
- data/docs/AccountStats.md +3 -3
- data/docs/AccountWebhookWithStats.md +58 -0
- data/docs/AggregateStat.md +14 -14
- data/docs/AggregateStats.md +22 -22
- data/docs/Attachment.md +4 -4
- data/docs/BlacklistLinks.md +20 -0
- data/docs/BlacklistResource.md +38 -0
- data/docs/BlacklistedOn.md +20 -0
- data/docs/CopyTo.md +6 -6
- data/docs/CreateDomainRequest.md +2 -2
- data/docs/CreateSuppressionRequest.md +4 -4
- data/docs/CreateSuppressionRequestHardBounceInner.md +1 -1
- data/docs/CreateSuppressionRequestManualInner.md +1 -1
- data/docs/CreateSuppressionRequestSpamComplaintInner.md +1 -1
- data/docs/CreateSuppressionRequestUnsubscribeInner.md +1 -1
- data/docs/DailyStatistics.md +38 -0
- data/docs/DateStat.md +40 -0
- data/docs/DeleteResponse.md +4 -4
- data/docs/DeleteSubAccountResponse.md +4 -4
- data/docs/{DeleteSuppression200ResponseInner.md → DeleteSuppression200Response.md} +2 -4
- data/docs/DeleteSuppressionRequest.md +1 -1
- data/docs/{EmailMessageReplyTo.md → DeleteSuppressionRequestSuppressionsInner.md} +3 -5
- data/docs/DeleteWebhookResponse.md +3 -3
- data/docs/Device.md +2 -2
- data/docs/DnsRecord.md +22 -0
- data/docs/Domain.md +24 -28
- data/docs/DomainApi.md +66 -66
- data/docs/DomainStat.md +46 -0
- data/docs/EIP.md +1 -1
- data/docs/EmailAddress.md +4 -4
- data/docs/EmailApi.md +4 -4
- data/docs/EmailMessage.md +30 -30
- data/docs/EmailMessageObject.md +33 -26
- data/docs/EmailMessageWithTemplate.md +32 -27
- data/docs/EmailResponse.md +10 -10
- data/docs/EmailTypeStat.md +40 -0
- data/docs/ErrorResponse.md +18 -0
- data/docs/ErrorResponseError.md +26 -0
- data/docs/ErrorResponseErrorDetailsInner.md +20 -0
- data/docs/Event.md +18 -36
- data/docs/EventMetadata.md +14 -14
- data/docs/GeoLocation.md +8 -8
- data/docs/GroupStat.md +40 -0
- data/docs/IP.md +13 -43
- data/docs/IPAllocationRequest.md +4 -4
- data/docs/IPApi.md +19 -19
- data/docs/IPDeletionResponse.md +2 -2
- data/docs/IPPool.md +13 -21
- data/docs/IPPoolCreateRequest.md +10 -8
- data/docs/IPPoolDeleteResponse.md +2 -2
- data/docs/IPPoolStat.md +44 -0
- data/docs/IPPoolUpdateRequest.md +13 -7
- data/docs/IPPoolsApi.md +26 -19
- data/docs/IPStat.md +46 -0
- data/docs/IPUpdateRequest.md +2 -2
- data/docs/Label.md +10 -6
- data/docs/Member.md +15 -21
- data/docs/Message.md +37 -53
- data/docs/MessageApi.md +83 -3
- data/docs/NewSubAccount.md +18 -0
- data/docs/NewWebhook.md +46 -0
- data/docs/Os.md +26 -0
- data/docs/PostmasterDomainStat.md +30 -0
- data/docs/ProviderStat.md +40 -0
- data/docs/RAIPPoolStat.md +20 -0
- data/docs/RDStat.md +20 -0
- data/docs/RIPStat.md +20 -0
- data/docs/RStat.md +20 -0
- data/docs/Recipient.md +8 -8
- data/docs/SDStat.md +42 -0
- data/docs/SMTPAuth.md +5 -9
- data/docs/SeedContactStats.md +28 -0
- data/docs/Stat.md +22 -4
- data/docs/StatsAApi.md +24 -24
- data/docs/StatsApi.md +19 -19
- data/docs/SubAccount.md +13 -27
- data/docs/SubAccountApi.md +23 -23
- data/docs/SubAccountStat.md +44 -0
- data/docs/SubAccountStatForPool.md +42 -0
- data/docs/Suppression.md +14 -10
- data/docs/SuppressionApi.md +19 -19
- data/docs/TPSPStat.md +42 -0
- data/docs/UpdateSubAccount.md +2 -2
- data/docs/UpdateWebhook.md +23 -23
- data/docs/UserAgent.md +7 -7
- data/docs/ValidationStat.md +32 -0
- data/docs/Webhook.md +31 -29
- data/docs/WebhookApi.md +28 -28
- data/docs/WebhookObject.md +20 -0
- data/docs/WebhookReferenceApi.md +71 -0
- data/lib/sendpost_ruby_sdk/api/domain_api.rb +84 -84
- data/lib/sendpost_ruby_sdk/api/email_api.rb +6 -6
- data/lib/sendpost_ruby_sdk/api/ip_api.rb +24 -24
- data/lib/sendpost_ruby_sdk/api/ip_pools_api.rb +25 -25
- data/lib/sendpost_ruby_sdk/api/message_api.rb +83 -6
- data/lib/sendpost_ruby_sdk/api/stats_a_api.rb +30 -30
- data/lib/sendpost_ruby_sdk/api/stats_api.rb +24 -24
- data/lib/sendpost_ruby_sdk/api/sub_account_api.rb +33 -33
- data/lib/sendpost_ruby_sdk/api/suppression_api.rb +23 -23
- data/lib/sendpost_ruby_sdk/api/webhook_api.rb +36 -36
- data/lib/sendpost_ruby_sdk/api/webhook_reference_api.rb +82 -0
- data/lib/sendpost_ruby_sdk/api_client.rb +2 -2
- data/lib/sendpost_ruby_sdk/api_error.rb +2 -2
- data/lib/sendpost_ruby_sdk/configuration.rb +2 -2
- data/lib/sendpost_ruby_sdk/models/account_cycle_usage.rb +222 -0
- data/lib/sendpost_ruby_sdk/models/account_stats.rb +5 -3
- data/lib/sendpost_ruby_sdk/models/account_webhook_with_stats.rb +463 -0
- data/lib/sendpost_ruby_sdk/models/aggregate_stat.rb +37 -29
- data/lib/sendpost_ruby_sdk/models/aggregate_stats.rb +43 -24
- data/lib/sendpost_ruby_sdk/models/attachment.rb +48 -4
- data/lib/sendpost_ruby_sdk/models/blacklist_links.rb +232 -0
- data/lib/sendpost_ruby_sdk/models/blacklist_resource.rb +323 -0
- data/lib/sendpost_ruby_sdk/models/blacklisted_on.rb +232 -0
- data/lib/sendpost_ruby_sdk/models/copy_to.rb +42 -3
- data/lib/sendpost_ruby_sdk/models/create_domain_request.rb +32 -3
- data/lib/sendpost_ruby_sdk/models/create_suppression_request.rb +6 -6
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_hard_bounce_inner.rb +2 -2
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_manual_inner.rb +2 -2
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_spam_complaint_inner.rb +2 -2
- data/lib/sendpost_ruby_sdk/models/create_suppression_request_unsubscribe_inner.rb +2 -2
- data/lib/sendpost_ruby_sdk/models/daily_statistics.rb +322 -0
- data/lib/sendpost_ruby_sdk/models/date_stat.rb +339 -0
- data/lib/sendpost_ruby_sdk/models/delete_response.rb +5 -4
- data/lib/sendpost_ruby_sdk/models/delete_sub_account_response.rb +5 -4
- data/lib/sendpost_ruby_sdk/models/delete_suppression200_response.rb +221 -0
- data/lib/sendpost_ruby_sdk/models/delete_suppression_request.rb +4 -3
- data/lib/sendpost_ruby_sdk/models/delete_suppression_request_suppressions_inner.rb +220 -0
- data/lib/sendpost_ruby_sdk/models/delete_webhook_response.rb +5 -4
- data/lib/sendpost_ruby_sdk/models/device.rb +5 -3
- data/lib/sendpost_ruby_sdk/models/dns_record.rb +276 -0
- data/lib/sendpost_ruby_sdk/models/domain.rb +42 -85
- data/lib/sendpost_ruby_sdk/models/domain_stat.rb +369 -0
- data/lib/sendpost_ruby_sdk/models/eip.rb +4 -3
- data/lib/sendpost_ruby_sdk/models/email_address.rb +41 -2
- data/lib/sendpost_ruby_sdk/models/email_message.rb +26 -9
- data/lib/sendpost_ruby_sdk/models/email_message_object.rb +123 -3
- data/lib/sendpost_ruby_sdk/models/email_message_with_template.rb +121 -12
- data/lib/sendpost_ruby_sdk/models/email_response.rb +8 -4
- data/lib/sendpost_ruby_sdk/models/email_type_stat.rb +339 -0
- data/lib/sendpost_ruby_sdk/models/error_response.rb +221 -0
- data/lib/sendpost_ruby_sdk/models/error_response_error.rb +297 -0
- data/lib/sendpost_ruby_sdk/models/error_response_error_details_inner.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/event.rb +94 -118
- data/lib/sendpost_ruby_sdk/models/event_metadata.rb +15 -5
- data/lib/sendpost_ruby_sdk/models/geo_location.rb +20 -14
- data/lib/sendpost_ruby_sdk/models/group_stat.rb +339 -0
- data/lib/sendpost_ruby_sdk/models/ip.rb +72 -375
- data/lib/sendpost_ruby_sdk/models/ip_allocation_request.rb +29 -33
- data/lib/sendpost_ruby_sdk/models/ip_deletion_response.rb +5 -4
- data/lib/sendpost_ruby_sdk/models/ip_pool.rb +94 -82
- data/lib/sendpost_ruby_sdk/models/ip_pool_create_request.rb +91 -29
- data/lib/sendpost_ruby_sdk/models/ip_pool_delete_response.rb +5 -2
- data/lib/sendpost_ruby_sdk/models/ip_pool_stat.rb +359 -0
- data/lib/sendpost_ruby_sdk/models/ip_pool_update_request.rb +97 -7
- data/lib/sendpost_ruby_sdk/models/ip_stat.rb +369 -0
- data/lib/sendpost_ruby_sdk/models/ip_update_request.rb +4 -20
- data/lib/sendpost_ruby_sdk/models/label.rb +101 -6
- data/lib/sendpost_ruby_sdk/models/member.rb +49 -57
- data/lib/sendpost_ruby_sdk/models/message.rb +39 -120
- data/lib/sendpost_ruby_sdk/models/new_sub_account.rb +257 -0
- data/lib/sendpost_ruby_sdk/models/new_webhook.rb +407 -0
- data/lib/sendpost_ruby_sdk/models/os.rb +262 -0
- data/lib/sendpost_ruby_sdk/models/postmaster_domain_stat.rb +282 -0
- data/lib/sendpost_ruby_sdk/models/provider_stat.rb +339 -0
- data/lib/sendpost_ruby_sdk/models/r_stat.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/raip_pool_stat.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/rd_stat.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/recipient.rb +82 -3
- data/lib/sendpost_ruby_sdk/models/rip_stat.rb +231 -0
- data/lib/sendpost_ruby_sdk/models/sd_stat.rb +349 -0
- data/lib/sendpost_ruby_sdk/models/seed_contact_stats.rb +281 -0
- data/lib/sendpost_ruby_sdk/models/smtp_auth.rb +10 -29
- data/lib/sendpost_ruby_sdk/models/stat.rb +108 -16
- data/lib/sendpost_ruby_sdk/models/sub_account.rb +57 -115
- data/lib/sendpost_ruby_sdk/models/sub_account_stat.rb +359 -0
- data/lib/sendpost_ruby_sdk/models/sub_account_stat_for_pool.rb +349 -0
- data/lib/sendpost_ruby_sdk/models/suppression.rb +82 -15
- data/lib/sendpost_ruby_sdk/models/tpsp_stat.rb +349 -0
- data/lib/sendpost_ruby_sdk/models/update_sub_account.rb +32 -3
- data/lib/sendpost_ruby_sdk/models/update_webhook.rb +83 -37
- data/lib/sendpost_ruby_sdk/models/user_agent.rb +11 -6
- data/lib/sendpost_ruby_sdk/models/validation_stat.rb +292 -0
- data/lib/sendpost_ruby_sdk/models/webhook.rb +108 -67
- data/lib/sendpost_ruby_sdk/models/webhook_object.rb +232 -0
- data/lib/sendpost_ruby_sdk/version.rb +3 -3
- data/lib/sendpost_ruby_sdk.rb +36 -27
- data/sendpost_ruby_sdk.gemspec +39 -0
- data/spec/api/webhook_reference_api_spec.rb +46 -0
- data/spec/models/account_cycle_usage_spec.rb +36 -0
- data/spec/models/account_webhook_with_stats_spec.rb +160 -0
- data/spec/models/blacklist_links_spec.rb +42 -0
- data/spec/models/blacklist_resource_spec.rb +96 -0
- data/spec/models/blacklisted_on_spec.rb +42 -0
- data/spec/models/daily_statistics_spec.rb +96 -0
- data/spec/models/date_stat_spec.rb +102 -0
- data/spec/models/delete_suppression200_response_spec.rb +36 -0
- data/spec/models/delete_suppression_request_suppressions_inner_spec.rb +36 -0
- data/spec/models/dns_record_spec.rb +52 -0
- data/spec/models/domain_stat_spec.rb +120 -0
- data/spec/models/email_type_stat_spec.rb +102 -0
- data/spec/models/error_response_error_details_inner_spec.rb +42 -0
- data/spec/models/error_response_error_spec.rb +64 -0
- data/spec/models/error_response_spec.rb +36 -0
- data/spec/models/group_stat_spec.rb +102 -0
- data/spec/models/ip_pool_stat_spec.rb +114 -0
- data/spec/models/ip_stat_spec.rb +120 -0
- data/spec/models/new_sub_account_spec.rb +36 -0
- data/spec/models/new_webhook_spec.rb +120 -0
- data/spec/models/os_spec.rb +60 -0
- data/spec/models/postmaster_domain_stat_spec.rb +72 -0
- data/spec/models/provider_stat_spec.rb +102 -0
- data/spec/models/r_stat_spec.rb +42 -0
- data/spec/models/raip_pool_stat_spec.rb +42 -0
- data/spec/models/rd_stat_spec.rb +42 -0
- data/spec/models/rip_stat_spec.rb +42 -0
- data/spec/models/sd_stat_spec.rb +108 -0
- data/spec/models/seed_contact_stats_spec.rb +66 -0
- data/spec/models/sub_account_stat_for_pool_spec.rb +108 -0
- data/spec/models/sub_account_stat_spec.rb +114 -0
- data/spec/models/tpsp_stat_spec.rb +108 -0
- data/spec/models/validation_stat_spec.rb +78 -0
- data/spec/models/webhook_object_spec.rb +42 -0
- data/spec/spec_helper.rb +2 -2
- metadata +143 -219
- data/LICENSE +0 -21
- data/docs/AccountStatsStat.md +0 -38
- data/docs/AggregatedEmailStats.md +0 -38
- data/docs/AutoWarmupPlan.md +0 -80
- data/docs/CreateSubAccountRequest.md +0 -18
- data/docs/CreateWebhookRequest.md +0 -46
- data/docs/DomainDkim.md +0 -22
- data/docs/DomainDmarc.md +0 -22
- data/docs/DomainGpt.md +0 -22
- data/docs/DomainReturnPath.md +0 -22
- data/docs/DomainSpf.md +0 -22
- data/docs/DomainTrack.md +0 -22
- data/docs/EmailMessageFrom.md +0 -20
- data/docs/EmailMessageToInner.md +0 -26
- data/docs/EmailMessageToInnerBccInner.md +0 -22
- data/docs/EmailMessageToInnerCcInner.md +0 -22
- data/docs/EmailStats.md +0 -20
- data/docs/EmailStatsStats.md +0 -38
- data/docs/MessageHeaderTo.md +0 -26
- data/docs/MessageTo.md +0 -26
- data/docs/OperatingSystem.md +0 -26
- data/docs/Person.md +0 -20
- data/docs/StatStat.md +0 -38
- data/docs/StatStats.md +0 -38
- data/docs/ThirdPartySendingProvider.md +0 -38
- data/lib/sendpost_ruby_sdk/models/account_stats_stat.rb +0 -311
- data/lib/sendpost_ruby_sdk/models/aggregated_email_stats.rb +0 -321
- data/lib/sendpost_ruby_sdk/models/auto_warmup_plan.rb +0 -531
- data/lib/sendpost_ruby_sdk/models/create_sub_account_request.rb +0 -221
- data/lib/sendpost_ruby_sdk/models/create_webhook_request.rb +0 -361
- data/lib/sendpost_ruby_sdk/models/delete_suppression200_response_inner.rb +0 -231
- data/lib/sendpost_ruby_sdk/models/domain_dkim.rb +0 -239
- data/lib/sendpost_ruby_sdk/models/domain_dmarc.rb +0 -239
- data/lib/sendpost_ruby_sdk/models/domain_gpt.rb +0 -239
- data/lib/sendpost_ruby_sdk/models/domain_return_path.rb +0 -239
- data/lib/sendpost_ruby_sdk/models/domain_spf.rb +0 -239
- data/lib/sendpost_ruby_sdk/models/domain_track.rb +0 -239
- data/lib/sendpost_ruby_sdk/models/email_message_from.rb +0 -229
- data/lib/sendpost_ruby_sdk/models/email_message_reply_to.rb +0 -229
- data/lib/sendpost_ruby_sdk/models/email_message_to_inner.rb +0 -262
- data/lib/sendpost_ruby_sdk/models/email_message_to_inner_bcc_inner.rb +0 -240
- data/lib/sendpost_ruby_sdk/models/email_message_to_inner_cc_inner.rb +0 -240
- data/lib/sendpost_ruby_sdk/models/email_stats.rb +0 -230
- data/lib/sendpost_ruby_sdk/models/email_stats_stats.rb +0 -321
- data/lib/sendpost_ruby_sdk/models/message_header_to.rb +0 -268
- data/lib/sendpost_ruby_sdk/models/message_to.rb +0 -268
- data/lib/sendpost_ruby_sdk/models/operating_system.rb +0 -256
- data/lib/sendpost_ruby_sdk/models/person.rb +0 -231
- data/lib/sendpost_ruby_sdk/models/stat_stat.rb +0 -322
- data/lib/sendpost_ruby_sdk/models/stat_stats.rb +0 -321
- data/lib/sendpost_ruby_sdk/models/third_party_sending_provider.rb +0 -310
- data/spec/api/domain_api_spec.rb +0 -85
- data/spec/api/email_api_spec.rb +0 -59
- data/spec/api/ip_api_spec.rb +0 -98
- data/spec/api/ip_pools_api_spec.rb +0 -98
- data/spec/api/message_api_spec.rb +0 -47
- data/spec/api/stats_a_api_spec.rb +0 -89
- data/spec/api/stats_api_spec.rb +0 -78
- data/spec/api/sub_account_api_spec.rb +0 -98
- data/spec/api/suppression_api_spec.rb +0 -76
- data/spec/api/webhook_api_spec.rb +0 -98
- data/spec/models/account_stats_spec.rb +0 -42
- data/spec/models/account_stats_stat_spec.rb +0 -96
- data/spec/models/aggregate_stat_spec.rb +0 -96
- data/spec/models/aggregate_stats_spec.rb +0 -96
- data/spec/models/aggregated_email_stats_spec.rb +0 -96
- data/spec/models/attachment_spec.rb +0 -42
- data/spec/models/auto_warmup_plan_spec.rb +0 -222
- data/spec/models/copy_to_spec.rb +0 -48
- data/spec/models/create_domain_request_spec.rb +0 -36
- data/spec/models/create_sub_account_request_spec.rb +0 -36
- data/spec/models/create_suppression_request_hard_bounce_inner_spec.rb +0 -36
- data/spec/models/create_suppression_request_manual_inner_spec.rb +0 -36
- data/spec/models/create_suppression_request_spam_complaint_inner_spec.rb +0 -36
- data/spec/models/create_suppression_request_spec.rb +0 -54
- data/spec/models/create_suppression_request_unsubscribe_inner_spec.rb +0 -36
- data/spec/models/create_webhook_request_spec.rb +0 -120
- data/spec/models/delete_response_spec.rb +0 -42
- data/spec/models/delete_sub_account_response_spec.rb +0 -42
- data/spec/models/delete_suppression200_response_inner_spec.rb +0 -42
- data/spec/models/delete_suppression_request_spec.rb +0 -36
- data/spec/models/delete_webhook_response_spec.rb +0 -42
- data/spec/models/device_spec.rb +0 -36
- data/spec/models/domain_dkim_spec.rb +0 -48
- data/spec/models/domain_dmarc_spec.rb +0 -48
- data/spec/models/domain_gpt_spec.rb +0 -48
- data/spec/models/domain_return_path_spec.rb +0 -48
- data/spec/models/domain_spec.rb +0 -150
- data/spec/models/domain_spf_spec.rb +0 -48
- data/spec/models/domain_track_spec.rb +0 -48
- data/spec/models/eip_spec.rb +0 -36
- data/spec/models/email_address_spec.rb +0 -42
- data/spec/models/email_message_from_spec.rb +0 -42
- data/spec/models/email_message_object_spec.rb +0 -120
- data/spec/models/email_message_reply_to_spec.rb +0 -42
- data/spec/models/email_message_spec.rb +0 -138
- data/spec/models/email_message_to_inner_bcc_inner_spec.rb +0 -48
- data/spec/models/email_message_to_inner_cc_inner_spec.rb +0 -48
- data/spec/models/email_message_to_inner_spec.rb +0 -60
- data/spec/models/email_message_with_template_spec.rb +0 -138
- data/spec/models/email_response_spec.rb +0 -60
- data/spec/models/email_stats_spec.rb +0 -42
- data/spec/models/email_stats_stats_spec.rb +0 -96
- data/spec/models/event_metadata_spec.rb +0 -84
- data/spec/models/event_spec.rb +0 -150
- data/spec/models/geo_location_spec.rb +0 -60
- data/spec/models/ip_allocation_request_spec.rb +0 -42
- data/spec/models/ip_deletion_response_spec.rb +0 -42
- data/spec/models/ip_pool_create_request_spec.rb +0 -66
- data/spec/models/ip_pool_delete_response_spec.rb +0 -42
- data/spec/models/ip_pool_spec.rb +0 -108
- data/spec/models/ip_pool_update_request_spec.rb +0 -54
- data/spec/models/ip_spec.rb +0 -168
- data/spec/models/ip_update_request_spec.rb +0 -36
- data/spec/models/label_spec.rb +0 -48
- data/spec/models/member_spec.rb +0 -102
- data/spec/models/message_header_to_spec.rb +0 -60
- data/spec/models/message_spec.rb +0 -210
- data/spec/models/message_to_spec.rb +0 -60
- data/spec/models/operating_system_spec.rb +0 -60
- data/spec/models/person_spec.rb +0 -42
- data/spec/models/recipient_spec.rb +0 -60
- data/spec/models/smtp_auth_spec.rb +0 -60
- data/spec/models/stat_spec.rb +0 -42
- data/spec/models/stat_stat_spec.rb +0 -96
- data/spec/models/stat_stats_spec.rb +0 -96
- data/spec/models/sub_account_spec.rb +0 -130
- data/spec/models/suppression_spec.rb +0 -60
- data/spec/models/third_party_sending_provider_spec.rb +0 -96
- data/spec/models/update_sub_account_spec.rb +0 -36
- data/spec/models/update_webhook_spec.rb +0 -120
- data/spec/models/user_agent_spec.rb +0 -54
- data/spec/models/webhook_spec.rb +0 -144
data/docs/Suppression.md
CHANGED
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **Integer** |
|
|
8
|
-
| **
|
|
9
|
-
| **
|
|
10
|
-
| **
|
|
11
|
-
| **
|
|
7
|
+
| **id** | **Integer** | Unique identifier for the suppression record | [optional] |
|
|
8
|
+
| **email** | **String** | The suppressed email address | [optional] |
|
|
9
|
+
| **reason** | **Integer** | Reason code for the suppression: - `0` = Manual (added via API or dashboard) - `1` = Unsubscribe (recipient clicked unsubscribe link) - `2` = Hard Bounce (permanent delivery failure) - `3` = Spam Complaint (recipient marked as spam) - `4` = Hard Bounce (detected by post-send validation) | [optional] |
|
|
10
|
+
| **reason_text** | **String** | Human-readable suppression reason | [optional] |
|
|
11
|
+
| **smtp_error** | **String** | SMTP error message from the receiving server (only for hard bounce suppressions). Useful for diagnosing delivery issues. | [optional] |
|
|
12
|
+
| **message_uuid** | **String** | UUID of the message whose bounce/complaint caused this suppression. Empty for manually added suppressions. Useful for tracing the origin. | [optional] |
|
|
13
|
+
| **created** | **Integer** | UNIX epoch timestamp in nanoseconds when the suppression was added | [optional] |
|
|
12
14
|
|
|
13
15
|
## Example
|
|
14
16
|
|
|
@@ -16,11 +18,13 @@
|
|
|
16
18
|
require 'sendpost_ruby_sdk'
|
|
17
19
|
|
|
18
20
|
instance = Sendpost::Suppression.new(
|
|
19
|
-
id:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
id: 35,
|
|
22
|
+
email: bounced@example.com,
|
|
23
|
+
reason: 2,
|
|
24
|
+
reason_text: hardBounce,
|
|
25
|
+
smtp_error: 550 5.1.1 The email account that you tried to reach does not exist,
|
|
26
|
+
message_uuid: 3f2504e0-4f89-41d3-9a0c-0305e82c3301,
|
|
27
|
+
created: 1704067200000000000
|
|
24
28
|
)
|
|
25
29
|
```
|
|
26
30
|
|
data/docs/SuppressionApi.md
CHANGED
|
@@ -15,7 +15,7 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
|
|
|
15
15
|
|
|
16
16
|
Create Suppressions
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Add email addresses to your suppression list to prevent future emails from being sent. This is essential for maintaining sender reputation and compliance. **When to Use Each Type:** | Type | Use When | |------|----------| | `hardBounce` | You know an address is permanently invalid | | `manual` | Processing do-not-contact requests from support | | `unsubscribe` | Syncing unsubscribes from external systems | | `spamComplaint` | Importing complaints from other providers | **Common Use Cases:** - **Migration:** Import suppression list from previous email provider - **CRM Sync:** Add unsubscribes from your marketing platform - **Bulk Cleanup:** Add known invalid addresses from data cleaning - **Support Tickets:** Honor do-not-contact requests **Best Practices:** - Import historical bounce data when migrating providers - Sync unsubscribes immediately when received from external sources - Process support-requested suppressions within 24 hours - Use `manual` for addresses you want to suppress without categorization
|
|
19
19
|
|
|
20
20
|
### Examples
|
|
21
21
|
|
|
@@ -82,11 +82,11 @@ end
|
|
|
82
82
|
|
|
83
83
|
## delete_suppression
|
|
84
84
|
|
|
85
|
-
> <
|
|
85
|
+
> <DeleteSuppression200Response> delete_suppression(delete_suppression_request)
|
|
86
86
|
|
|
87
87
|
Delete Suppressions
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Remove email addresses from your suppression list, allowing them to receive emails again. **⚠️ Important: Use with caution!** Re-enabling sending to previously suppressed addresses can harm your sender reputation if used incorrectly. **Valid Use Cases:** - User confirms their valid email was incorrectly bounced - Manual suppression was added by mistake - User explicitly requests re-subscription after unsubscribing - Testing/development addresses that were suppressed **Not Recommended:** - Bulk removing hard bounces without individual verification - Removing spam complaints (users rarely want to receive emails again) - Attempting to re-engage addresses that bounced **Best Practice:** Before removing a suppression, verify with the recipient that they want to receive emails and that their address is valid.
|
|
90
90
|
|
|
91
91
|
### Examples
|
|
92
92
|
|
|
@@ -117,7 +117,7 @@ end
|
|
|
117
117
|
|
|
118
118
|
This returns an Array which contains the response data, status code and headers.
|
|
119
119
|
|
|
120
|
-
> <Array(<
|
|
120
|
+
> <Array(<DeleteSuppression200Response>, Integer, Hash)> delete_suppression_with_http_info(delete_suppression_request)
|
|
121
121
|
|
|
122
122
|
```ruby
|
|
123
123
|
begin
|
|
@@ -125,7 +125,7 @@ begin
|
|
|
125
125
|
data, status_code, headers = api_instance.delete_suppression_with_http_info(delete_suppression_request)
|
|
126
126
|
p status_code # => 2xx
|
|
127
127
|
p headers # => { ... }
|
|
128
|
-
p data # => <
|
|
128
|
+
p data # => <DeleteSuppression200Response>
|
|
129
129
|
rescue Sendpost::ApiError => e
|
|
130
130
|
puts "Error when calling SuppressionApi->delete_suppression_with_http_info: #{e}"
|
|
131
131
|
end
|
|
@@ -139,7 +139,7 @@ end
|
|
|
139
139
|
|
|
140
140
|
### Return type
|
|
141
141
|
|
|
142
|
-
[**
|
|
142
|
+
[**DeleteSuppression200Response**](DeleteSuppression200Response.md)
|
|
143
143
|
|
|
144
144
|
### Authorization
|
|
145
145
|
|
|
@@ -157,7 +157,7 @@ end
|
|
|
157
157
|
|
|
158
158
|
List Suppressions
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
Retrieve the suppression list for your sub-account. Suppressions are email addresses that should not receive emails to protect your sender reputation and ensure compliance. **Suppression Types:** | Type | Reason Code | Description | |------|-------------|-------------| | `manual` | 0 | Manually added by your team | | `unsubscribe` | 1 | User clicked unsubscribe link | | `hardBounce` | 2 | Permanent delivery failure (invalid address) | | `spamComplaint` | 3 | User marked email as spam | **Why Suppressions Matter:** - **Reputation Protection:** Repeatedly sending to bounced addresses damages sender reputation - **Compliance:** Required for CAN-SPAM, GDPR, and other regulations - **Cost Savings:** Avoid paying to send undeliverable emails - **Deliverability:** ISPs penalize senders with high bounce/complaint rates **Use Cases:** - Export suppression list for compliance audits - Sync suppressions with your CRM or marketing platform - Review recent bounces to identify data quality issues - Monitor spam complaints for content/targeting problems **Pagination:** Use `limit` and `offset` for large suppression lists. **Note:** Maximum date range is 60 days.
|
|
161
161
|
|
|
162
162
|
### Examples
|
|
163
163
|
|
|
@@ -173,13 +173,13 @@ Sendpost.configure do |config|
|
|
|
173
173
|
end
|
|
174
174
|
|
|
175
175
|
api_instance = Sendpost::SuppressionApi.new
|
|
176
|
-
from = Date.parse('
|
|
177
|
-
to = Date.parse('
|
|
176
|
+
from = Date.parse('2024-01-01') # Date | Start date for suppression records (inclusive). Format YYYY-MM-DD.
|
|
177
|
+
to = Date.parse('2024-01-31') # Date | End date for suppression records (inclusive). Max 60 days from `from` date.
|
|
178
178
|
opts = {
|
|
179
|
-
limit:
|
|
180
|
-
offset:
|
|
181
|
-
search: '
|
|
182
|
-
type: 'hardBounce' # String |
|
|
179
|
+
limit: 50, # Integer | Number of records to return per request. Default 20, max 100.
|
|
180
|
+
offset: 0, # Integer | Number of initial records to skip for pagination.
|
|
181
|
+
search: '@example.com', # String | Case-insensitive search against suppression email addresses.
|
|
182
|
+
type: 'hardBounce' # String | Filter by suppression type. Omit to return all types.
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
begin
|
|
@@ -213,12 +213,12 @@ end
|
|
|
213
213
|
|
|
214
214
|
| Name | Type | Description | Notes |
|
|
215
215
|
| ---- | ---- | ----------- | ----- |
|
|
216
|
-
| **from** | **Date** | Start date for
|
|
217
|
-
| **to** | **Date** | End date for
|
|
218
|
-
| **limit** | **Integer** | Number of records to return per request | [optional][default to 20] |
|
|
219
|
-
| **offset** | **Integer** | Number of initial records to skip | [optional][default to 0] |
|
|
220
|
-
| **search** | **String** | Case-insensitive search against suppression email | [optional] |
|
|
221
|
-
| **type** | **String** |
|
|
216
|
+
| **from** | **Date** | Start date for suppression records (inclusive). Format YYYY-MM-DD. | |
|
|
217
|
+
| **to** | **Date** | End date for suppression records (inclusive). Max 60 days from `from` date. | |
|
|
218
|
+
| **limit** | **Integer** | Number of records to return per request. Default 20, max 100. | [optional][default to 20] |
|
|
219
|
+
| **offset** | **Integer** | Number of initial records to skip for pagination. | [optional][default to 0] |
|
|
220
|
+
| **search** | **String** | Case-insensitive search against suppression email addresses. | [optional] |
|
|
221
|
+
| **type** | **String** | Filter by suppression type. Omit to return all types. | [optional] |
|
|
222
222
|
|
|
223
223
|
### Return type
|
|
224
224
|
|
data/docs/TPSPStat.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Sendpost::TPSPStat
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **processed** | **Integer** | Total number of emails accepted by SendPost API for processing. This is the starting point - all emails submitted through the API. | [optional] |
|
|
8
|
+
| **sent** | **Integer** | Number of emails sent to recipient mail servers. sent = processed - dropped - smtpDropped | [optional] |
|
|
9
|
+
| **dropped** | **Integer** | Number of emails dropped before sending. Common reasons: - Recipient email in suppression list (hard bounce, spam complaint, unsubscribe) - Invalid recipient email format - Sender domain not verified | [optional] |
|
|
10
|
+
| **smtp_dropped** | **Integer** | Number of emails dropped at SMTP level due to policy violations or rate limiting by the receiving server before delivery attempt completed. | [optional] |
|
|
11
|
+
| **delivered** | **Integer** | Number of emails successfully delivered to recipient mail servers. Note: Delivered means accepted by the server, not necessarily in inbox. | [optional] |
|
|
12
|
+
| **soft_bounced** | **Integer** | Number of temporary delivery failures (soft bounces). Common causes: - Recipient mailbox full - Server temporarily unavailable - Message too large SendPost automatically retries soft bounces. | [optional] |
|
|
13
|
+
| **hard_bounced** | **Integer** | Number of permanent delivery failures (hard bounces). Common causes: - Recipient email doesn't exist - Domain doesn't exist - Recipient has blocked sender Hard bounced addresses are automatically added to suppression list. | [optional] |
|
|
14
|
+
| **opened** | **Integer** | Number of emails opened (tracking pixel loaded). Requires trackOpens=true. Note: Some email clients block tracking pixels. | [optional] |
|
|
15
|
+
| **clicked** | **Integer** | Number of emails with at least one link clicked. Requires trackClicks=true. | [optional] |
|
|
16
|
+
| **unsubscribed** | **Integer** | Number of recipients who clicked the unsubscribe link. Unsubscribed addresses are automatically added to suppression list. | [optional] |
|
|
17
|
+
| **spam** | **Integer** | Number of spam complaints (recipient marked email as spam). High spam rates can severely impact your sender reputation. Target: Keep spam rate below 0.1%. | [optional] |
|
|
18
|
+
| **tpsp_id** | **Integer** | Unique identifier of the third-party sending provider. | [optional] |
|
|
19
|
+
| **name** | **String** | Human-readable name of the third-party sending provider. | [optional] |
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'sendpost_ruby_sdk'
|
|
25
|
+
|
|
26
|
+
instance = Sendpost::TPSPStat.new(
|
|
27
|
+
processed: 225,
|
|
28
|
+
sent: 220,
|
|
29
|
+
dropped: 10,
|
|
30
|
+
smtp_dropped: 5,
|
|
31
|
+
delivered: 200,
|
|
32
|
+
soft_bounced: 5,
|
|
33
|
+
hard_bounced: 10,
|
|
34
|
+
opened: 150,
|
|
35
|
+
clicked: 50,
|
|
36
|
+
unsubscribed: 6,
|
|
37
|
+
spam: 2,
|
|
38
|
+
tpsp_id: 7,
|
|
39
|
+
name: SendGrid
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
data/docs/UpdateSubAccount.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **name** | **String** | New name for the sub-account
|
|
7
|
+
| **name** | **String** | New display name for the sub-account | [optional] |
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
require 'sendpost_ruby_sdk'
|
|
13
13
|
|
|
14
14
|
instance = Sendpost::UpdateSubAccount.new(
|
|
15
|
-
name:
|
|
15
|
+
name: Marketing - Production v2
|
|
16
16
|
)
|
|
17
17
|
```
|
|
18
18
|
|
data/docs/UpdateWebhook.md
CHANGED
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **enabled** | **Boolean** |
|
|
8
|
-
| **url** | **String** | URL endpoint to
|
|
9
|
-
| **processed** | **Boolean** |
|
|
10
|
-
| **
|
|
11
|
-
| **
|
|
12
|
-
| **
|
|
13
|
-
| **
|
|
14
|
-
| **
|
|
15
|
-
| **
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
18
|
-
| **
|
|
19
|
-
| **
|
|
20
|
-
| **unique_open** | **Boolean** |
|
|
21
|
-
| **unique_click** | **Boolean** |
|
|
7
|
+
| **enabled** | **Boolean** | Whether the webhook is active immediately after creation. Set to false to configure and test before activating. | [optional][default to true] |
|
|
8
|
+
| **url** | **String** | HTTPS URL endpoint to receive webhook POST requests. Must: - Use HTTPS (HTTP not allowed for security) - Be publicly accessible - Return 2xx status within 10 seconds - Handle duplicate deliveries (use eventId for idempotency) | |
|
|
9
|
+
| **processed** | **Boolean** | Fire when email is accepted by SendPost API | [optional][default to false] |
|
|
10
|
+
| **sent** | **Boolean** | Fire when email is sent to recipient's mail server | [optional][default to false] |
|
|
11
|
+
| **delivered** | **Boolean** | Fire when email is accepted by recipient's mail server | [optional][default to true] |
|
|
12
|
+
| **dropped** | **Boolean** | Fire when email is not sent (suppression, invalid, etc.) | [optional][default to true] |
|
|
13
|
+
| **smtp_dropped** | **Boolean** | Fire when email is rejected at SMTP level | [optional][default to false] |
|
|
14
|
+
| **soft_bounced** | **Boolean** | Fire on temporary delivery failure (will retry) | [optional][default to true] |
|
|
15
|
+
| **hard_bounced** | **Boolean** | Fire on permanent delivery failure | [optional][default to true] |
|
|
16
|
+
| **opened** | **Boolean** | Fire when email is opened. Fires on EVERY open. Consider using `uniqueOpen` instead to reduce volume. | [optional][default to true] |
|
|
17
|
+
| **clicked** | **Boolean** | Fire when a link is clicked. Fires on EVERY click. Consider using `uniqueClick` instead to reduce volume. | [optional][default to true] |
|
|
18
|
+
| **unsubscribed** | **Boolean** | Fire when recipient clicks unsubscribe link | [optional][default to true] |
|
|
19
|
+
| **spam** | **Boolean** | Fire when recipient marks email as spam | [optional][default to true] |
|
|
20
|
+
| **unique_open** | **Boolean** | Fire only on FIRST open of each email (unique opens). More efficient than `opened` if you only need engagement metrics. | [optional][default to false] |
|
|
21
|
+
| **unique_click** | **Boolean** | Fire only on FIRST click of each email (unique clicks). More efficient than `clicked` if you only need engagement metrics. | [optional][default to false] |
|
|
22
22
|
|
|
23
23
|
## Example
|
|
24
24
|
|
|
@@ -27,20 +27,20 @@ require 'sendpost_ruby_sdk'
|
|
|
27
27
|
|
|
28
28
|
instance = Sendpost::UpdateWebhook.new(
|
|
29
29
|
enabled: true,
|
|
30
|
-
url: https://app.hooli.com/
|
|
31
|
-
processed:
|
|
30
|
+
url: https://app.hooli.com/api/webhooks/sendpost,
|
|
31
|
+
processed: false,
|
|
32
|
+
sent: false,
|
|
32
33
|
delivered: true,
|
|
33
|
-
dropped:
|
|
34
|
-
|
|
34
|
+
dropped: true,
|
|
35
|
+
smtp_dropped: false,
|
|
36
|
+
soft_bounced: true,
|
|
35
37
|
hard_bounced: true,
|
|
36
38
|
opened: true,
|
|
37
39
|
clicked: true,
|
|
38
40
|
unsubscribed: true,
|
|
39
41
|
spam: true,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
unique_open: true,
|
|
43
|
-
unique_click: true
|
|
42
|
+
unique_open: false,
|
|
43
|
+
unique_click: false
|
|
44
44
|
)
|
|
45
45
|
```
|
|
46
46
|
|
data/docs/UserAgent.md
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **family** | **String** | | [optional] |
|
|
8
|
-
| **major** | **String** |
|
|
9
|
-
| **minor** | **String** |
|
|
10
|
-
| **patch** | **String** |
|
|
7
|
+
| **family** | **String** | Browser or email client family name. Common values: Chrome, Safari, Firefox, Outlook, Apple Mail, Gmail | [optional] |
|
|
8
|
+
| **major** | **String** | Major version number | [optional] |
|
|
9
|
+
| **minor** | **String** | Minor version number | [optional] |
|
|
10
|
+
| **patch** | **String** | Patch version number | [optional] |
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
require 'sendpost_ruby_sdk'
|
|
16
16
|
|
|
17
17
|
instance = Sendpost::UserAgent.new(
|
|
18
|
-
family:
|
|
19
|
-
major:
|
|
18
|
+
family: Chrome,
|
|
19
|
+
major: 120,
|
|
20
20
|
minor: 0,
|
|
21
|
-
patch:
|
|
21
|
+
patch: 6099
|
|
22
22
|
)
|
|
23
23
|
```
|
|
24
24
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Sendpost::ValidationStat
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **initiated** | **Integer** | Number of validation requests initiated. | [optional] |
|
|
8
|
+
| **processed** | **Integer** | Number of validation requests fully processed. | [optional] |
|
|
9
|
+
| **valid** | **Integer** | Number of addresses determined to be valid/deliverable. | [optional] |
|
|
10
|
+
| **invalid** | **Integer** | Number of addresses determined to be invalid/undeliverable. | [optional] |
|
|
11
|
+
| **soft_bounced** | **Integer** | Number of addresses that soft-bounced during validation. | [optional] |
|
|
12
|
+
| **hard_bounced** | **Integer** | Number of addresses that hard-bounced during validation. | [optional] |
|
|
13
|
+
| **catch_all** | **Integer** | Number of addresses on catch-all (accept-all) domains. | [optional] |
|
|
14
|
+
| **unknown** | **Integer** | Number of addresses whose deliverability could not be determined. | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'sendpost_ruby_sdk'
|
|
20
|
+
|
|
21
|
+
instance = Sendpost::ValidationStat.new(
|
|
22
|
+
initiated: 1000,
|
|
23
|
+
processed: 980,
|
|
24
|
+
valid: 820,
|
|
25
|
+
invalid: 90,
|
|
26
|
+
soft_bounced: 20,
|
|
27
|
+
hard_bounced: 15,
|
|
28
|
+
catch_all: 25,
|
|
29
|
+
unknown: 10
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
data/docs/Webhook.md
CHANGED
|
@@ -4,25 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **id** | **Integer** | Unique
|
|
8
|
-
| **enabled** | **Boolean** |
|
|
9
|
-
| **url** | **String** |
|
|
10
|
-
| **processed** | **Boolean** | Trigger webhook
|
|
11
|
-
| **
|
|
12
|
-
| **dropped** | **Boolean** | Trigger webhook
|
|
13
|
-
| **
|
|
14
|
-
| **
|
|
15
|
-
| **
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
18
|
-
| **
|
|
19
|
-
| **
|
|
20
|
-
| **
|
|
21
|
-
| **unique_open** | **Boolean** | Trigger webhook on
|
|
22
|
-
| **unique_click** | **Boolean** | Trigger webhook on
|
|
23
|
-
| **
|
|
24
|
-
| **
|
|
25
|
-
| **
|
|
7
|
+
| **id** | **Integer** | Unique identifier for the webhook configuration | [optional] |
|
|
8
|
+
| **enabled** | **Boolean** | Whether the webhook is active. When false, no events will be sent to this webhook. Useful for temporarily pausing notifications during maintenance. | [optional] |
|
|
9
|
+
| **url** | **String** | HTTPS endpoint URL to receive webhook POST requests. Must be publicly accessible and return 2xx status code. | [optional] |
|
|
10
|
+
| **processed** | **Boolean** | Trigger webhook when an email is accepted for processing. Fires immediately when API call is successful. | [optional] |
|
|
11
|
+
| **sent** | **Boolean** | Trigger webhook when an email is sent to the recipient's mail server. Indicates the email left SendPost's infrastructure. | [optional] |
|
|
12
|
+
| **dropped** | **Boolean** | Trigger webhook when an email is dropped before sending. Common reasons: suppressed address, invalid email, unverified domain. | [optional] |
|
|
13
|
+
| **smtp_dropped** | **Boolean** | Trigger webhook when an email is dropped at SMTP level. Usually due to policy rejection by receiving server. | [optional] |
|
|
14
|
+
| **delivered** | **Boolean** | Trigger webhook when an email is successfully delivered. Note: \"Delivered\" means accepted by mail server, not inbox placement. | [optional] |
|
|
15
|
+
| **soft_bounced** | **Boolean** | Trigger webhook on temporary delivery failure (soft bounce). SendPost will retry delivery automatically. | [optional] |
|
|
16
|
+
| **hard_bounced** | **Boolean** | Trigger webhook on permanent delivery failure (hard bounce). The recipient is automatically added to suppression list. | [optional] |
|
|
17
|
+
| **opened** | **Boolean** | Trigger webhook when recipient opens the email. Fires on every open (can fire multiple times per email). | [optional] |
|
|
18
|
+
| **clicked** | **Boolean** | Trigger webhook when recipient clicks a link. Fires on every click (can fire multiple times per email). | [optional] |
|
|
19
|
+
| **unsubscribed** | **Boolean** | Trigger webhook when recipient clicks the unsubscribe link. The recipient is automatically added to suppression list. | [optional] |
|
|
20
|
+
| **spam** | **Boolean** | Trigger webhook when recipient marks email as spam. The recipient is automatically added to suppression list. Monitor this closely - high spam rates damage sender reputation. | [optional] |
|
|
21
|
+
| **unique_open** | **Boolean** | Trigger webhook only on the first open of an email (unique opens). Use this instead of 'opened' if you only care about unique engagement. | [optional] |
|
|
22
|
+
| **unique_click** | **Boolean** | Trigger webhook only on the first click of an email (unique clicks). Use this instead of 'clicked' if you only care about unique engagement. | [optional] |
|
|
23
|
+
| **status** | **String** | Health status of the webhook (read-only): - `active` - delivering normally - `degraded` - recent delivery failures - `disabled` - auto-disabled after repeated consecutive failures | [optional] |
|
|
24
|
+
| **disabled_at** | **Integer** | UNIX epoch timestamp in nanoseconds when the webhook was auto-disabled (0 if never). Read-only. | [optional] |
|
|
25
|
+
| **disabled_reason** | **String** | Human-readable reason the webhook was auto-disabled (empty if active). Read-only. | [optional] |
|
|
26
|
+
| **created** | **Integer** | UNIX epoch timestamp in nanoseconds when the webhook was created | [optional] |
|
|
26
27
|
|
|
27
28
|
## Example
|
|
28
29
|
|
|
@@ -32,23 +33,24 @@ require 'sendpost_ruby_sdk'
|
|
|
32
33
|
instance = Sendpost::Webhook.new(
|
|
33
34
|
id: 117,
|
|
34
35
|
enabled: true,
|
|
35
|
-
url: https://app.hooli.com/
|
|
36
|
+
url: https://app.hooli.com/api/webhooks/sendpost,
|
|
36
37
|
processed: true,
|
|
38
|
+
sent: true,
|
|
39
|
+
dropped: true,
|
|
40
|
+
smtp_dropped: false,
|
|
37
41
|
delivered: true,
|
|
38
|
-
|
|
39
|
-
soft_bounced: false,
|
|
42
|
+
soft_bounced: true,
|
|
40
43
|
hard_bounced: true,
|
|
41
44
|
opened: true,
|
|
42
45
|
clicked: true,
|
|
43
46
|
unsubscribed: true,
|
|
44
47
|
spam: true,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
updated_by: null
|
|
48
|
+
unique_open: false,
|
|
49
|
+
unique_click: false,
|
|
50
|
+
status: active,
|
|
51
|
+
disabled_at: 0,
|
|
52
|
+
disabled_reason: ,
|
|
53
|
+
created: 1704067200000000000
|
|
52
54
|
)
|
|
53
55
|
```
|
|
54
56
|
|
data/docs/WebhookApi.md
CHANGED
|
@@ -13,11 +13,11 @@ All URIs are relative to *https://api.sendpost.io/api/v1*
|
|
|
13
13
|
|
|
14
14
|
## create_webhook
|
|
15
15
|
|
|
16
|
-
> <Webhook> create_webhook(
|
|
16
|
+
> <Webhook> create_webhook(new_webhook)
|
|
17
17
|
|
|
18
18
|
Create Webhook
|
|
19
19
|
|
|
20
|
-
Create a new webhook
|
|
20
|
+
Create a new webhook to receive real-time notifications for email events. Your endpoint will receive HTTP POST requests with event data as they occur. **Endpoint Requirements:** - Must be publicly accessible HTTPS URL - Should return 2xx status within 30 seconds - Handle potential duplicate events (use event ID for deduplication) - Implement retry/queue logic for reliability **Choosing Events:** - **Engagement Tracking:** `uniqueOpened`, `uniqueClicked` for metrics - **Full History:** `opened`, `clicked` for complete event logs - **Delivery Monitoring:** `delivered`, `hardBounced`, `softBounced` - **Compliance:** `unsubscribed`, `spam` **Best Practices:** - Only enable events you actually need - Store events before processing (async processing) - Implement idempotency using event IDs - Set up monitoring for webhook failures **Webhook Payload Example:** ```json { \"eventId\": \"evt_123\", \"event\": \"delivered\", \"messageId\": \"msg_456\", \"recipient\": \"user@example.com\", \"timestamp\": \"2024-01-15T10:30:00Z\" } ```
|
|
21
21
|
|
|
22
22
|
### Examples
|
|
23
23
|
|
|
@@ -33,11 +33,11 @@ Sendpost.configure do |config|
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
api_instance = Sendpost::WebhookApi.new
|
|
36
|
-
|
|
36
|
+
new_webhook = Sendpost::NewWebhook.new({url: 'https://app.hooli.com/api/webhooks/sendpost'}) # NewWebhook |
|
|
37
37
|
|
|
38
38
|
begin
|
|
39
39
|
# Create Webhook
|
|
40
|
-
result = api_instance.create_webhook(
|
|
40
|
+
result = api_instance.create_webhook(new_webhook)
|
|
41
41
|
p result
|
|
42
42
|
rescue Sendpost::ApiError => e
|
|
43
43
|
puts "Error when calling WebhookApi->create_webhook: #{e}"
|
|
@@ -48,12 +48,12 @@ end
|
|
|
48
48
|
|
|
49
49
|
This returns an Array which contains the response data, status code and headers.
|
|
50
50
|
|
|
51
|
-
> <Array(<Webhook>, Integer, Hash)> create_webhook_with_http_info(
|
|
51
|
+
> <Array(<Webhook>, Integer, Hash)> create_webhook_with_http_info(new_webhook)
|
|
52
52
|
|
|
53
53
|
```ruby
|
|
54
54
|
begin
|
|
55
55
|
# Create Webhook
|
|
56
|
-
data, status_code, headers = api_instance.create_webhook_with_http_info(
|
|
56
|
+
data, status_code, headers = api_instance.create_webhook_with_http_info(new_webhook)
|
|
57
57
|
p status_code # => 2xx
|
|
58
58
|
p headers # => { ... }
|
|
59
59
|
p data # => <Webhook>
|
|
@@ -66,7 +66,7 @@ end
|
|
|
66
66
|
|
|
67
67
|
| Name | Type | Description | Notes |
|
|
68
68
|
| ---- | ---- | ----------- | ----- |
|
|
69
|
-
| **
|
|
69
|
+
| **new_webhook** | [**NewWebhook**](NewWebhook.md) | | |
|
|
70
70
|
|
|
71
71
|
### Return type
|
|
72
72
|
|
|
@@ -88,7 +88,7 @@ end
|
|
|
88
88
|
|
|
89
89
|
Delete Webhook
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Remove a webhook from your account. After deletion, no further events will be sent to that endpoint. **Before Deleting:** - Ensure your application doesn't rely on these events - Consider updating to a new webhook instead if you're migrating **Note:** Events that occurred before deletion are not affected. Historical data remains intact.
|
|
92
92
|
|
|
93
93
|
### Examples
|
|
94
94
|
|
|
@@ -104,7 +104,7 @@ Sendpost.configure do |config|
|
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
api_instance = Sendpost::WebhookApi.new
|
|
107
|
-
webhook_id = 117 # Integer | ID of the webhook to delete.
|
|
107
|
+
webhook_id = 117 # Integer | The unique ID of the webhook to delete.
|
|
108
108
|
|
|
109
109
|
begin
|
|
110
110
|
# Delete Webhook
|
|
@@ -137,7 +137,7 @@ end
|
|
|
137
137
|
|
|
138
138
|
| Name | Type | Description | Notes |
|
|
139
139
|
| ---- | ---- | ----------- | ----- |
|
|
140
|
-
| **webhook_id** | **Integer** | ID of the webhook to delete. | |
|
|
140
|
+
| **webhook_id** | **Integer** | The unique ID of the webhook to delete. | |
|
|
141
141
|
|
|
142
142
|
### Return type
|
|
143
143
|
|
|
@@ -155,11 +155,11 @@ end
|
|
|
155
155
|
|
|
156
156
|
## get_all_webhooks
|
|
157
157
|
|
|
158
|
-
> <Array<
|
|
158
|
+
> <Array<AccountWebhookWithStats>> get_all_webhooks(opts)
|
|
159
159
|
|
|
160
160
|
List Webhooks
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
Retrieve all configured webhooks for your account. Webhooks enable real-time notifications when email events occur, allowing you to build reactive applications. **Supported Events:** | Event | Description | |-------|-------------| | `processed` | Email accepted and queued for delivery | | `dropped` | Email blocked (suppressed, invalid, policy) | | `delivered` | Email successfully delivered to recipient | | `hardBounced` | Permanent delivery failure | | `softBounced` | Temporary delivery failure | | `opened` | Recipient opened the email (all opens) | | `uniqueOpened` | First open per recipient only | | `clicked` | Recipient clicked a link (all clicks) | | `uniqueClicked` | First click per recipient only | | `unsubscribed` | Recipient unsubscribed | | `spam` | Recipient marked email as spam | **Use Cases:** - Audit configured webhook endpoints - Verify webhook URLs are correct - Review enabled events per webhook - Debug webhook delivery issues
|
|
163
163
|
|
|
164
164
|
### Examples
|
|
165
165
|
|
|
@@ -176,9 +176,9 @@ end
|
|
|
176
176
|
|
|
177
177
|
api_instance = Sendpost::WebhookApi.new
|
|
178
178
|
opts = {
|
|
179
|
-
limit: 10, # Integer | Number of records to return per request.
|
|
180
|
-
offset: 0, # Integer | Number of initial records to skip.
|
|
181
|
-
search: '
|
|
179
|
+
limit: 10, # Integer | Number of records to return per request. Default 20.
|
|
180
|
+
offset: 0, # Integer | Number of initial records to skip for pagination.
|
|
181
|
+
search: 'api.yoursite.com' # String | Case insensitive search against webhook URLs.
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
begin
|
|
@@ -194,7 +194,7 @@ end
|
|
|
194
194
|
|
|
195
195
|
This returns an Array which contains the response data, status code and headers.
|
|
196
196
|
|
|
197
|
-
> <Array(<Array<
|
|
197
|
+
> <Array(<Array<AccountWebhookWithStats>>, Integer, Hash)> get_all_webhooks_with_http_info(opts)
|
|
198
198
|
|
|
199
199
|
```ruby
|
|
200
200
|
begin
|
|
@@ -202,7 +202,7 @@ begin
|
|
|
202
202
|
data, status_code, headers = api_instance.get_all_webhooks_with_http_info(opts)
|
|
203
203
|
p status_code # => 2xx
|
|
204
204
|
p headers # => { ... }
|
|
205
|
-
p data # => <Array<
|
|
205
|
+
p data # => <Array<AccountWebhookWithStats>>
|
|
206
206
|
rescue Sendpost::ApiError => e
|
|
207
207
|
puts "Error when calling WebhookApi->get_all_webhooks_with_http_info: #{e}"
|
|
208
208
|
end
|
|
@@ -212,13 +212,13 @@ end
|
|
|
212
212
|
|
|
213
213
|
| Name | Type | Description | Notes |
|
|
214
214
|
| ---- | ---- | ----------- | ----- |
|
|
215
|
-
| **limit** | **Integer** | Number of records to return per request. | [optional] |
|
|
216
|
-
| **offset** | **Integer** | Number of initial records to skip. | [optional] |
|
|
217
|
-
| **search** | **String** | Case insensitive search against webhook
|
|
215
|
+
| **limit** | **Integer** | Number of records to return per request. Default 20. | [optional][default to 20] |
|
|
216
|
+
| **offset** | **Integer** | Number of initial records to skip for pagination. | [optional][default to 0] |
|
|
217
|
+
| **search** | **String** | Case insensitive search against webhook URLs. | [optional] |
|
|
218
218
|
|
|
219
219
|
### Return type
|
|
220
220
|
|
|
221
|
-
[**Array<
|
|
221
|
+
[**Array<AccountWebhookWithStats>**](AccountWebhookWithStats.md)
|
|
222
222
|
|
|
223
223
|
### Authorization
|
|
224
224
|
|
|
@@ -236,7 +236,7 @@ end
|
|
|
236
236
|
|
|
237
237
|
Get Webhook
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
Retrieve detailed information about a specific webhook, including its endpoint URL and enabled events. **Use Cases:** - Verify webhook configuration - Debug event delivery issues - Check enabled events for a webhook - Audit webhook settings
|
|
240
240
|
|
|
241
241
|
### Examples
|
|
242
242
|
|
|
@@ -252,7 +252,7 @@ Sendpost.configure do |config|
|
|
|
252
252
|
end
|
|
253
253
|
|
|
254
254
|
api_instance = Sendpost::WebhookApi.new
|
|
255
|
-
webhook_id = 117 # Integer | The ID of the webhook to retrieve.
|
|
255
|
+
webhook_id = 117 # Integer | The unique ID of the webhook to retrieve.
|
|
256
256
|
|
|
257
257
|
begin
|
|
258
258
|
# Get Webhook
|
|
@@ -285,7 +285,7 @@ end
|
|
|
285
285
|
|
|
286
286
|
| Name | Type | Description | Notes |
|
|
287
287
|
| ---- | ---- | ----------- | ----- |
|
|
288
|
-
| **webhook_id** | **Integer** | The ID of the webhook to retrieve. | |
|
|
288
|
+
| **webhook_id** | **Integer** | The unique ID of the webhook to retrieve. | |
|
|
289
289
|
|
|
290
290
|
### Return type
|
|
291
291
|
|
|
@@ -307,7 +307,7 @@ end
|
|
|
307
307
|
|
|
308
308
|
Update Webhook
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
Modify an existing webhook's configuration. Use this to change the endpoint URL or update which events trigger notifications. **What Can Be Updated:** - Webhook endpoint URL - Enabled/disabled events - Event-specific settings **Use Cases:** - Migrate to a new endpoint URL - Enable additional events as needs grow - Disable events to reduce traffic - Update after infrastructure changes
|
|
311
311
|
|
|
312
312
|
### Examples
|
|
313
313
|
|
|
@@ -323,8 +323,8 @@ Sendpost.configure do |config|
|
|
|
323
323
|
end
|
|
324
324
|
|
|
325
325
|
api_instance = Sendpost::WebhookApi.new
|
|
326
|
-
update_webhook = Sendpost::UpdateWebhook.new # UpdateWebhook |
|
|
327
|
-
webhook_id = 117 # Integer | ID of the webhook to update.
|
|
326
|
+
update_webhook = Sendpost::UpdateWebhook.new({url: 'https://app.hooli.com/api/webhooks/sendpost'}) # UpdateWebhook |
|
|
327
|
+
webhook_id = 117 # Integer | The unique ID of the webhook to update.
|
|
328
328
|
|
|
329
329
|
begin
|
|
330
330
|
# Update Webhook
|
|
@@ -358,7 +358,7 @@ end
|
|
|
358
358
|
| Name | Type | Description | Notes |
|
|
359
359
|
| ---- | ---- | ----------- | ----- |
|
|
360
360
|
| **update_webhook** | [**UpdateWebhook**](UpdateWebhook.md) | | |
|
|
361
|
-
| **webhook_id** | **Integer** | ID of the webhook to update. | |
|
|
361
|
+
| **webhook_id** | **Integer** | The unique ID of the webhook to update. | |
|
|
362
362
|
|
|
363
363
|
### Return type
|
|
364
364
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Sendpost::WebhookObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **event** | [**Event**](Event.md) | Details about the email event that triggered this webhook | [optional] |
|
|
8
|
+
| **email_message** | [**EmailMessage**](EmailMessage.md) | The original email message associated with this event | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'sendpost_ruby_sdk'
|
|
14
|
+
|
|
15
|
+
instance = Sendpost::WebhookObject.new(
|
|
16
|
+
event: null,
|
|
17
|
+
email_message: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|