Documentation
¶
Overview ¶
Package oapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateEmailMessageBatchRequest(server string, params *CreateEmailMessageBatchParams, ...) (*http.Request, error)
- func NewCreateEmailMessageBatchRequestWithBody(server string, params *CreateEmailMessageBatchParams, contentType string, ...) (*http.Request, error)
- func NewCreateEmailMessageRequest(server string, params *CreateEmailMessageParams, ...) (*http.Request, error)
- func NewCreateEmailMessageRequestWithBody(server string, params *CreateEmailMessageParams, contentType string, ...) (*http.Request, error)
- func NewCreateEmailTemplateRequest(server string, params *CreateEmailTemplateParams, ...) (*http.Request, error)
- func NewCreateEmailTemplateRequestWithBody(server string, params *CreateEmailTemplateParams, contentType string, ...) (*http.Request, error)
- func NewCreateSMSMessageBatchRequest(server string, params *CreateSMSMessageBatchParams, ...) (*http.Request, error)
- func NewCreateSMSMessageBatchRequestWithBody(server string, params *CreateSMSMessageBatchParams, contentType string, ...) (*http.Request, error)
- func NewCreateSMSMessageRequest(server string, params *CreateSMSMessageParams, ...) (*http.Request, error)
- func NewCreateSMSMessageRequestWithBody(server string, params *CreateSMSMessageParams, contentType string, ...) (*http.Request, error)
- func NewDeleteEmailTemplateRequest(server string, templateId EmailTemplateID, params *DeleteEmailTemplateParams) (*http.Request, error)
- func NewGetEmailMessageRequest(server string, messageId EmailID) (*http.Request, error)
- func NewGetEmailTemplateRequest(server string, templateId EmailTemplateID) (*http.Request, error)
- func NewGetEmailTemplateVersionRequest(server string, templateId EmailTemplateID, versionId EmailTemplateVersionID) (*http.Request, error)
- func NewGetSMSMessageRequest(server string, messageId SMSMessageID) (*http.Request, error)
- func NewGetSMSTemplateRequest(server string, templateRef string) (*http.Request, error)
- func NewListEmailMessagesRequest(server string, params *ListEmailMessagesParams) (*http.Request, error)
- func NewListEmailTemplateVersionsRequest(server string, templateId EmailTemplateID) (*http.Request, error)
- func NewListEmailTemplatesRequest(server string, params *ListEmailTemplatesParams) (*http.Request, error)
- func NewListSMSMessagesRequest(server string, params *ListSMSMessagesParams) (*http.Request, error)
- func NewListSMSTemplatesRequest(server string, params *ListSMSTemplatesParams) (*http.Request, error)
- func NewPublishEmailTemplateRequest(server string, templateId EmailTemplateID, params *PublishEmailTemplateParams) (*http.Request, error)
- func NewUpdateEmailTemplateRequest(server string, templateId EmailTemplateID, params *UpdateEmailTemplateParams, ...) (*http.Request, error)
- func NewUpdateEmailTemplateRequestWithBody(server string, templateId EmailTemplateID, params *UpdateEmailTemplateParams, ...) (*http.Request, error)
- type BadRequest
- type BrandKitID
- type Client
- func (c *Client) CreateEmailMessage(ctx context.Context, params *CreateEmailMessageParams, ...) (*http.Response, error)
- func (c *Client) CreateEmailMessageBatch(ctx context.Context, params *CreateEmailMessageBatchParams, ...) (*http.Response, error)
- func (c *Client) CreateEmailMessageBatchWithBody(ctx context.Context, params *CreateEmailMessageBatchParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateEmailMessageWithBody(ctx context.Context, params *CreateEmailMessageParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateEmailTemplate(ctx context.Context, params *CreateEmailTemplateParams, ...) (*http.Response, error)
- func (c *Client) CreateEmailTemplateWithBody(ctx context.Context, params *CreateEmailTemplateParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateSMSMessage(ctx context.Context, params *CreateSMSMessageParams, ...) (*http.Response, error)
- func (c *Client) CreateSMSMessageBatch(ctx context.Context, params *CreateSMSMessageBatchParams, ...) (*http.Response, error)
- func (c *Client) CreateSMSMessageBatchWithBody(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateSMSMessageWithBody(ctx context.Context, params *CreateSMSMessageParams, contentType string, ...) (*http.Response, error)
- func (c *Client) DeleteEmailTemplate(ctx context.Context, templateId EmailTemplateID, ...) (*http.Response, error)
- func (c *Client) GetEmailMessage(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetEmailTemplate(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetEmailTemplateVersion(ctx context.Context, templateId EmailTemplateID, ...) (*http.Response, error)
- func (c *Client) GetSMSMessage(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSMSTemplate(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListEmailMessages(ctx context.Context, params *ListEmailMessagesParams, ...) (*http.Response, error)
- func (c *Client) ListEmailTemplateVersions(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListEmailTemplates(ctx context.Context, params *ListEmailTemplatesParams, ...) (*http.Response, error)
- func (c *Client) ListSMSMessages(ctx context.Context, params *ListSMSMessagesParams, ...) (*http.Response, error)
- func (c *Client) ListSMSTemplates(ctx context.Context, params *ListSMSTemplatesParams, ...) (*http.Response, error)
- func (c *Client) PublishEmailTemplate(ctx context.Context, templateId EmailTemplateID, ...) (*http.Response, error)
- func (c *Client) UpdateEmailTemplate(ctx context.Context, templateId EmailTemplateID, ...) (*http.Response, error)
- func (c *Client) UpdateEmailTemplateWithBody(ctx context.Context, templateId EmailTemplateID, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateEmailMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateEmailMessageBatchParams, contentType string, ...) (*CreateEmailMessageBatchResponse, error)
- func (c *ClientWithResponses) CreateEmailMessageBatchWithResponse(ctx context.Context, params *CreateEmailMessageBatchParams, ...) (*CreateEmailMessageBatchResponse, error)
- func (c *ClientWithResponses) CreateEmailMessageWithBodyWithResponse(ctx context.Context, params *CreateEmailMessageParams, contentType string, ...) (*CreateEmailMessageResponse, error)
- func (c *ClientWithResponses) CreateEmailMessageWithResponse(ctx context.Context, params *CreateEmailMessageParams, ...) (*CreateEmailMessageResponse, error)
- func (c *ClientWithResponses) CreateEmailTemplateWithBodyWithResponse(ctx context.Context, params *CreateEmailTemplateParams, contentType string, ...) (*CreateEmailTemplateResponse, error)
- func (c *ClientWithResponses) CreateEmailTemplateWithResponse(ctx context.Context, params *CreateEmailTemplateParams, ...) (*CreateEmailTemplateResponse, error)
- func (c *ClientWithResponses) CreateSMSMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, ...) (*CreateSMSMessageBatchResponse, error)
- func (c *ClientWithResponses) CreateSMSMessageBatchWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, ...) (*CreateSMSMessageBatchResponse, error)
- func (c *ClientWithResponses) CreateSMSMessageWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageParams, contentType string, ...) (*CreateSMSMessageResponse, error)
- func (c *ClientWithResponses) CreateSMSMessageWithResponse(ctx context.Context, params *CreateSMSMessageParams, ...) (*CreateSMSMessageResponse, error)
- func (c *ClientWithResponses) DeleteEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, ...) (*DeleteEmailTemplateResponse, error)
- func (c *ClientWithResponses) GetEmailMessageWithResponse(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*GetEmailMessageResponse, error)
- func (c *ClientWithResponses) GetEmailTemplateVersionWithResponse(ctx context.Context, templateId EmailTemplateID, ...) (*GetEmailTemplateVersionResponse, error)
- func (c *ClientWithResponses) GetEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*GetEmailTemplateResponse, error)
- func (c *ClientWithResponses) GetSMSMessageWithResponse(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*GetSMSMessageResponse, error)
- func (c *ClientWithResponses) GetSMSTemplateWithResponse(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*GetSMSTemplateResponse, error)
- func (c *ClientWithResponses) ListEmailMessagesWithResponse(ctx context.Context, params *ListEmailMessagesParams, ...) (*ListEmailMessagesResponse, error)
- func (c *ClientWithResponses) ListEmailTemplateVersionsWithResponse(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*ListEmailTemplateVersionsResponse, error)
- func (c *ClientWithResponses) ListEmailTemplatesWithResponse(ctx context.Context, params *ListEmailTemplatesParams, ...) (*ListEmailTemplatesResponse, error)
- func (c *ClientWithResponses) ListSMSMessagesWithResponse(ctx context.Context, params *ListSMSMessagesParams, ...) (*ListSMSMessagesResponse, error)
- func (c *ClientWithResponses) ListSMSTemplatesWithResponse(ctx context.Context, params *ListSMSTemplatesParams, ...) (*ListSMSTemplatesResponse, error)
- func (c *ClientWithResponses) PublishEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, ...) (*PublishEmailTemplateResponse, error)
- func (c *ClientWithResponses) UpdateEmailTemplateWithBodyWithResponse(ctx context.Context, templateId EmailTemplateID, ...) (*UpdateEmailTemplateResponse, error)
- func (c *ClientWithResponses) UpdateEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, ...) (*UpdateEmailTemplateResponse, error)
- type ClientWithResponsesInterface
- type Conflict
- type CreateEmailMessageBatchJSONRequestBody
- type CreateEmailMessageBatchParams
- type CreateEmailMessageBatchResponse
- type CreateEmailMessageJSONRequestBody
- type CreateEmailMessageParams
- type CreateEmailMessageResponse
- type CreateEmailTemplateJSONRequestBody
- type CreateEmailTemplateParams
- type CreateEmailTemplateResponse
- type CreateSMSMessageBatchJSONRequestBody
- type CreateSMSMessageBatchParams
- type CreateSMSMessageBatchResponse
- type CreateSMSMessageJSONRequestBody
- type CreateSMSMessageParams
- type CreateSMSMessageResponse
- type CreatedAfter
- type CreatedBefore
- type CurrencyCode
- type DeleteEmailTemplateParams
- type DeleteEmailTemplateResponse
- type DocsSearchResponse
- type DocsSearchResult
- type EmailAddress
- type EmailAddressInput
- func (t EmailAddressInput) AsEmailAddress() (EmailAddress, error)
- func (t EmailAddressInput) AsEmailAddressInput0() (EmailAddressInput0, error)
- func (t *EmailAddressInput) FromEmailAddress(v EmailAddress) error
- func (t *EmailAddressInput) FromEmailAddressInput0(v EmailAddressInput0) error
- func (t EmailAddressInput) MarshalJSON() ([]byte, error)
- func (t *EmailAddressInput) MergeEmailAddress(v EmailAddress) error
- func (t *EmailAddressInput) MergeEmailAddressInput0(v EmailAddressInput0) error
- func (t *EmailAddressInput) UnmarshalJSON(b []byte) error
- type EmailAddressInput0
- type EmailAttachment
- type EmailAttachmentID
- type EmailAttachmentRef
- type EmailBounceType
- type EmailEvent
- type EmailEventBounceType
- type EmailEventList
- type EmailEventRejectionReason
- type EmailEventType
- type EmailID
- type EmailMessage
- type EmailMessageBatchItem
- type EmailMessageBatchItemCategory
- type EmailMessageBatchItemStatus
- type EmailMessageBatchRequest
- type EmailMessageBatchResponse
- type EmailMessageCategory
- type EmailMessageContent
- type EmailMessageList
- type EmailMessageSendRequest
- type EmailMessageSendRequestCategory
- type EmailMessageStatus
- type EmailRecipient
- type EmailRecipientBounceType
- type EmailRecipientList
- type EmailRecipientRejectionReason
- type EmailRecipientStatus
- type EmailRejectionReason
- type EmailTemplate
- type EmailTemplateCategory
- type EmailTemplateCreate
- type EmailTemplateID
- type EmailTemplateList
- type EmailTemplateSend
- func (t EmailTemplateSend) AsEmailTemplateSend0() (EmailTemplateSend0, error)
- func (t EmailTemplateSend) AsEmailTemplateSend1() (EmailTemplateSend1, error)
- func (t *EmailTemplateSend) FromEmailTemplateSend0(v EmailTemplateSend0) error
- func (t *EmailTemplateSend) FromEmailTemplateSend1(v EmailTemplateSend1) error
- func (t EmailTemplateSend) MarshalJSON() ([]byte, error)
- func (t *EmailTemplateSend) MergeEmailTemplateSend0(v EmailTemplateSend0) error
- func (t *EmailTemplateSend) MergeEmailTemplateSend1(v EmailTemplateSend1) error
- func (t *EmailTemplateSend) UnmarshalJSON(b []byte) error
- type EmailTemplateSend0
- type EmailTemplateSend1
- type EmailTemplateSource
- type EmailTemplateSummary
- type EmailTemplateUpdate
- type EmailTemplateVersion
- type EmailTemplateVersionID
- type EmailTemplateVersionList
- type EmailTemplateVersionStatus
- type EndingBefore
- type Error
- type ErrorBody
- type ErrorBodyType
- type ErrorDetail
- type ErrorNextAction
- type EventDomainFailed
- type EventDomainFailedType
- type EventDomainVerified
- type EventDomainVerifiedType
- type EventEmailAccepted
- type EventEmailAcceptedData
- type EventEmailAcceptedType
- type EventEmailBase
- type EventEmailBounced
- type EventEmailBouncedData
- type EventEmailBouncedType
- type EventEmailCanceled
- type EventEmailCanceledData
- type EventEmailCanceledType
- type EventEmailClicked
- type EventEmailClickedData
- type EventEmailClickedType
- type EventEmailComplained
- type EventEmailComplainedData
- type EventEmailComplainedType
- type EventEmailDeferred
- type EventEmailDeferredData
- type EventEmailDeferredType
- type EventEmailDelivered
- type EventEmailDeliveredData
- type EventEmailDeliveredType
- type EventEmailListUnsubscribed
- type EventEmailListUnsubscribedData
- type EventEmailListUnsubscribedType
- type EventEmailMessageBase
- type EventEmailOpened
- type EventEmailOpenedData
- type EventEmailOpenedType
- type EventEmailOutOfBandBounce
- type EventEmailOutOfBandBounceData
- type EventEmailOutOfBandBounceType
- type EventEmailProcessed
- type EventEmailProcessedData
- type EventEmailProcessedType
- type EventEmailReceived
- type EventEmailReceivedData
- type EventEmailReceivedType
- type EventEmailRejected
- type EventEmailRejectedData
- type EventEmailRejectedType
- type EventEmailScheduled
- type EventEmailScheduledData
- type EventEmailScheduledType
- type EventEmailSuppressionCreated
- type EventEmailSuppressionCreatedType
- type EventEmailUnsubscribed
- type EventEmailUnsubscribedData
- type EventEmailUnsubscribedType
- type EventSMSAccepted
- type EventSMSAcceptedData
- type EventSMSAcceptedType
- type EventSMSBase
- type EventSMSDelivered
- type EventSMSDeliveredData
- type EventSMSDeliveredType
- type EventSMSExpired
- type EventSMSExpiredData
- type EventSMSExpiredType
- type EventSMSFailed
- type EventSMSFailedData
- type EventSMSFailedType
- type EventSMSRejected
- type EventSMSRejectedData
- type EventSMSRejectedType
- type EventSMSSent
- type EventSMSSentData
- type EventSMSSentType
- type EventSMSUndelivered
- type EventSMSUndeliveredData
- type EventSMSUndeliveredType
- type Forbidden
- type GetEmailMessageResponse
- type GetEmailTemplateResponse
- type GetEmailTemplateVersionResponse
- type GetSMSMessageResponse
- type GetSMSTemplateResponse
- type Gone
- type HttpRequestDoer
- type IdempotencyKey
- type InboundAddress
- type InboundAddressCreate
- type InboundAddressID
- type InboundAddressList
- type InboundAddressUpdate
- type InboundAttachment
- type InboundAttachmentID
- type InboundAttachmentList
- type InboundEmailMessage
- type InboundEmailMessageBody
- type InboundEmailMessageID
- type InboundEmailMessageList
- type IncludeTotal
- type InternalError
- type ListEmailMessagesParams
- type ListEmailMessagesParamsCategory
- type ListEmailMessagesParamsStatus
- type ListEmailMessagesResponse
- type ListEmailTemplateVersionsResponse
- type ListEmailTemplatesParams
- type ListEmailTemplatesResponse
- type ListSMSMessagesParams
- type ListSMSMessagesParamsCategory
- type ListSMSMessagesParamsDirection
- type ListSMSMessagesResponse
- type ListSMSTemplatesParams
- type ListSMSTemplatesParamsCategory
- type ListSMSTemplatesParamsScope
- type ListSMSTemplatesResponse
- type NotFound
- type OrderDesc
- type PaginationLimit
- type PayloadTooLarge
- type PaymentRequired
- type PreconditionFailed
- type PublishEmailTemplateParams
- type PublishEmailTemplateResponse
- type RateLimited
- type RecipientID
- type RecipientRole
- type RequestEditorFn
- type SMSBatchSummary
- type SMSCost
- type SMSCostBreakdown
- type SMSError
- type SMSErrorCode
- type SMSMessage
- type SMSMessageBatchRequest
- type SMSMessageBatchResponse
- type SMSMessageCategory
- type SMSMessageDirection
- type SMSMessageID
- type SMSMessageList
- type SMSMessageSendRequest
- func (t SMSMessageSendRequest) AsSMSMessageSendRequest0() (SMSMessageSendRequest0, error)
- func (t SMSMessageSendRequest) AsSMSMessageSendRequest1() (SMSMessageSendRequest1, error)
- func (t *SMSMessageSendRequest) FromSMSMessageSendRequest0(v SMSMessageSendRequest0) error
- func (t *SMSMessageSendRequest) FromSMSMessageSendRequest1(v SMSMessageSendRequest1) error
- func (t SMSMessageSendRequest) MarshalJSON() ([]byte, error)
- func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest0(v SMSMessageSendRequest0) error
- func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest1(v SMSMessageSendRequest1) error
- func (t *SMSMessageSendRequest) UnmarshalJSON(b []byte) error
- type SMSMessageSendRequest0
- type SMSMessageSendRequest1
- type SMSMessageStatus
- type SMSSegments
- type SMSSegmentsEncoding
- type SMSTemplate
- type SMSTemplateID
- type SMSTemplateList
- type SMSTemplateSend
- func (t SMSTemplateSend) AsSMSTemplateSend0() (SMSTemplateSend0, error)
- func (t SMSTemplateSend) AsSMSTemplateSend1() (SMSTemplateSend1, error)
- func (t *SMSTemplateSend) FromSMSTemplateSend0(v SMSTemplateSend0) error
- func (t *SMSTemplateSend) FromSMSTemplateSend1(v SMSTemplateSend1) error
- func (t SMSTemplateSend) MarshalJSON() ([]byte, error)
- func (t *SMSTemplateSend) MergeSMSTemplateSend0(v SMSTemplateSend0) error
- func (t *SMSTemplateSend) MergeSMSTemplateSend1(v SMSTemplateSend1) error
- func (t *SMSTemplateSend) UnmarshalJSON(b []byte) error
- type SMSTemplateSend0
- type SMSTemplateSend1
- type SMSTemplateStatus
- type SMSTemplateVersionID
- type ServiceUnavailable
- type StartingAfter
- type Suppression
- type SuppressionAppliesTo
- type SuppressionCreate
- type SuppressionID
- type SuppressionList
- type SuppressionOrigin
- type SuppressionReason
- type SuppressionScope
- type SuppressionScopeType
- type Tag
- type TemplateScope
- type TemplateVariable
- type Timestamps
- type TooEarly
- type Unauthorized
- type UnderscoreListEnvelope
- type UnderscoreListEnvelopeWithTotal
- type Unprocessable
- type UpdateEmailTemplateJSONRequestBody
- type UpdateEmailTemplateParams
- type UpdateEmailTemplateResponse
- type Verification
- type VerificationChannel
- type VerificationChannelEntry
- type VerificationCheckRequest
- type VerificationCheckResult
- type VerificationCreateRequest
- type VerificationID
- type VerificationOptions
- type VerificationStatus
- type VerificationTo
- type WebhookAttempt
- type WebhookAttemptList
- type WebhookAttemptStatus
- type WebhookEndpoint
- type WebhookEndpointCreate
- type WebhookEndpointCreated
- type WebhookEndpointCreatedStatus
- type WebhookEndpointID
- type WebhookEndpointList
- type WebhookEndpointStatus
- type WebhookEndpointUpdate
- type WebhookEndpointUpdateStatus
- type WebhookEvent
- func (t WebhookEvent) AsEventDomainFailed() (EventDomainFailed, error)
- func (t WebhookEvent) AsEventDomainVerified() (EventDomainVerified, error)
- func (t WebhookEvent) AsEventEmailAccepted() (EventEmailAccepted, error)
- func (t WebhookEvent) AsEventEmailBounced() (EventEmailBounced, error)
- func (t WebhookEvent) AsEventEmailCanceled() (EventEmailCanceled, error)
- func (t WebhookEvent) AsEventEmailClicked() (EventEmailClicked, error)
- func (t WebhookEvent) AsEventEmailComplained() (EventEmailComplained, error)
- func (t WebhookEvent) AsEventEmailDeferred() (EventEmailDeferred, error)
- func (t WebhookEvent) AsEventEmailDelivered() (EventEmailDelivered, error)
- func (t WebhookEvent) AsEventEmailListUnsubscribed() (EventEmailListUnsubscribed, error)
- func (t WebhookEvent) AsEventEmailOpened() (EventEmailOpened, error)
- func (t WebhookEvent) AsEventEmailOutOfBandBounce() (EventEmailOutOfBandBounce, error)
- func (t WebhookEvent) AsEventEmailProcessed() (EventEmailProcessed, error)
- func (t WebhookEvent) AsEventEmailReceived() (EventEmailReceived, error)
- func (t WebhookEvent) AsEventEmailRejected() (EventEmailRejected, error)
- func (t WebhookEvent) AsEventEmailScheduled() (EventEmailScheduled, error)
- func (t WebhookEvent) AsEventEmailSuppressionCreated() (EventEmailSuppressionCreated, error)
- func (t WebhookEvent) AsEventEmailUnsubscribed() (EventEmailUnsubscribed, error)
- func (t WebhookEvent) AsEventSMSAccepted() (EventSMSAccepted, error)
- func (t WebhookEvent) AsEventSMSDelivered() (EventSMSDelivered, error)
- func (t WebhookEvent) AsEventSMSExpired() (EventSMSExpired, error)
- func (t WebhookEvent) AsEventSMSFailed() (EventSMSFailed, error)
- func (t WebhookEvent) AsEventSMSRejected() (EventSMSRejected, error)
- func (t WebhookEvent) AsEventSMSSent() (EventSMSSent, error)
- func (t WebhookEvent) AsEventSMSUndelivered() (EventSMSUndelivered, error)
- func (t WebhookEvent) Discriminator() (string, error)
- func (t *WebhookEvent) FromEventDomainFailed(v EventDomainFailed) error
- func (t *WebhookEvent) FromEventDomainVerified(v EventDomainVerified) error
- func (t *WebhookEvent) FromEventEmailAccepted(v EventEmailAccepted) error
- func (t *WebhookEvent) FromEventEmailBounced(v EventEmailBounced) error
- func (t *WebhookEvent) FromEventEmailCanceled(v EventEmailCanceled) error
- func (t *WebhookEvent) FromEventEmailClicked(v EventEmailClicked) error
- func (t *WebhookEvent) FromEventEmailComplained(v EventEmailComplained) error
- func (t *WebhookEvent) FromEventEmailDeferred(v EventEmailDeferred) error
- func (t *WebhookEvent) FromEventEmailDelivered(v EventEmailDelivered) error
- func (t *WebhookEvent) FromEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
- func (t *WebhookEvent) FromEventEmailOpened(v EventEmailOpened) error
- func (t *WebhookEvent) FromEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
- func (t *WebhookEvent) FromEventEmailProcessed(v EventEmailProcessed) error
- func (t *WebhookEvent) FromEventEmailReceived(v EventEmailReceived) error
- func (t *WebhookEvent) FromEventEmailRejected(v EventEmailRejected) error
- func (t *WebhookEvent) FromEventEmailScheduled(v EventEmailScheduled) error
- func (t *WebhookEvent) FromEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
- func (t *WebhookEvent) FromEventEmailUnsubscribed(v EventEmailUnsubscribed) error
- func (t *WebhookEvent) FromEventSMSAccepted(v EventSMSAccepted) error
- func (t *WebhookEvent) FromEventSMSDelivered(v EventSMSDelivered) error
- func (t *WebhookEvent) FromEventSMSExpired(v EventSMSExpired) error
- func (t *WebhookEvent) FromEventSMSFailed(v EventSMSFailed) error
- func (t *WebhookEvent) FromEventSMSRejected(v EventSMSRejected) error
- func (t *WebhookEvent) FromEventSMSSent(v EventSMSSent) error
- func (t *WebhookEvent) FromEventSMSUndelivered(v EventSMSUndelivered) error
- func (t WebhookEvent) MarshalJSON() ([]byte, error)
- func (t *WebhookEvent) MergeEventDomainFailed(v EventDomainFailed) error
- func (t *WebhookEvent) MergeEventDomainVerified(v EventDomainVerified) error
- func (t *WebhookEvent) MergeEventEmailAccepted(v EventEmailAccepted) error
- func (t *WebhookEvent) MergeEventEmailBounced(v EventEmailBounced) error
- func (t *WebhookEvent) MergeEventEmailCanceled(v EventEmailCanceled) error
- func (t *WebhookEvent) MergeEventEmailClicked(v EventEmailClicked) error
- func (t *WebhookEvent) MergeEventEmailComplained(v EventEmailComplained) error
- func (t *WebhookEvent) MergeEventEmailDeferred(v EventEmailDeferred) error
- func (t *WebhookEvent) MergeEventEmailDelivered(v EventEmailDelivered) error
- func (t *WebhookEvent) MergeEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
- func (t *WebhookEvent) MergeEventEmailOpened(v EventEmailOpened) error
- func (t *WebhookEvent) MergeEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
- func (t *WebhookEvent) MergeEventEmailProcessed(v EventEmailProcessed) error
- func (t *WebhookEvent) MergeEventEmailReceived(v EventEmailReceived) error
- func (t *WebhookEvent) MergeEventEmailRejected(v EventEmailRejected) error
- func (t *WebhookEvent) MergeEventEmailScheduled(v EventEmailScheduled) error
- func (t *WebhookEvent) MergeEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
- func (t *WebhookEvent) MergeEventEmailUnsubscribed(v EventEmailUnsubscribed) error
- func (t *WebhookEvent) MergeEventSMSAccepted(v EventSMSAccepted) error
- func (t *WebhookEvent) MergeEventSMSDelivered(v EventSMSDelivered) error
- func (t *WebhookEvent) MergeEventSMSExpired(v EventSMSExpired) error
- func (t *WebhookEvent) MergeEventSMSFailed(v EventSMSFailed) error
- func (t *WebhookEvent) MergeEventSMSRejected(v EventSMSRejected) error
- func (t *WebhookEvent) MergeEventSMSSent(v EventSMSSent) error
- func (t *WebhookEvent) MergeEventSMSUndelivered(v EventSMSUndelivered) error
- func (t *WebhookEvent) UnmarshalJSON(b []byte) error
- func (t WebhookEvent) ValueByDiscriminator() (interface{}, error)
- type WebhookEventID
- type WebhookEventType
- type WebhookReplayRequest
- type WebhookRotateSecretResponse
- type WebhookTestRequest
- type WebhookTestResponse
- type WebhookTestResponseStatus
- type WorkspaceID
- type XWorkspaceId
Constants ¶
const ( BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes" CookieAuthScopes cookieAuthContextKey = "CookieAuth.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func NewCreateEmailMessageBatchRequest ¶ added in v0.2.0
func NewCreateEmailMessageBatchRequest(server string, params *CreateEmailMessageBatchParams, body CreateEmailMessageBatchJSONRequestBody) (*http.Request, error)
NewCreateEmailMessageBatchRequest calls the generic CreateEmailMessageBatch builder with application/json body
func NewCreateEmailMessageBatchRequestWithBody ¶ added in v0.2.0
func NewCreateEmailMessageBatchRequestWithBody(server string, params *CreateEmailMessageBatchParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateEmailMessageBatchRequestWithBody generates requests for CreateEmailMessageBatch with any type of body
func NewCreateEmailMessageRequest ¶
func NewCreateEmailMessageRequest(server string, params *CreateEmailMessageParams, body CreateEmailMessageJSONRequestBody) (*http.Request, error)
NewCreateEmailMessageRequest calls the generic CreateEmailMessage builder with application/json body
func NewCreateEmailMessageRequestWithBody ¶
func NewCreateEmailMessageRequestWithBody(server string, params *CreateEmailMessageParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateEmailMessageRequestWithBody generates requests for CreateEmailMessage with any type of body
func NewCreateEmailTemplateRequest ¶ added in v0.3.0
func NewCreateEmailTemplateRequest(server string, params *CreateEmailTemplateParams, body CreateEmailTemplateJSONRequestBody) (*http.Request, error)
NewCreateEmailTemplateRequest calls the generic CreateEmailTemplate builder with application/json body
func NewCreateEmailTemplateRequestWithBody ¶ added in v0.3.0
func NewCreateEmailTemplateRequestWithBody(server string, params *CreateEmailTemplateParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateEmailTemplateRequestWithBody generates requests for CreateEmailTemplate with any type of body
func NewCreateSMSMessageBatchRequest ¶ added in v0.3.0
func NewCreateSMSMessageBatchRequest(server string, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody) (*http.Request, error)
NewCreateSMSMessageBatchRequest calls the generic CreateSMSMessageBatch builder with application/json body
func NewCreateSMSMessageBatchRequestWithBody ¶ added in v0.3.0
func NewCreateSMSMessageBatchRequestWithBody(server string, params *CreateSMSMessageBatchParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateSMSMessageBatchRequestWithBody generates requests for CreateSMSMessageBatch with any type of body
func NewCreateSMSMessageRequest ¶ added in v0.3.0
func NewCreateSMSMessageRequest(server string, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody) (*http.Request, error)
NewCreateSMSMessageRequest calls the generic CreateSMSMessage builder with application/json body
func NewCreateSMSMessageRequestWithBody ¶ added in v0.3.0
func NewCreateSMSMessageRequestWithBody(server string, params *CreateSMSMessageParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateSMSMessageRequestWithBody generates requests for CreateSMSMessage with any type of body
func NewDeleteEmailTemplateRequest ¶ added in v0.3.0
func NewDeleteEmailTemplateRequest(server string, templateId EmailTemplateID, params *DeleteEmailTemplateParams) (*http.Request, error)
NewDeleteEmailTemplateRequest generates requests for DeleteEmailTemplate
func NewGetEmailMessageRequest ¶
NewGetEmailMessageRequest generates requests for GetEmailMessage
func NewGetEmailTemplateRequest ¶ added in v0.3.0
func NewGetEmailTemplateRequest(server string, templateId EmailTemplateID) (*http.Request, error)
NewGetEmailTemplateRequest generates requests for GetEmailTemplate
func NewGetEmailTemplateVersionRequest ¶ added in v0.3.0
func NewGetEmailTemplateVersionRequest(server string, templateId EmailTemplateID, versionId EmailTemplateVersionID) (*http.Request, error)
NewGetEmailTemplateVersionRequest generates requests for GetEmailTemplateVersion
func NewGetSMSMessageRequest ¶ added in v0.3.0
func NewGetSMSMessageRequest(server string, messageId SMSMessageID) (*http.Request, error)
NewGetSMSMessageRequest generates requests for GetSMSMessage
func NewGetSMSTemplateRequest ¶ added in v0.3.0
NewGetSMSTemplateRequest generates requests for GetSMSTemplate
func NewListEmailMessagesRequest ¶
func NewListEmailMessagesRequest(server string, params *ListEmailMessagesParams) (*http.Request, error)
NewListEmailMessagesRequest generates requests for ListEmailMessages
func NewListEmailTemplateVersionsRequest ¶ added in v0.3.0
func NewListEmailTemplateVersionsRequest(server string, templateId EmailTemplateID) (*http.Request, error)
NewListEmailTemplateVersionsRequest generates requests for ListEmailTemplateVersions
func NewListEmailTemplatesRequest ¶ added in v0.3.0
func NewListEmailTemplatesRequest(server string, params *ListEmailTemplatesParams) (*http.Request, error)
NewListEmailTemplatesRequest generates requests for ListEmailTemplates
func NewListSMSMessagesRequest ¶ added in v0.3.0
func NewListSMSMessagesRequest(server string, params *ListSMSMessagesParams) (*http.Request, error)
NewListSMSMessagesRequest generates requests for ListSMSMessages
func NewListSMSTemplatesRequest ¶ added in v0.3.0
func NewListSMSTemplatesRequest(server string, params *ListSMSTemplatesParams) (*http.Request, error)
NewListSMSTemplatesRequest generates requests for ListSMSTemplates
func NewPublishEmailTemplateRequest ¶ added in v0.3.0
func NewPublishEmailTemplateRequest(server string, templateId EmailTemplateID, params *PublishEmailTemplateParams) (*http.Request, error)
NewPublishEmailTemplateRequest generates requests for PublishEmailTemplate
func NewUpdateEmailTemplateRequest ¶ added in v0.3.0
func NewUpdateEmailTemplateRequest(server string, templateId EmailTemplateID, params *UpdateEmailTemplateParams, body UpdateEmailTemplateJSONRequestBody) (*http.Request, error)
NewUpdateEmailTemplateRequest calls the generic UpdateEmailTemplate builder with application/json body
func NewUpdateEmailTemplateRequestWithBody ¶ added in v0.3.0
func NewUpdateEmailTemplateRequestWithBody(server string, templateId EmailTemplateID, params *UpdateEmailTemplateParams, contentType string, body io.Reader) (*http.Request, error)
NewUpdateEmailTemplateRequestWithBody generates requests for UpdateEmailTemplate with any type of body
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateEmailMessage ¶
func (c *Client) CreateEmailMessage(ctx context.Context, params *CreateEmailMessageParams, body CreateEmailMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateEmailMessageBatch ¶ added in v0.2.0
func (c *Client) CreateEmailMessageBatch(ctx context.Context, params *CreateEmailMessageBatchParams, body CreateEmailMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateEmailMessageBatchWithBody ¶ added in v0.2.0
func (*Client) CreateEmailMessageWithBody ¶
func (*Client) CreateEmailTemplate ¶ added in v0.3.0
func (c *Client) CreateEmailTemplate(ctx context.Context, params *CreateEmailTemplateParams, body CreateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateEmailTemplateWithBody ¶ added in v0.3.0
func (*Client) CreateSMSMessage ¶ added in v0.3.0
func (c *Client) CreateSMSMessage(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateSMSMessageBatch ¶ added in v0.3.0
func (c *Client) CreateSMSMessageBatch(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateSMSMessageBatchWithBody ¶ added in v0.3.0
func (*Client) CreateSMSMessageWithBody ¶ added in v0.3.0
func (*Client) DeleteEmailTemplate ¶ added in v0.3.0
func (c *Client) DeleteEmailTemplate(ctx context.Context, templateId EmailTemplateID, params *DeleteEmailTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetEmailMessage ¶
func (*Client) GetEmailTemplate ¶ added in v0.3.0
func (c *Client) GetEmailTemplate(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetEmailTemplateVersion ¶ added in v0.3.0
func (c *Client) GetEmailTemplateVersion(ctx context.Context, templateId EmailTemplateID, versionId EmailTemplateVersionID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSMSMessage ¶ added in v0.3.0
func (c *Client) GetSMSMessage(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSMSTemplate ¶ added in v0.3.0
func (*Client) ListEmailMessages ¶
func (c *Client) ListEmailMessages(ctx context.Context, params *ListEmailMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListEmailTemplateVersions ¶ added in v0.3.0
func (c *Client) ListEmailTemplateVersions(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListEmailTemplates ¶ added in v0.3.0
func (c *Client) ListEmailTemplates(ctx context.Context, params *ListEmailTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListSMSMessages ¶ added in v0.3.0
func (c *Client) ListSMSMessages(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListSMSTemplates ¶ added in v0.3.0
func (c *Client) ListSMSTemplates(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PublishEmailTemplate ¶ added in v0.3.0
func (c *Client) PublishEmailTemplate(ctx context.Context, templateId EmailTemplateID, params *PublishEmailTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateEmailTemplate ¶ added in v0.3.0
func (c *Client) UpdateEmailTemplate(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, body UpdateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateEmailTemplateWithBody ¶ added in v0.3.0
func (c *Client) UpdateEmailTemplateWithBody(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// CreateEmailMessageBatchWithBody request with any body
CreateEmailMessageBatchWithBody(ctx context.Context, params *CreateEmailMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateEmailMessageBatch(ctx context.Context, params *CreateEmailMessageBatchParams, body CreateEmailMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListEmailMessages request
ListEmailMessages(ctx context.Context, params *ListEmailMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateEmailMessageWithBody request with any body
CreateEmailMessageWithBody(ctx context.Context, params *CreateEmailMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateEmailMessage(ctx context.Context, params *CreateEmailMessageParams, body CreateEmailMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEmailMessage request
GetEmailMessage(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListEmailTemplates request
ListEmailTemplates(ctx context.Context, params *ListEmailTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateEmailTemplateWithBody request with any body
CreateEmailTemplateWithBody(ctx context.Context, params *CreateEmailTemplateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateEmailTemplate(ctx context.Context, params *CreateEmailTemplateParams, body CreateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteEmailTemplate request
DeleteEmailTemplate(ctx context.Context, templateId EmailTemplateID, params *DeleteEmailTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEmailTemplate request
GetEmailTemplate(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateEmailTemplateWithBody request with any body
UpdateEmailTemplateWithBody(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateEmailTemplate(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, body UpdateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PublishEmailTemplate request
PublishEmailTemplate(ctx context.Context, templateId EmailTemplateID, params *PublishEmailTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListEmailTemplateVersions request
ListEmailTemplateVersions(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEmailTemplateVersion request
GetEmailTemplateVersion(ctx context.Context, templateId EmailTemplateID, versionId EmailTemplateVersionID, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateSMSMessageBatchWithBody request with any body
CreateSMSMessageBatchWithBody(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateSMSMessageBatch(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListSMSMessages request
ListSMSMessages(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateSMSMessageWithBody request with any body
CreateSMSMessageWithBody(ctx context.Context, params *CreateSMSMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateSMSMessage(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSMSMessage request
GetSMSMessage(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListSMSTemplates request
ListSMSTemplates(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSMSTemplate request
GetSMSTemplate(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateEmailMessageBatchWithBodyWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateEmailMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateEmailMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEmailMessageBatchResponse, error)
CreateEmailMessageBatchWithBodyWithResponse request with arbitrary body returning *CreateEmailMessageBatchResponse
func (*ClientWithResponses) CreateEmailMessageBatchWithResponse ¶ added in v0.2.0
func (c *ClientWithResponses) CreateEmailMessageBatchWithResponse(ctx context.Context, params *CreateEmailMessageBatchParams, body CreateEmailMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEmailMessageBatchResponse, error)
func (*ClientWithResponses) CreateEmailMessageWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateEmailMessageWithBodyWithResponse(ctx context.Context, params *CreateEmailMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEmailMessageResponse, error)
CreateEmailMessageWithBodyWithResponse request with arbitrary body returning *CreateEmailMessageResponse
func (*ClientWithResponses) CreateEmailMessageWithResponse ¶
func (c *ClientWithResponses) CreateEmailMessageWithResponse(ctx context.Context, params *CreateEmailMessageParams, body CreateEmailMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEmailMessageResponse, error)
func (*ClientWithResponses) CreateEmailTemplateWithBodyWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateEmailTemplateWithBodyWithResponse(ctx context.Context, params *CreateEmailTemplateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEmailTemplateResponse, error)
CreateEmailTemplateWithBodyWithResponse request with arbitrary body returning *CreateEmailTemplateResponse
func (*ClientWithResponses) CreateEmailTemplateWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateEmailTemplateWithResponse(ctx context.Context, params *CreateEmailTemplateParams, body CreateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEmailTemplateResponse, error)
func (*ClientWithResponses) CreateSMSMessageBatchWithBodyWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
CreateSMSMessageBatchWithBodyWithResponse request with arbitrary body returning *CreateSMSMessageBatchResponse
func (*ClientWithResponses) CreateSMSMessageBatchWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageBatchWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
func (*ClientWithResponses) CreateSMSMessageWithBodyWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
CreateSMSMessageWithBodyWithResponse request with arbitrary body returning *CreateSMSMessageResponse
func (*ClientWithResponses) CreateSMSMessageWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageWithResponse(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
func (*ClientWithResponses) DeleteEmailTemplateWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) DeleteEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, params *DeleteEmailTemplateParams, reqEditors ...RequestEditorFn) (*DeleteEmailTemplateResponse, error)
DeleteEmailTemplateWithResponse request returning *DeleteEmailTemplateResponse
func (*ClientWithResponses) GetEmailMessageWithResponse ¶
func (c *ClientWithResponses) GetEmailMessageWithResponse(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*GetEmailMessageResponse, error)
GetEmailMessageWithResponse request returning *GetEmailMessageResponse
func (*ClientWithResponses) GetEmailTemplateVersionWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetEmailTemplateVersionWithResponse(ctx context.Context, templateId EmailTemplateID, versionId EmailTemplateVersionID, reqEditors ...RequestEditorFn) (*GetEmailTemplateVersionResponse, error)
GetEmailTemplateVersionWithResponse request returning *GetEmailTemplateVersionResponse
func (*ClientWithResponses) GetEmailTemplateWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*GetEmailTemplateResponse, error)
GetEmailTemplateWithResponse request returning *GetEmailTemplateResponse
func (*ClientWithResponses) GetSMSMessageWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetSMSMessageWithResponse(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*GetSMSMessageResponse, error)
GetSMSMessageWithResponse request returning *GetSMSMessageResponse
func (*ClientWithResponses) GetSMSTemplateWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetSMSTemplateWithResponse(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*GetSMSTemplateResponse, error)
GetSMSTemplateWithResponse request returning *GetSMSTemplateResponse
func (*ClientWithResponses) ListEmailMessagesWithResponse ¶
func (c *ClientWithResponses) ListEmailMessagesWithResponse(ctx context.Context, params *ListEmailMessagesParams, reqEditors ...RequestEditorFn) (*ListEmailMessagesResponse, error)
ListEmailMessagesWithResponse request returning *ListEmailMessagesResponse
func (*ClientWithResponses) ListEmailTemplateVersionsWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) ListEmailTemplateVersionsWithResponse(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*ListEmailTemplateVersionsResponse, error)
ListEmailTemplateVersionsWithResponse request returning *ListEmailTemplateVersionsResponse
func (*ClientWithResponses) ListEmailTemplatesWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) ListEmailTemplatesWithResponse(ctx context.Context, params *ListEmailTemplatesParams, reqEditors ...RequestEditorFn) (*ListEmailTemplatesResponse, error)
ListEmailTemplatesWithResponse request returning *ListEmailTemplatesResponse
func (*ClientWithResponses) ListSMSMessagesWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) ListSMSMessagesWithResponse(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*ListSMSMessagesResponse, error)
ListSMSMessagesWithResponse request returning *ListSMSMessagesResponse
func (*ClientWithResponses) ListSMSTemplatesWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) ListSMSTemplatesWithResponse(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*ListSMSTemplatesResponse, error)
ListSMSTemplatesWithResponse request returning *ListSMSTemplatesResponse
func (*ClientWithResponses) PublishEmailTemplateWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) PublishEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, params *PublishEmailTemplateParams, reqEditors ...RequestEditorFn) (*PublishEmailTemplateResponse, error)
PublishEmailTemplateWithResponse request returning *PublishEmailTemplateResponse
func (*ClientWithResponses) UpdateEmailTemplateWithBodyWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) UpdateEmailTemplateWithBodyWithResponse(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateEmailTemplateResponse, error)
UpdateEmailTemplateWithBodyWithResponse request with arbitrary body returning *UpdateEmailTemplateResponse
func (*ClientWithResponses) UpdateEmailTemplateWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) UpdateEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, body UpdateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateEmailTemplateResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// CreateEmailMessageBatchWithBodyWithResponse request with any body
CreateEmailMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateEmailMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEmailMessageBatchResponse, error)
CreateEmailMessageBatchWithResponse(ctx context.Context, params *CreateEmailMessageBatchParams, body CreateEmailMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEmailMessageBatchResponse, error)
// ListEmailMessagesWithResponse request
ListEmailMessagesWithResponse(ctx context.Context, params *ListEmailMessagesParams, reqEditors ...RequestEditorFn) (*ListEmailMessagesResponse, error)
// CreateEmailMessageWithBodyWithResponse request with any body
CreateEmailMessageWithBodyWithResponse(ctx context.Context, params *CreateEmailMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEmailMessageResponse, error)
CreateEmailMessageWithResponse(ctx context.Context, params *CreateEmailMessageParams, body CreateEmailMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEmailMessageResponse, error)
// GetEmailMessageWithResponse request
GetEmailMessageWithResponse(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*GetEmailMessageResponse, error)
// ListEmailTemplatesWithResponse request
ListEmailTemplatesWithResponse(ctx context.Context, params *ListEmailTemplatesParams, reqEditors ...RequestEditorFn) (*ListEmailTemplatesResponse, error)
// CreateEmailTemplateWithBodyWithResponse request with any body
CreateEmailTemplateWithBodyWithResponse(ctx context.Context, params *CreateEmailTemplateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEmailTemplateResponse, error)
CreateEmailTemplateWithResponse(ctx context.Context, params *CreateEmailTemplateParams, body CreateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEmailTemplateResponse, error)
// DeleteEmailTemplateWithResponse request
DeleteEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, params *DeleteEmailTemplateParams, reqEditors ...RequestEditorFn) (*DeleteEmailTemplateResponse, error)
// GetEmailTemplateWithResponse request
GetEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*GetEmailTemplateResponse, error)
// UpdateEmailTemplateWithBodyWithResponse request with any body
UpdateEmailTemplateWithBodyWithResponse(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateEmailTemplateResponse, error)
UpdateEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, params *UpdateEmailTemplateParams, body UpdateEmailTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateEmailTemplateResponse, error)
// PublishEmailTemplateWithResponse request
PublishEmailTemplateWithResponse(ctx context.Context, templateId EmailTemplateID, params *PublishEmailTemplateParams, reqEditors ...RequestEditorFn) (*PublishEmailTemplateResponse, error)
// ListEmailTemplateVersionsWithResponse request
ListEmailTemplateVersionsWithResponse(ctx context.Context, templateId EmailTemplateID, reqEditors ...RequestEditorFn) (*ListEmailTemplateVersionsResponse, error)
// GetEmailTemplateVersionWithResponse request
GetEmailTemplateVersionWithResponse(ctx context.Context, templateId EmailTemplateID, versionId EmailTemplateVersionID, reqEditors ...RequestEditorFn) (*GetEmailTemplateVersionResponse, error)
// CreateSMSMessageBatchWithBodyWithResponse request with any body
CreateSMSMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
CreateSMSMessageBatchWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
// ListSMSMessagesWithResponse request
ListSMSMessagesWithResponse(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*ListSMSMessagesResponse, error)
// CreateSMSMessageWithBodyWithResponse request with any body
CreateSMSMessageWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
CreateSMSMessageWithResponse(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
// GetSMSMessageWithResponse request
GetSMSMessageWithResponse(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*GetSMSMessageResponse, error)
// ListSMSTemplatesWithResponse request
ListSMSTemplatesWithResponse(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*ListSMSTemplatesResponse, error)
// GetSMSTemplateWithResponse request
GetSMSTemplateWithResponse(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*GetSMSTemplateResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateEmailMessageBatchJSONRequestBody ¶ added in v0.2.0
type CreateEmailMessageBatchJSONRequestBody = EmailMessageBatchRequest
CreateEmailMessageBatchJSONRequestBody defines body for CreateEmailMessageBatch for application/json ContentType.
type CreateEmailMessageBatchParams ¶ added in v0.2.0
type CreateEmailMessageBatchParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateEmailMessageBatchParams defines parameters for CreateEmailMessageBatch.
type CreateEmailMessageBatchResponse ¶ added in v0.2.0
type CreateEmailMessageBatchResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *EmailMessageBatchResponse
JSON400 *BadRequest
JSON401 *Unauthorized
JSON402 *PaymentRequired
JSON403 *Forbidden
JSON413 *PayloadTooLarge
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateEmailMessageBatchResponse ¶ added in v0.2.0
func ParseCreateEmailMessageBatchResponse(rsp *http.Response) (*CreateEmailMessageBatchResponse, error)
ParseCreateEmailMessageBatchResponse parses an HTTP response from a CreateEmailMessageBatchWithResponse call
func (CreateEmailMessageBatchResponse) ContentType ¶ added in v0.2.0
func (r CreateEmailMessageBatchResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateEmailMessageBatchResponse) Status ¶ added in v0.2.0
func (r CreateEmailMessageBatchResponse) Status() string
Status returns HTTPResponse.Status
func (CreateEmailMessageBatchResponse) StatusCode ¶ added in v0.2.0
func (r CreateEmailMessageBatchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateEmailMessageJSONRequestBody ¶
type CreateEmailMessageJSONRequestBody = EmailMessageSendRequest
CreateEmailMessageJSONRequestBody defines body for CreateEmailMessage for application/json ContentType.
type CreateEmailMessageParams ¶
type CreateEmailMessageParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateEmailMessageParams defines parameters for CreateEmailMessage.
type CreateEmailMessageResponse ¶
type CreateEmailMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *EmailMessage
JSON400 *BadRequest
JSON401 *Unauthorized
JSON402 *PaymentRequired
JSON403 *Forbidden
JSON413 *PayloadTooLarge
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateEmailMessageResponse ¶
func ParseCreateEmailMessageResponse(rsp *http.Response) (*CreateEmailMessageResponse, error)
ParseCreateEmailMessageResponse parses an HTTP response from a CreateEmailMessageWithResponse call
func (CreateEmailMessageResponse) ContentType ¶
func (r CreateEmailMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateEmailMessageResponse) Status ¶
func (r CreateEmailMessageResponse) Status() string
Status returns HTTPResponse.Status
func (CreateEmailMessageResponse) StatusCode ¶
func (r CreateEmailMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateEmailTemplateJSONRequestBody ¶ added in v0.3.0
type CreateEmailTemplateJSONRequestBody = EmailTemplateCreate
CreateEmailTemplateJSONRequestBody defines body for CreateEmailTemplate for application/json ContentType.
type CreateEmailTemplateParams ¶ added in v0.3.0
type CreateEmailTemplateParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateEmailTemplateParams defines parameters for CreateEmailTemplate.
type CreateEmailTemplateResponse ¶ added in v0.3.0
type CreateEmailTemplateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *EmailTemplate
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON409 *Conflict
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateEmailTemplateResponse ¶ added in v0.3.0
func ParseCreateEmailTemplateResponse(rsp *http.Response) (*CreateEmailTemplateResponse, error)
ParseCreateEmailTemplateResponse parses an HTTP response from a CreateEmailTemplateWithResponse call
func (CreateEmailTemplateResponse) ContentType ¶ added in v0.3.0
func (r CreateEmailTemplateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateEmailTemplateResponse) Status ¶ added in v0.3.0
func (r CreateEmailTemplateResponse) Status() string
Status returns HTTPResponse.Status
func (CreateEmailTemplateResponse) StatusCode ¶ added in v0.3.0
func (r CreateEmailTemplateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateSMSMessageBatchJSONRequestBody ¶ added in v0.3.0
type CreateSMSMessageBatchJSONRequestBody = SMSMessageBatchRequest
CreateSMSMessageBatchJSONRequestBody defines body for CreateSMSMessageBatch for application/json ContentType.
type CreateSMSMessageBatchParams ¶ added in v0.3.0
type CreateSMSMessageBatchParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateSMSMessageBatchParams defines parameters for CreateSMSMessageBatch.
type CreateSMSMessageBatchResponse ¶ added in v0.3.0
type CreateSMSMessageBatchResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *SMSMessageBatchResponse
JSON400 *BadRequest
JSON401 *Unauthorized
JSON402 *PaymentRequired
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateSMSMessageBatchResponse ¶ added in v0.3.0
func ParseCreateSMSMessageBatchResponse(rsp *http.Response) (*CreateSMSMessageBatchResponse, error)
ParseCreateSMSMessageBatchResponse parses an HTTP response from a CreateSMSMessageBatchWithResponse call
func (CreateSMSMessageBatchResponse) ContentType ¶ added in v0.3.0
func (r CreateSMSMessageBatchResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateSMSMessageBatchResponse) Status ¶ added in v0.3.0
func (r CreateSMSMessageBatchResponse) Status() string
Status returns HTTPResponse.Status
func (CreateSMSMessageBatchResponse) StatusCode ¶ added in v0.3.0
func (r CreateSMSMessageBatchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateSMSMessageJSONRequestBody ¶ added in v0.3.0
type CreateSMSMessageJSONRequestBody = SMSMessageSendRequest
CreateSMSMessageJSONRequestBody defines body for CreateSMSMessage for application/json ContentType.
type CreateSMSMessageParams ¶ added in v0.3.0
type CreateSMSMessageParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateSMSMessageParams defines parameters for CreateSMSMessage.
type CreateSMSMessageResponse ¶ added in v0.3.0
type CreateSMSMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *SMSMessage
JSON400 *BadRequest
JSON401 *Unauthorized
JSON402 *PaymentRequired
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateSMSMessageResponse ¶ added in v0.3.0
func ParseCreateSMSMessageResponse(rsp *http.Response) (*CreateSMSMessageResponse, error)
ParseCreateSMSMessageResponse parses an HTTP response from a CreateSMSMessageWithResponse call
func (CreateSMSMessageResponse) ContentType ¶ added in v0.3.0
func (r CreateSMSMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateSMSMessageResponse) Status ¶ added in v0.3.0
func (r CreateSMSMessageResponse) Status() string
Status returns HTTPResponse.Status
func (CreateSMSMessageResponse) StatusCode ¶ added in v0.3.0
func (r CreateSMSMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CurrencyCode ¶ added in v0.3.0
type CurrencyCode = string
CurrencyCode ISO 4217 three-letter currency code.
type DeleteEmailTemplateParams ¶ added in v0.3.0
type DeleteEmailTemplateParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
DeleteEmailTemplateParams defines parameters for DeleteEmailTemplate.
type DeleteEmailTemplateResponse ¶ added in v0.3.0
type DeleteEmailTemplateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseDeleteEmailTemplateResponse ¶ added in v0.3.0
func ParseDeleteEmailTemplateResponse(rsp *http.Response) (*DeleteEmailTemplateResponse, error)
ParseDeleteEmailTemplateResponse parses an HTTP response from a DeleteEmailTemplateWithResponse call
func (DeleteEmailTemplateResponse) ContentType ¶ added in v0.3.0
func (r DeleteEmailTemplateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteEmailTemplateResponse) Status ¶ added in v0.3.0
func (r DeleteEmailTemplateResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteEmailTemplateResponse) StatusCode ¶ added in v0.3.0
func (r DeleteEmailTemplateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DocsSearchResponse ¶ added in v0.2.1
type DocsSearchResponse struct {
// Locale The documentation locale the results were drawn from.
Locale *string `json:"locale,omitempty"`
// Query The search query that produced these results.
Query *string `json:"query,omitempty"`
// Results Matching documentation sections, ordered by descending relevance.
Results *[]DocsSearchResult `json:"results,omitempty"`
}
DocsSearchResponse defines model for DocsSearchResponse.
type DocsSearchResult ¶ added in v0.2.1
type DocsSearchResult struct {
// DocUrl Relative path to the page, without the section anchor. Results from the same page share it, so it can be used to group them.
DocUrl *string `json:"doc_url,omitempty"`
// Highlights The passages of the section that match the query, longer than the snippet. Returned only when contents is highlights.
Highlights *[]string `json:"highlights,omitempty"`
// MarkdownUrl Absolute URL that returns the page's full content as Markdown. Fetch it to read the whole page.
MarkdownUrl *string `json:"markdown_url,omitempty"`
// Score Relevance score. Higher is more relevant; results are ordered by descending score.
Score *float32 `json:"score,omitempty"`
// Section Heading of the matching section within the page.
Section *string `json:"section,omitempty"`
// Snippet Short excerpt of the matching content, with the query terms in context. Always returned.
Snippet *string `json:"snippet,omitempty"`
// Title Title of the documentation page this result belongs to.
Title *string `json:"title,omitempty"`
// TokenEstimate Approximate token count of the full page returned by markdown_url, to budget reading it. Results from the same page share it.
TokenEstimate *int `json:"token_estimate,omitempty"`
// Url Relative path to the matching section, including the heading anchor.
Url *string `json:"url,omitempty"`
}
DocsSearchResult defines model for DocsSearchResult.
type EmailAddress ¶
type EmailAddress struct {
// Email Email address.
Email openapi_types.Email `json:"email"`
// Name Display name shown alongside the address in mail clients.
Name *string `json:"name,omitempty"`
}
EmailAddress An email address with an optional display name.
type EmailAddressInput ¶
type EmailAddressInput struct {
// contains filtered or unexported fields
}
EmailAddressInput A sender or recipient address. Accepts a plain email string (`jane@example.com`), an RFC 5322 mailbox string with an embedded display name (`Jane Doe <jane@example.com>`), or an object carrying the address and an optional display name. All forms can be mixed freely within one request; responses always return the object form.
func (EmailAddressInput) AsEmailAddress ¶
func (t EmailAddressInput) AsEmailAddress() (EmailAddress, error)
AsEmailAddress returns the union data inside the EmailAddressInput as a EmailAddress
func (EmailAddressInput) AsEmailAddressInput0 ¶
func (t EmailAddressInput) AsEmailAddressInput0() (EmailAddressInput0, error)
AsEmailAddressInput0 returns the union data inside the EmailAddressInput as a EmailAddressInput0
func (*EmailAddressInput) FromEmailAddress ¶
func (t *EmailAddressInput) FromEmailAddress(v EmailAddress) error
FromEmailAddress overwrites any union data inside the EmailAddressInput as the provided EmailAddress
func (*EmailAddressInput) FromEmailAddressInput0 ¶
func (t *EmailAddressInput) FromEmailAddressInput0(v EmailAddressInput0) error
FromEmailAddressInput0 overwrites any union data inside the EmailAddressInput as the provided EmailAddressInput0
func (EmailAddressInput) MarshalJSON ¶
func (t EmailAddressInput) MarshalJSON() ([]byte, error)
func (*EmailAddressInput) MergeEmailAddress ¶
func (t *EmailAddressInput) MergeEmailAddress(v EmailAddress) error
MergeEmailAddress performs a merge with any union data inside the EmailAddressInput, using the provided EmailAddress
func (*EmailAddressInput) MergeEmailAddressInput0 ¶
func (t *EmailAddressInput) MergeEmailAddressInput0(v EmailAddressInput0) error
MergeEmailAddressInput0 performs a merge with any union data inside the EmailAddressInput, using the provided EmailAddressInput0
func (*EmailAddressInput) UnmarshalJSON ¶
func (t *EmailAddressInput) UnmarshalJSON(b []byte) error
type EmailAddressInput0 ¶
type EmailAddressInput0 = string
EmailAddressInput0 Email address, optionally in RFC 5322 mailbox form with an embedded display name.
type EmailAttachment ¶
type EmailAttachment struct {
// Content Base64-encoded attachment bytes. Required. Counts toward the 20 MB estimated generated message-size cap after encoding and MIME wrapping.
Content []byte `json:"content"`
// ContentId RFC 2392 Content-ID. When set, the attachment is rendered inline and can be referenced from the HTML body as `<img src="cid:{content_id}"/>`. When omitted, the attachment is rendered as a regular file attachment.
ContentId *string `json:"content_id,omitempty"`
// ContentType MIME type. Inferred from `filename` extension when omitted. Used to enforce the blocklist of disallowed executable / script types.
ContentType *string `json:"content_type,omitempty"`
// Filename Filename shown to the recipient. Required.
Filename string `json:"filename"`
// Path Preview feature — provide a URL and Bird fetches the attachment for you. Currently unavailable. Use `content` instead. The schema currently requires `content`, so a request with only `path` is rejected with 422 for missing `content`; a request supplying both `content` and `path` is rejected with 422 `unsupported_feature` until this preview ships. When generally available: HTTPS-only, single redirect followed and re-validated, private IP ranges blocked, request timeout enforced, fetched content counts toward the 20 MB estimated generated message-size cap after encoding and MIME wrapping.
Path *string `json:"path,omitempty"`
}
EmailAttachment File attached to an email send. The attachment bytes are passed as base64-encoded `content` directly in the request body (required). The `path` field (provide a URL and Bird fetches the attachment for you) is a preview feature and currently unavailable. Requests are rejected with 422 if `content` is missing — `path` alone does not satisfy the schema. When `path` becomes generally available, the schema will be relaxed so that exactly one of `content` or `path` is required. Inline images for `<img src="cid:..."/>` references in the HTML body use the `content_id` field together with `content`. Bird enforces a **20 MB estimated generated message size** cap. The estimate is the HTML and text body plus all attachments and inline images measured after base64 encoding. This is not a raw file-size cap. As a rule of thumb, keep total raw attachment content at or below **15 MB** so the generated message has enough room after encoding and MIME wrapping. Recipient-side delivery reality: downstream limits vary by product and tenant/server policy. Gmail personal and Outlook.com document 25 MB attachment limits. Exchange Online defaults to 35 MB send / 36 MB receive, but admins can configure limits; on-prem Exchange Server organizational defaults are 10 MB. Sends close to Bird's 20 MB generated-message cap may be accepted by Bird but bounce at the recipient's mail server. Batch sends can include attachments on individual message objects. Each message still has the 20 MB estimated generated-size cap, and the serialized JSON request body for the whole batch has a hard 20 MB cap. Certain executable / script content types are rejected at validation time.
type EmailAttachmentID ¶ added in v0.2.0
type EmailAttachmentID = string
EmailAttachmentID defines model for EmailAttachmentID.
type EmailAttachmentRef ¶
type EmailAttachmentRef struct {
// ContentId The Content-ID set at send time, when the attachment was inline.
ContentId *string `json:"content_id,omitempty"`
// ContentType Resolved MIME type at send time.
ContentType *string `json:"content_type,omitempty"`
// Filename Filename as shown to the recipient.
Filename string `json:"filename"`
Id *EmailAttachmentID `json:"id,omitempty"`
// Inline True when the attachment was sent inline via a `content_id` reference in the HTML body, false for regular file attachments.
Inline *bool `json:"inline,omitempty"`
// Size Decoded size in bytes.
Size int `json:"size"`
}
EmailAttachmentRef Attachment metadata returned on API reads. The original content is not echoed back inline — only the metadata needed for display and audit. To download the raw attachment bytes (while content storage is enabled and within the retention window), use `GET /v1/email/messages/{message_id}/attachments/{attachment_id}`, which returns the file with its own content type and a Content-Disposition filename.
type EmailBounceType ¶
type EmailBounceType string
EmailBounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
const ( EmailBounceTypeAdmin EmailBounceType = "admin" EmailBounceTypeBlock EmailBounceType = "block" EmailBounceTypeHard EmailBounceType = "hard" EmailBounceTypeSoft EmailBounceType = "soft" EmailBounceTypeUndetermined EmailBounceType = "undetermined" )
Defines values for EmailBounceType.
func (EmailBounceType) Valid ¶
func (e EmailBounceType) Valid() bool
Valid indicates whether the value is a known member of the EmailBounceType enum.
type EmailEvent ¶
type EmailEvent struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage. Lets you distinguish, for example, a DNS failure from a spam block when both would be `bounce_type: soft` or `bounce_type: block`. Present on `email.bounced`, `email.out_of_band_bounce`, and `email.deferred`.
BounceClass *int `json:"bounce_class,omitempty"`
// BounceCode SMTP status code returned by the receiving mail server. Present on `email.bounced` and `email.deferred` events.
BounceCode *string `json:"bounce_code,omitempty"`
// BounceDescription Human-readable bounce reason. Present on `email.bounced` and `email.deferred` events.
BounceDescription *string `json:"bounce_description,omitempty"`
// BounceType Bounce classification. Present on `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType *EmailEventBounceType `json:"bounce_type,omitempty"`
// Country ISO 3166-1 alpha-2 country code derived from the client IP. Present on `email.opened` and `email.clicked` events when available.
Country *string `json:"country,omitempty"`
// Id Event ID.
Id *string `json:"id,omitempty"`
// IpAddress Client IP address (IPv4 or IPv6). Present on `email.opened` and `email.clicked` events when available.
IpAddress *string `json:"ip_address,omitempty"`
// IsPrefetched True when the open was auto-fetched by an inbox privacy feature (Apple Mail Privacy Protection, Gmail image proxy) rather than a real user action. Useful for accurate open-rate calculation. Present on `email.opened` only.
IsPrefetched *bool `json:"is_prefetched,omitempty"`
// OccurredAt When this event occurred.
OccurredAt time.Time `json:"occurred_at"`
RecipientId RecipientID `json:"recipient_id"`
// RejectionReason Specific cause of rejection. Present on `email.rejected` events only. See `EmailRecipient.rejection_reason` for the meaning of each value.
RejectionReason *EmailEventRejectionReason `json:"rejection_reason,omitempty"`
// SendingIp The IP address Bird used to send this message. Useful when investigating deliverability issues that correlate with specific IPs. Present on `email.delivered`, `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events.
SendingIp *string `json:"sending_ip,omitempty"`
// Type Type of an event in a message's per-recipient delivery timeline. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
Type EmailEventType `json:"type"`
// Url The clicked URL. Present on `email.clicked` events.
Url *string `json:"url,omitempty"`
// UserAgent Client user-agent string. Present on `email.opened` and `email.clicked` events when available.
UserAgent *string `json:"user_agent,omitempty"`
}
EmailEvent defines model for EmailEvent.
type EmailEventBounceType ¶
type EmailEventBounceType string
EmailEventBounceType Bounce classification. Present on `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
const ( EmailEventBounceTypeAdmin EmailEventBounceType = "admin" EmailEventBounceTypeBlock EmailEventBounceType = "block" EmailEventBounceTypeHard EmailEventBounceType = "hard" EmailEventBounceTypeLessThannil EmailEventBounceType = "<nil>" EmailEventBounceTypeSoft EmailEventBounceType = "soft" EmailEventBounceTypeUndetermined EmailEventBounceType = "undetermined" )
Defines values for EmailEventBounceType.
func (EmailEventBounceType) Valid ¶
func (e EmailEventBounceType) Valid() bool
Valid indicates whether the value is a known member of the EmailEventBounceType enum.
type EmailEventList ¶
type EmailEventList struct {
// Data Page of timeline events for this email send, in chronological order.
Data []EmailEvent `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
EmailEventList defines model for EmailEventList.
type EmailEventRejectionReason ¶
type EmailEventRejectionReason string
EmailEventRejectionReason Specific cause of rejection. Present on `email.rejected` events only. See `EmailRecipient.rejection_reason` for the meaning of each value.
const ( EmailEventRejectionReasonDomainUnverified EmailEventRejectionReason = "domain_unverified" EmailEventRejectionReasonGenerationFailure EmailEventRejectionReason = "generation_failure" EmailEventRejectionReasonLessThannil EmailEventRejectionReason = "<nil>" EmailEventRejectionReasonPolicyRejection EmailEventRejectionReason = "policy_rejection" EmailEventRejectionReasonQuotaExceeded EmailEventRejectionReason = "quota_exceeded" EmailEventRejectionReasonRecipientNotAllowed EmailEventRejectionReason = "recipient_not_allowed" EmailEventRejectionReasonRecipientSuppressed EmailEventRejectionReason = "recipient_suppressed" EmailEventRejectionReasonTransmissionFailed EmailEventRejectionReason = "transmission_failed" )
Defines values for EmailEventRejectionReason.
func (EmailEventRejectionReason) Valid ¶
func (e EmailEventRejectionReason) Valid() bool
Valid indicates whether the value is a known member of the EmailEventRejectionReason enum.
type EmailEventType ¶ added in v0.2.0
type EmailEventType = string
EmailEventType Type of an event in a message's per-recipient delivery timeline. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
type EmailMessage ¶
type EmailMessage struct {
// AcceptedCount Number of recipients currently in the `accepted` state — Bird has the send and is preparing to deliver.
AcceptedCount *int `json:"accepted_count,omitempty"`
// Attachments Attachment metadata for the send. Empty when no attachments were included. Raw content is not echoed; use the future content-retrieval endpoint when storage is enabled.
Attachments *[]EmailAttachmentRef `json:"attachments,omitempty"`
// Bcc BCC recipients.
Bcc *[]EmailAddress `json:"bcc,omitempty"`
// BouncedCount Number of recipients that resulted in a permanent delivery failure.
BouncedCount *int `json:"bounced_count,omitempty"`
// Category Content classification. Controls suppression policy — `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions.
Category EmailMessageCategory `json:"category"`
// Cc CC recipients.
Cc *[]EmailAddress `json:"cc,omitempty"`
// ClickCount Total click events across all recipients.
ClickCount *int `json:"click_count,omitempty"`
// ComplainedCount Number of recipients that reported spam.
ComplainedCount *int `json:"complained_count,omitempty"`
// CreatedAt When the send request was accepted.
CreatedAt *time.Time `json:"created_at,omitempty"`
// DeferredCount Number of recipients in transient delivery deferral; the provider is retrying.
DeferredCount *int `json:"deferred_count,omitempty"`
// DeliveredAt When all recipients reached a terminal delivered state, or null if not yet fully delivered.
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
// DeliveredCount Number of recipients whose messages were accepted by the remote MTA.
DeliveredCount *int `json:"delivered_count,omitempty"`
// DeliveryLatencyMs Time between the message being processed and the receiving mail server accepting it, in milliseconds, for the fastest delivered recipient. Null until the first recipient is delivered.
DeliveryLatencyMs *int `json:"delivery_latency_ms,omitempty"`
// From An email address with an optional display name.
From EmailAddress `json:"from"`
Id EmailID `json:"id"`
// InReplyToMessageId The message this one is a reply to, if any.
InReplyToMessageId *EmailID `json:"in_reply_to_message_id,omitempty"`
// Metadata Arbitrary JSON metadata stored on the message object and echoed in webhook payloads. See EmailMessageSendRequest for the tags vs metadata distinction.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// OpenCount Total open events across all recipients.
OpenCount *int `json:"open_count,omitempty"`
// ProcessedCount Number of recipients for whom Bird has processed the message and queued it for delivery.
ProcessedCount *int `json:"processed_count,omitempty"`
// ProcessingLatencyMs Time between Bird accepting the send and the message being processed for delivery, in milliseconds, for the fastest recipient. Null until the first recipient reaches `processed`.
ProcessingLatencyMs *int `json:"processing_latency_ms,omitempty"`
// RejectedCount Number of recipients rejected before delivery. See the per-recipient `rejection_reason` field on `GET /v1/email/messages/{message_id}/recipients` for the specific cause (suppression match, transmission failure, generation failure, or policy refusal).
RejectedCount *int `json:"rejected_count,omitempty"`
// ReplyTo Reply-To addresses, if set on the send. Empty/null when no Reply-To was provided.
ReplyTo *[]EmailAddress `json:"reply_to,omitempty"`
// ScheduledAt When this message is scheduled to send, for a send created with a future send time. Null for an immediate send. Stays set after the scheduled send fires.
ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
// Status Aggregate delivery status derived from recipient states. `scheduled` means the message is queued to send at a future time and has not been dispatched yet. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server. `canceled` means a scheduled message was canceled before it was sent.
Status *EmailMessageStatus `json:"status,omitempty"`
// Subject Message subject line.
Subject string `json:"subject"`
// Tags Structured `{name, value}` filter labels applied to this send. See EmailMessageSendRequest for the tags vs metadata distinction.
Tags *[]Tag `json:"tags,omitempty"`
// ThreadId Thread this message belongs to. Null until threading is enabled.
ThreadId *string `json:"thread_id,omitempty"`
// To Primary recipients. Length is the recipient count; use the broadcasts endpoint for audience-targeted sends. Each entry's `name` is present when a display name was provided on the send.
To []EmailAddress `json:"to"`
// TotalLatencyMs End-to-end accept → delivered time for the fastest delivered recipient, in milliseconds. Null until the first recipient is delivered.
TotalLatencyMs *int `json:"total_latency_ms,omitempty"`
// TrackClicks Whether click tracking is enabled for this send.
TrackClicks bool `json:"track_clicks"`
// TrackOpens Whether open tracking is enabled for this send.
TrackOpens bool `json:"track_opens"`
}
EmailMessage defines model for EmailMessage.
type EmailMessageBatchItem ¶
type EmailMessageBatchItem struct {
// Category Resolved category for this batch item.
Category EmailMessageBatchItemCategory `json:"category"`
Id EmailID `json:"id"`
// Status Initial status of this message in the batch.
Status *EmailMessageBatchItemStatus `json:"status,omitempty"`
}
EmailMessageBatchItem defines model for EmailMessageBatchItem.
type EmailMessageBatchItemCategory ¶
type EmailMessageBatchItemCategory string
EmailMessageBatchItemCategory Resolved category for this batch item.
const ( EmailMessageBatchItemCategoryMarketing EmailMessageBatchItemCategory = "marketing" EmailMessageBatchItemCategoryTransactional EmailMessageBatchItemCategory = "transactional" )
Defines values for EmailMessageBatchItemCategory.
func (EmailMessageBatchItemCategory) Valid ¶
func (e EmailMessageBatchItemCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageBatchItemCategory enum.
type EmailMessageBatchItemStatus ¶
type EmailMessageBatchItemStatus string
EmailMessageBatchItemStatus Initial status of this message in the batch.
const (
EmailMessageBatchItemStatusAccepted EmailMessageBatchItemStatus = "accepted"
)
Defines values for EmailMessageBatchItemStatus.
func (EmailMessageBatchItemStatus) Valid ¶
func (e EmailMessageBatchItemStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageBatchItemStatus enum.
type EmailMessageBatchRequest ¶
type EmailMessageBatchRequest = []EmailMessageSendRequest
EmailMessageBatchRequest Batch of email message send requests. All items are validated before any are queued. Attachments are allowed on individual messages. Each message must stay within the 20 MB estimated generated message-size cap. The serialized JSON request body for the batch has a hard 20 MB cap.
type EmailMessageBatchResponse ¶
type EmailMessageBatchResponse struct {
// Data One entry per message in the batch, in submission order.
Data []EmailMessageBatchItem `json:"data"`
}
EmailMessageBatchResponse defines model for EmailMessageBatchResponse.
type EmailMessageCategory ¶
type EmailMessageCategory string
EmailMessageCategory Content classification. Controls suppression policy — `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions.
const ( EmailMessageCategoryMarketing EmailMessageCategory = "marketing" EmailMessageCategoryTransactional EmailMessageCategory = "transactional" )
Defines values for EmailMessageCategory.
func (EmailMessageCategory) Valid ¶
func (e EmailMessageCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageCategory enum.
type EmailMessageContent ¶
type EmailMessageContent struct {
// Html The HTML body of the message, if it was stored.
Html *string `json:"html,omitempty"`
// Text The plain-text body of the message, if it was stored.
Text *string `json:"text,omitempty"`
}
EmailMessageContent The stored body content of a sent email message.
type EmailMessageList ¶
type EmailMessageList struct {
// Data Page of message objects.
Data []EmailMessage `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
EmailMessageList defines model for EmailMessageList.
type EmailMessageSendRequest ¶
type EmailMessageSendRequest struct {
// Attachments File attachments. Bird rejects sends whose estimated generated message size exceeds 20 MB. The estimate is the HTML and text body plus all attachments and inline images measured after base64 encoding. Keep total raw attachment content at or below 15 MB for reliable headroom. In batch sends, this per-message cap still applies and the serialized JSON request body for the whole batch has a hard 20 MB cap. See the EmailAttachment schema for the full field contract.
Attachments *[]EmailAttachment `json:"attachments,omitempty"`
// Bcc BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
Bcc *[]EmailAddressInput `json:"bcc,omitempty"`
// Category Content classification — independent of which endpoint you use. Controls suppression policy: `marketing` blocks on all suppression reasons (use for marketing content); `transactional` allows delivery through complaint and unsubscribe suppressions (use for receipts, password resets, and similar operational messages). Default: transactional.
Category *EmailMessageSendRequestCategory `json:"category,omitempty"`
// Cc CC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
Cc *[]EmailAddressInput `json:"cc,omitempty"`
// ContactId Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ContactId *string `json:"contact_id,omitempty"`
// From A sender or recipient address. Accepts a plain email string (`jane@example.com`), an RFC 5322 mailbox string with an embedded display name (`Jane Doe <jane@example.com>`), or an object carrying the address and an optional display name. All forms can be mixed freely within one request; responses always return the object form.
From EmailAddressInput `json:"from"`
// Headers Custom email headers as key-value pairs.
Headers *map[string]string `json:"headers,omitempty"`
// Html HTML body. At least one of html or text must be provided.
Html *string `json:"html,omitempty"`
InReplyToMessageId *EmailID `json:"in_reply_to_message_id,omitempty"`
// IpPoolId ID of the IP pool to send from (`ipp_` prefix), or `ipp_shared` to route through the shared pool explicitly. Omit to use your organization's default pool. An unknown pool, or a pool with no dedicated IPs available to send from, is rejected with a `422`.
IpPoolId *string `json:"ip_pool_id,omitempty"`
// Metadata Arbitrary JSON object **stored, returned on API reads, and echoed in webhook payloads**. Path-queryable in analytics (e.g. filter on `metadata.order_id`) but not surfaced as a first-class dashboard filter dimension. Cap: 2 KB serialized. Use metadata for per-send context like internal IDs, foreign keys, and structured payloads you want round-tripped through events. For low-cardinality filterable labels, use `tags` instead.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Parameters Template variables used to personalize inline content. Tokens in the subject and body (e.g. `{{ first_name }}`) are replaced with these values at send time. Shared across all recipients of this send. A token with no matching key renders empty. Cap: 16 KB serialized. When sending a stored `template`, put the values in `template.parameters` instead.
Parameters *map[string]interface{} `json:"parameters,omitempty"`
// ReplyTo Reply-To addresses, each a plain email string, an RFC 5322 mailbox string, or an object with an optional display name. RFC 5322 allows multiple. Every recipient reply hits all listed addresses, so 1-2 is typical; the 25 cap exists to prevent runaway header sizes that some MTAs reject.
ReplyTo *[]EmailAddressInput `json:"reply_to,omitempty"`
// ScheduledAt Preview feature — send-later scheduling. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
// Subject Message subject line. Required for inline sends; omit it when sending a `template` (the template supplies the subject).
Subject *string `json:"subject,omitempty"`
// Tags Structured `{name, value}` labels for **filtering and analytics**. Tags become first-class query dimensions: filter the list endpoint by tag name, slice analytics rollups by tag, and surface in webhook payloads. Cap: 20 tags per send. Use tags for low-cardinality dimensions (`category`, `experiment_variant`, `template_id`). For arbitrary structured context that you do not need as a filter dimension, use `metadata` instead.
Tags *[]Tag `json:"tags,omitempty"`
// Template Send a stored template instead of inline content. When set, omit `subject`/`html`/`text` — the template supplies them; personalize with `template.parameters`.
Template *EmailTemplateSend `json:"template,omitempty"`
// Text Plain-text body. At least one of html or text must be provided.
Text *string `json:"text,omitempty"`
// To Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
To []EmailAddressInput `json:"to"`
// TopicId Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422 unsupported_feature`. When generally available, a non-empty `topic_id` gates delivery on the recipient's opt-in state for that topic — if the recipient is opt_out, the send is silently suppressed and an `email.suppressed` event fires with `reason: topic_opt_out`.
TopicId *string `json:"topic_id,omitempty"`
// TrackClicks Whether to track click events for this message.
TrackClicks *bool `json:"track_clicks,omitempty"`
// TrackOpens Whether to track open events for this message.
TrackOpens *bool `json:"track_opens,omitempty"`
}
EmailMessageSendRequest defines model for EmailMessageSendRequest.
type EmailMessageSendRequestCategory ¶
type EmailMessageSendRequestCategory string
EmailMessageSendRequestCategory Content classification — independent of which endpoint you use. Controls suppression policy: `marketing` blocks on all suppression reasons (use for marketing content); `transactional` allows delivery through complaint and unsubscribe suppressions (use for receipts, password resets, and similar operational messages). Default: transactional.
const ( EmailMessageSendRequestCategoryMarketing EmailMessageSendRequestCategory = "marketing" EmailMessageSendRequestCategoryTransactional EmailMessageSendRequestCategory = "transactional" )
Defines values for EmailMessageSendRequestCategory.
func (EmailMessageSendRequestCategory) Valid ¶
func (e EmailMessageSendRequestCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageSendRequestCategory enum.
type EmailMessageStatus ¶
type EmailMessageStatus string
EmailMessageStatus Aggregate delivery status derived from recipient states. `scheduled` means the message is queued to send at a future time and has not been dispatched yet. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server. `canceled` means a scheduled message was canceled before it was sent.
const ( EmailMessageStatusAccepted EmailMessageStatus = "accepted" EmailMessageStatusBounced EmailMessageStatus = "bounced" EmailMessageStatusCanceled EmailMessageStatus = "canceled" EmailMessageStatusComplained EmailMessageStatus = "complained" EmailMessageStatusDeferred EmailMessageStatus = "deferred" EmailMessageStatusDelivered EmailMessageStatus = "delivered" EmailMessageStatusPartialFailure EmailMessageStatus = "partial_failure" EmailMessageStatusProcessed EmailMessageStatus = "processed" EmailMessageStatusRejected EmailMessageStatus = "rejected" EmailMessageStatusScheduled EmailMessageStatus = "scheduled" )
Defines values for EmailMessageStatus.
func (EmailMessageStatus) Valid ¶
func (e EmailMessageStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageStatus enum.
type EmailRecipient ¶
type EmailRecipient struct {
// BounceCode SMTP reply code returned by the receiving mail server for `bounced` and `deferred` rows, or null when none was provided.
BounceCode *string `json:"bounce_code,omitempty"`
// BounceDescription Human-readable reason the receiving mail server gave for the bounce or deferral, or null when none was provided.
BounceDescription *string `json:"bounce_description,omitempty"`
// BounceType Bounce classification for `bounced` and `deferred` rows, or null when the recipient has not bounced or the receiving server's response has not been classified. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType *EmailRecipientBounceType `json:"bounce_type,omitempty"`
// ClickCount Number of click events for this recipient.
ClickCount *int `json:"click_count,omitempty"`
// DeliveredAt When the recipient's mail server accepted the message, or null if not yet delivered.
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
// DeliveryLatencyMs Time between Bird processing the message and the receiving mail server accepting it, in milliseconds. Null until delivered.
DeliveryLatencyMs *int `json:"delivery_latency_ms,omitempty"`
Id RecipientID `json:"id"`
// Name Display name provided for this recipient on the send, or null if none was given.
Name *string `json:"name,omitempty"`
// OpenCount Number of open events for this recipient.
OpenCount *int `json:"open_count,omitempty"`
// ParentId ID of the parent message (em_ prefix) or broadcast (eb_ prefix) this recipient belongs to.
ParentId string `json:"parent_id"`
// ProcessedAt When Bird processed the message and queued it for delivery to the recipient's mail server, or null if not yet processed.
ProcessedAt *time.Time `json:"processed_at,omitempty"`
// ProcessingLatencyMs Time between Bird accepting the send and processing the message for delivery, in milliseconds. Null until processed.
ProcessingLatencyMs *int `json:"processing_latency_ms,omitempty"`
// Recipient Recipient email address.
Recipient openapi_types.Email `json:"recipient"`
// RejectionReason Present on `status: rejected` rows. Specifies why the recipient was rejected:
// - `recipient_suppressed`: the recipient is on the workspace suppression list. Bird
// did not attempt delivery.
// - `transmission_failed`: the message could not be transmitted for delivery. - `generation_failure`: the message could not be built for delivery (template or
// content issue).
// - `policy_rejection`: the message was refused by sending policy. - `domain_unverified`: the sending domain was not verified. - `quota_exceeded`: the organization's send quota was reached. - `recipient_not_allowed`: a recipient was not permitted for this send (for shared
// onboarding-domain sends, recipients must be verified workspace members).
RejectionReason *EmailRecipientRejectionReason `json:"rejection_reason,omitempty"`
// Role Envelope position of a recipient on an outbound email event.
Role RecipientRole `json:"role"`
// Status Delivery status for this recipient. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server.
Status *EmailRecipientStatus `json:"status,omitempty"`
// TotalLatencyMs End-to-end accept → delivered time for this recipient, in milliseconds. Null until delivered.
TotalLatencyMs *int `json:"total_latency_ms,omitempty"`
}
EmailRecipient defines model for EmailRecipient.
type EmailRecipientBounceType ¶ added in v0.2.1
type EmailRecipientBounceType string
EmailRecipientBounceType Bounce classification for `bounced` and `deferred` rows, or null when the recipient has not bounced or the receiving server's response has not been classified. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
const ( EmailRecipientBounceTypeAdmin EmailRecipientBounceType = "admin" EmailRecipientBounceTypeBlock EmailRecipientBounceType = "block" EmailRecipientBounceTypeHard EmailRecipientBounceType = "hard" EmailRecipientBounceTypeLessThannil EmailRecipientBounceType = "<nil>" EmailRecipientBounceTypeSoft EmailRecipientBounceType = "soft" EmailRecipientBounceTypeUndetermined EmailRecipientBounceType = "undetermined" )
Defines values for EmailRecipientBounceType.
func (EmailRecipientBounceType) Valid ¶ added in v0.2.1
func (e EmailRecipientBounceType) Valid() bool
Valid indicates whether the value is a known member of the EmailRecipientBounceType enum.
type EmailRecipientList ¶
type EmailRecipientList struct {
// Data Page of recipient objects for this email send.
Data []EmailRecipient `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
EmailRecipientList defines model for EmailRecipientList.
type EmailRecipientRejectionReason ¶
type EmailRecipientRejectionReason string
EmailRecipientRejectionReason Present on `status: rejected` rows. Specifies why the recipient was rejected:
- `recipient_suppressed`: the recipient is on the workspace suppression list. Bird did not attempt delivery.
- `transmission_failed`: the message could not be transmitted for delivery. - `generation_failure`: the message could not be built for delivery (template or content issue).
- `policy_rejection`: the message was refused by sending policy. - `domain_unverified`: the sending domain was not verified. - `quota_exceeded`: the organization's send quota was reached. - `recipient_not_allowed`: a recipient was not permitted for this send (for shared onboarding-domain sends, recipients must be verified workspace members).
const ( EmailRecipientRejectionReasonDomainUnverified EmailRecipientRejectionReason = "domain_unverified" EmailRecipientRejectionReasonGenerationFailure EmailRecipientRejectionReason = "generation_failure" EmailRecipientRejectionReasonLessThannil EmailRecipientRejectionReason = "<nil>" EmailRecipientRejectionReasonPolicyRejection EmailRecipientRejectionReason = "policy_rejection" EmailRecipientRejectionReasonQuotaExceeded EmailRecipientRejectionReason = "quota_exceeded" EmailRecipientRejectionReasonRecipientNotAllowed EmailRecipientRejectionReason = "recipient_not_allowed" EmailRecipientRejectionReasonRecipientSuppressed EmailRecipientRejectionReason = "recipient_suppressed" EmailRecipientRejectionReasonTransmissionFailed EmailRecipientRejectionReason = "transmission_failed" )
Defines values for EmailRecipientRejectionReason.
func (EmailRecipientRejectionReason) Valid ¶
func (e EmailRecipientRejectionReason) Valid() bool
Valid indicates whether the value is a known member of the EmailRecipientRejectionReason enum.
type EmailRecipientStatus ¶
type EmailRecipientStatus string
EmailRecipientStatus Delivery status for this recipient. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server.
const ( EmailRecipientStatusAccepted EmailRecipientStatus = "accepted" EmailRecipientStatusBounced EmailRecipientStatus = "bounced" EmailRecipientStatusComplained EmailRecipientStatus = "complained" EmailRecipientStatusDeferred EmailRecipientStatus = "deferred" EmailRecipientStatusDelivered EmailRecipientStatus = "delivered" EmailRecipientStatusProcessed EmailRecipientStatus = "processed" EmailRecipientStatusRejected EmailRecipientStatus = "rejected" )
Defines values for EmailRecipientStatus.
func (EmailRecipientStatus) Valid ¶
func (e EmailRecipientStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailRecipientStatus enum.
type EmailRejectionReason ¶
type EmailRejectionReason string
EmailRejectionReason Why an email was rejected before delivery. `recipient_suppressed` means the recipient is on the workspace suppression list, so Bird did not attempt delivery. `transmission_failed` means the message could not be transmitted for delivery. `generation_failure` means the message could not be built for delivery (a template or content issue). `policy_rejection` means the message was refused by sending policy. `domain_unverified` means the sending domain was not verified. `quota_exceeded` means the organization's send quota was reached. `recipient_not_allowed` means a recipient was not permitted for this send (for shared onboarding-domain sends, recipients must be verified workspace members).
const ( EmailRejectionReasonDomainUnverified EmailRejectionReason = "domain_unverified" EmailRejectionReasonGenerationFailure EmailRejectionReason = "generation_failure" EmailRejectionReasonPolicyRejection EmailRejectionReason = "policy_rejection" EmailRejectionReasonQuotaExceeded EmailRejectionReason = "quota_exceeded" EmailRejectionReasonRecipientNotAllowed EmailRejectionReason = "recipient_not_allowed" EmailRejectionReasonRecipientSuppressed EmailRejectionReason = "recipient_suppressed" EmailRejectionReasonTransmissionFailed EmailRejectionReason = "transmission_failed" )
Defines values for EmailRejectionReason.
func (EmailRejectionReason) Valid ¶
func (e EmailRejectionReason) Valid() bool
Valid indicates whether the value is a known member of the EmailRejectionReason enum.
type EmailTemplate ¶ added in v0.3.0
type EmailTemplate struct {
// Alias The template's workspace-unique slug handle for send-by-template, or null if unset.
Alias *string `json:"alias,omitempty"`
// BrandKitId The brand kit applied to the draft, or null if none.
BrandKitId *BrandKitID `json:"brand_kit_id,omitempty"`
// Category Whether the template is transactional or marketing email.
Category EmailTemplateCategory `json:"category"`
// CreatedAt When the template was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Description Optional description of the template's purpose. Null when unset.
Description *string `json:"description,omitempty"`
DraftVersionId EmailTemplateVersionID `json:"draft_version_id"`
// Html The draft's HTML body. Null when unset.
Html *string `json:"html,omitempty"`
Id EmailTemplateID `json:"id"`
// Name Human-readable template name, unique within the workspace.
Name string `json:"name"`
// PublishedVersionId The currently published version, or null if the template has never been published.
PublishedVersionId *EmailTemplateVersionID `json:"published_version_id,omitempty"`
// Revision The draft's revision counter. Send it back on the next update to detect concurrent edits.
Revision *int `json:"revision,omitempty"`
// Scope Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
Scope *TemplateScope `json:"scope,omitempty"`
// Source The authoring format the template is written in. Fixed at creation.
Source EmailTemplateSource `json:"source"`
// Subject The draft's email subject line. Null when unset.
Subject *string `json:"subject,omitempty"`
// Text The draft's plain-text body. Null when unset.
Text *string `json:"text,omitempty"`
// UpdatedAt When the template was last modified.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// Variables The variable slots this template's current draft fills in from the values you supply when sending.
Variables *[]TemplateVariable `json:"variables,omitempty"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EmailTemplate defines model for EmailTemplate.
type EmailTemplateCategory ¶ added in v0.3.0
type EmailTemplateCategory string
EmailTemplateCategory Whether the template is transactional or marketing email.
const ( EmailTemplateCategoryMarketing EmailTemplateCategory = "marketing" EmailTemplateCategoryTransactional EmailTemplateCategory = "transactional" )
Defines values for EmailTemplateCategory.
func (EmailTemplateCategory) Valid ¶ added in v0.3.0
func (e EmailTemplateCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailTemplateCategory enum.
type EmailTemplateCreate ¶ added in v0.3.0
type EmailTemplateCreate struct {
// Alias Optional workspace-unique slug handle for the template — a stable alternative to the template ID when sending by template. Lowercase letters, numbers, and hyphens.
Alias *string `json:"alias,omitempty"`
BrandKitId *BrandKitID `json:"brand_kit_id,omitempty"`
// Category Whether the template is transactional or marketing email.
Category EmailTemplateCategory `json:"category"`
// Description Optional description of the template's purpose.
Description *string `json:"description,omitempty"`
// Html The HTML body — the source markup for the chosen format.
Html *string `json:"html,omitempty"`
// Name Human-readable template name, unique within the workspace.
Name string `json:"name"`
// Source The authoring format the template is written in, fixed at creation. `liquid` currently supports variable substitution only (e.g. `{{ first_name }}`); filters, tags, and control flow are not yet supported — fuller Liquid support is coming soon.
Source EmailTemplateSource `json:"source"`
// Subject The email subject line for the initial draft.
Subject *string `json:"subject,omitempty"`
// Text The optional plain-text body.
Text *string `json:"text,omitempty"`
}
EmailTemplateCreate Parameters for creating an email template and its initial draft.
type EmailTemplateID ¶ added in v0.3.0
type EmailTemplateID = string
EmailTemplateID defines model for EmailTemplateID.
type EmailTemplateList ¶ added in v0.3.0
type EmailTemplateList struct {
// Data Page of email templates.
Data []EmailTemplateSummary `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
EmailTemplateList defines model for EmailTemplateList.
type EmailTemplateSend ¶ added in v0.3.0
type EmailTemplateSend struct {
// Alias The template to send, by its alias handle (for example `welcome-email`).
Alias *string `json:"alias,omitempty"`
Id *EmailTemplateID `json:"id,omitempty"`
// Parameters Values for the template's variables, keyed by variable name. A token with no matching value renders empty. Cap: 16 KB serialized.
Parameters *map[string]interface{} `json:"parameters,omitempty"`
// contains filtered or unexported fields
}
EmailTemplateSend A send-by-template reference. Identify the template by its `id` or its `alias` (supply exactly one), and pass its variable values in `parameters`.
func (EmailTemplateSend) AsEmailTemplateSend0 ¶ added in v0.3.0
func (t EmailTemplateSend) AsEmailTemplateSend0() (EmailTemplateSend0, error)
AsEmailTemplateSend0 returns the union data inside the EmailTemplateSend as a EmailTemplateSend0
func (EmailTemplateSend) AsEmailTemplateSend1 ¶ added in v0.3.0
func (t EmailTemplateSend) AsEmailTemplateSend1() (EmailTemplateSend1, error)
AsEmailTemplateSend1 returns the union data inside the EmailTemplateSend as a EmailTemplateSend1
func (*EmailTemplateSend) FromEmailTemplateSend0 ¶ added in v0.3.0
func (t *EmailTemplateSend) FromEmailTemplateSend0(v EmailTemplateSend0) error
FromEmailTemplateSend0 overwrites any union data inside the EmailTemplateSend as the provided EmailTemplateSend0
func (*EmailTemplateSend) FromEmailTemplateSend1 ¶ added in v0.3.0
func (t *EmailTemplateSend) FromEmailTemplateSend1(v EmailTemplateSend1) error
FromEmailTemplateSend1 overwrites any union data inside the EmailTemplateSend as the provided EmailTemplateSend1
func (EmailTemplateSend) MarshalJSON ¶ added in v0.3.0
func (t EmailTemplateSend) MarshalJSON() ([]byte, error)
func (*EmailTemplateSend) MergeEmailTemplateSend0 ¶ added in v0.3.0
func (t *EmailTemplateSend) MergeEmailTemplateSend0(v EmailTemplateSend0) error
MergeEmailTemplateSend0 performs a merge with any union data inside the EmailTemplateSend, using the provided EmailTemplateSend0
func (*EmailTemplateSend) MergeEmailTemplateSend1 ¶ added in v0.3.0
func (t *EmailTemplateSend) MergeEmailTemplateSend1(v EmailTemplateSend1) error
MergeEmailTemplateSend1 performs a merge with any union data inside the EmailTemplateSend, using the provided EmailTemplateSend1
func (*EmailTemplateSend) UnmarshalJSON ¶ added in v0.3.0
func (t *EmailTemplateSend) UnmarshalJSON(b []byte) error
type EmailTemplateSend0 ¶ added in v0.3.0
type EmailTemplateSend0 = interface{}
EmailTemplateSend0 defines model for .
type EmailTemplateSend1 ¶ added in v0.3.0
type EmailTemplateSend1 = interface{}
EmailTemplateSend1 defines model for .
type EmailTemplateSource ¶ added in v0.3.0
type EmailTemplateSource string
EmailTemplateSource The authoring format the template is written in. Fixed at creation.
const ( Handlebars EmailTemplateSource = "handlebars" Html EmailTemplateSource = "html" Liquid EmailTemplateSource = "liquid" )
Defines values for EmailTemplateSource.
func (EmailTemplateSource) Valid ¶ added in v0.3.0
func (e EmailTemplateSource) Valid() bool
Valid indicates whether the value is a known member of the EmailTemplateSource enum.
type EmailTemplateSummary ¶ added in v0.3.0
type EmailTemplateSummary struct {
// Alias The template's workspace-unique slug handle for send-by-template, or null if unset.
Alias *string `json:"alias,omitempty"`
// Category Whether the template is transactional or marketing email.
Category EmailTemplateCategory `json:"category"`
// CreatedAt When the template was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Description Optional description of the template's purpose. Null when unset.
Description *string `json:"description,omitempty"`
DraftVersionId EmailTemplateVersionID `json:"draft_version_id"`
Id EmailTemplateID `json:"id"`
// Name Human-readable template name, unique within the workspace.
Name string `json:"name"`
// PublishedVersionId The currently published version, or null if never published.
PublishedVersionId *EmailTemplateVersionID `json:"published_version_id,omitempty"`
// Scope Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
Scope *TemplateScope `json:"scope,omitempty"`
// Source The authoring format the template is written in. Fixed at creation.
Source EmailTemplateSource `json:"source"`
// UpdatedAt When the template was last modified.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EmailTemplateSummary defines model for EmailTemplateSummary.
type EmailTemplateUpdate ¶ added in v0.3.0
type EmailTemplateUpdate struct {
// Alias New workspace-unique slug handle for send-by-template. Send null to clear it. Lowercase letters, numbers, and hyphens.
Alias *string `json:"alias,omitempty"`
BrandKitId *BrandKitID `json:"brand_kit_id,omitempty"`
// Description New description of the template's purpose. Send null to clear it.
Description *string `json:"description,omitempty"`
// Html New HTML body — the source markup for the template's format.
Html *string `json:"html,omitempty"`
// Name New template name. Must stay unique within the workspace.
Name *string `json:"name,omitempty"`
// Revision The draft revision you last read (from the template's `revision` field). A stale value returns a conflict so you can reload and retry.
Revision int `json:"revision"`
// Subject New email subject line for the draft. Send null to clear it.
Subject *string `json:"subject,omitempty"`
// Text New plain-text body for the draft. Send null to clear it.
Text *string `json:"text,omitempty"`
}
EmailTemplateUpdate Partial update of a template's metadata and its draft content. Only the fields you send are changed; the rest are left as-is. Include the draft `revision` you last read so concurrent edits are detected.
type EmailTemplateVersion ¶ added in v0.3.0
type EmailTemplateVersion struct {
// CreatedAt When this version was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
Id EmailTemplateVersionID `json:"id"`
// PublishedAt When this version was published, or null if it has not been published.
PublishedAt *time.Time `json:"published_at,omitempty"`
// Revision The version's revision counter.
Revision *int `json:"revision,omitempty"`
// Status Lifecycle status of this version.
Status *EmailTemplateVersionStatus `json:"status,omitempty"`
TemplateId EmailTemplateID `json:"template_id"`
// Variables The variable slots this version's content fills in from the values you supply when sending.
Variables *[]TemplateVariable `json:"variables,omitempty"`
// VersionNumber Sequential published-version number (1, 2, 3…). Null while the version is a draft.
VersionNumber *int `json:"version_number,omitempty"`
}
EmailTemplateVersion defines model for EmailTemplateVersion.
type EmailTemplateVersionID ¶ added in v0.3.0
type EmailTemplateVersionID = string
EmailTemplateVersionID defines model for EmailTemplateVersionID.
type EmailTemplateVersionList ¶ added in v0.3.0
type EmailTemplateVersionList struct {
// Data All versions of the template, newest first.
Data []EmailTemplateVersion `json:"data"`
}
EmailTemplateVersionList defines model for EmailTemplateVersionList.
type EmailTemplateVersionStatus ¶ added in v0.3.0
type EmailTemplateVersionStatus string
EmailTemplateVersionStatus Lifecycle status of this version.
const ( EmailTemplateVersionStatusDraft EmailTemplateVersionStatus = "draft" EmailTemplateVersionStatusPublished EmailTemplateVersionStatus = "published" )
Defines values for EmailTemplateVersionStatus.
func (EmailTemplateVersionStatus) Valid ¶ added in v0.3.0
func (e EmailTemplateVersionStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailTemplateVersionStatus enum.
type ErrorBody ¶
type ErrorBody struct {
// Code Opaque, stable, unique error identifier. Never reused.
Code string `json:"code"`
// Details Per-field validation errors. Present only on validation_error responses.
Details *[]ErrorDetail `json:"details,omitempty"`
// DocUrl Stable link to the docs page for this error code.
DocUrl string `json:"doc_url"`
// Message Human-readable description. Not stable; clients must not parse it.
Message string `json:"message"`
// Name Human-readable slug for log readability. Paired with code, never replaces it.
Name string `json:"name"`
// Next Operations that resolve this error, in the order to try them. Present for errors with a well-defined recovery, such as unmet preconditions and conflicts.
Next *[]ErrorNextAction `json:"next,omitempty"`
// Param Identifies the offending field. Omitted when not applicable.
Param *string `json:"param,omitempty"`
// Remediation A human-readable next step to resolve this error. Present when a recovery is known.
Remediation *string `json:"remediation,omitempty"`
// RequestId Request correlation ID. Also returned as the X-Request-Id response header.
RequestId string `json:"request_id"`
// Type Broad category for coarse client branching.
Type ErrorBodyType `json:"type"`
// VendorCode Verbatim error code returned by a downstream system (for example, an SMTP response code from a recipient's mail server, or a payment-provider decline code). Present only when Bird is surfacing a code from an external system that the caller may want to act on directly.
VendorCode *string `json:"vendor_code,omitempty"`
}
ErrorBody defines model for ErrorBody.
type ErrorBodyType ¶
type ErrorBodyType string
ErrorBodyType Broad category for coarse client branching.
const ( ErrorBodyTypeAuthError ErrorBodyType = "auth_error" ErrorBodyTypeBadRequestError ErrorBodyType = "bad_request_error" ErrorBodyTypeBillingError ErrorBodyType = "billing_error" ErrorBodyTypeConflictError ErrorBodyType = "conflict_error" ErrorBodyTypeGoneError ErrorBodyType = "gone_error" ErrorBodyTypeInternalError ErrorBodyType = "internal_error" ErrorBodyTypeMisdirectedError ErrorBodyType = "misdirected_error" ErrorBodyTypeNotFoundError ErrorBodyType = "not_found_error" ErrorBodyTypeNotImplementedError ErrorBodyType = "not_implemented_error" ErrorBodyTypePayloadTooLargeError ErrorBodyType = "payload_too_large_error" ErrorBodyTypePermissionError ErrorBodyType = "permission_error" ErrorBodyTypePreconditionError ErrorBodyType = "precondition_error" ErrorBodyTypeRateLimitError ErrorBodyType = "rate_limit_error" ErrorBodyTypeTooEarlyError ErrorBodyType = "too_early_error" ErrorBodyTypeValidationError ErrorBodyType = "validation_error" )
Defines values for ErrorBodyType.
func (ErrorBodyType) Valid ¶
func (e ErrorBodyType) Valid() bool
Valid indicates whether the value is a known member of the ErrorBodyType enum.
type ErrorDetail ¶
type ErrorDetail struct {
// Message What is wrong with this field.
Message string `json:"message"`
// Param Dotted field path (e.g. "to[0].email", "subject", ".").
Param string `json:"param"`
}
ErrorDetail defines model for ErrorDetail.
type ErrorNextAction ¶ added in v0.2.2
type ErrorNextAction struct {
// Description A short, human-readable label for the recovery step, suitable for display.
Description *string `json:"description,omitempty"`
// Operation The operationId of a follow-up operation that resolves this error. Call it, then retry the original request.
Operation string `json:"operation"`
}
ErrorNextAction defines model for ErrorNextAction.
type EventDomainFailed ¶
type EventDomainFailed struct {
// Data Event payload. The fields for this event are not yet finalized.
Data map[string]interface{} `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventDomainFailedType `json:"type"`
}
EventDomainFailed A sending domain failed DNS verification. Payload schema not yet finalized.
type EventDomainFailedType ¶
type EventDomainFailedType string
EventDomainFailedType Event type.
const (
DomainFailed EventDomainFailedType = "domain.failed"
)
Defines values for EventDomainFailedType.
func (EventDomainFailedType) Valid ¶
func (e EventDomainFailedType) Valid() bool
Valid indicates whether the value is a known member of the EventDomainFailedType enum.
type EventDomainVerified ¶
type EventDomainVerified struct {
// Data Event payload. The fields for this event are not yet finalized.
Data map[string]interface{} `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventDomainVerifiedType `json:"type"`
}
EventDomainVerified A sending domain completed DNS verification successfully. Payload schema not yet finalized.
type EventDomainVerifiedType ¶
type EventDomainVerifiedType string
EventDomainVerifiedType Event type.
const (
DomainVerified EventDomainVerifiedType = "domain.verified"
)
Defines values for EventDomainVerifiedType.
func (EventDomainVerifiedType) Valid ¶
func (e EventDomainVerifiedType) Valid() bool
Valid indicates whether the value is a known member of the EventDomainVerifiedType enum.
type EventEmailAccepted ¶
type EventEmailAccepted struct {
// Data Payload of the email.accepted event.
Data EventEmailAcceptedData `json:"data"`
// Timestamp Time Bird accepted the send.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailAcceptedType `json:"type"`
}
EventEmailAccepted Bird accepted the email send and is preparing to deliver. Fires once per requested recipient at acceptance time.
type EventEmailAcceptedData ¶
type EventEmailAcceptedData = EventEmailBase
EventEmailAcceptedData Identity fields shared by every email lifecycle event payload.
type EventEmailAcceptedType ¶
type EventEmailAcceptedType string
EventEmailAcceptedType Event type.
const (
EmailAccepted EventEmailAcceptedType = "email.accepted"
)
Defines values for EventEmailAcceptedType.
func (EventEmailAcceptedType) Valid ¶
func (e EventEmailAcceptedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailAcceptedType enum.
type EventEmailBase ¶
type EventEmailBase struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailBase Identity fields shared by every email lifecycle event payload.
type EventEmailBounced ¶
type EventEmailBounced struct {
// Data Payload of the email.bounced event.
Data EventEmailBouncedData `json:"data"`
// Timestamp Time the bounce was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailBouncedType `json:"type"`
}
EventEmailBounced An outbound email permanently failed at the recipient's mail server. Fires once per recipient.
type EventEmailBouncedData ¶
type EventEmailBouncedData struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified. Lets you distinguish, for example, a DNS failure from a spam block when both would be `bounce_type: soft` or `bounce_type: block`.
BounceClass *int `json:"bounce_class"`
// BounceCode SMTP reply code returned by the receiving mail server, or null when none was provided.
BounceCode *string `json:"bounce_code"`
// BounceDescription Human-readable reason the receiving mail server gave for the bounce, or null when none was provided.
BounceDescription *string `json:"bounce_description"`
// BounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType EmailBounceType `json:"bounce_type"`
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// SendingIp The IP address used to send this message, or null when it is not known.
SendingIp *string `json:"sending_ip"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailBouncedData defines model for EventEmailBouncedData.
type EventEmailBouncedType ¶
type EventEmailBouncedType string
EventEmailBouncedType Event type.
const (
EmailBounced EventEmailBouncedType = "email.bounced"
)
Defines values for EventEmailBouncedType.
func (EventEmailBouncedType) Valid ¶
func (e EventEmailBouncedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailBouncedType enum.
type EventEmailCanceled ¶ added in v0.2.2
type EventEmailCanceled struct {
// Data Payload of the email.canceled event.
Data EventEmailCanceledData `json:"data"`
// Timestamp Time the scheduled send was canceled.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailCanceledType `json:"type"`
}
EventEmailCanceled A scheduled send was canceled before it fired. Fires once per message, not per recipient.
type EventEmailCanceledData ¶ added in v0.2.2
type EventEmailCanceledData = EventEmailMessageBase
EventEmailCanceledData Identity fields shared by the message-level email lifecycle events (scheduled, canceled), which are not tied to a single recipient.
type EventEmailCanceledType ¶ added in v0.2.2
type EventEmailCanceledType string
EventEmailCanceledType Event type.
const (
EmailCanceled EventEmailCanceledType = "email.canceled"
)
Defines values for EventEmailCanceledType.
func (EventEmailCanceledType) Valid ¶ added in v0.2.2
func (e EventEmailCanceledType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailCanceledType enum.
type EventEmailClicked ¶
type EventEmailClicked struct {
// Data Payload of the email.clicked event.
Data EventEmailClickedData `json:"data"`
// Timestamp Time the click was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailClickedType `json:"type"`
}
EventEmailClicked The recipient clicked a tracked link in the email. May fire more than once per recipient.
type EventEmailClickedData ¶
type EventEmailClickedData struct {
EmailId EmailID `json:"email_id"`
// IpAddress IP address of the client that clicked the link, or null when it is not known.
IpAddress *string `json:"ip_address"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
// Url The URL the recipient clicked.
Url string `json:"url"`
// UserAgent User-agent string of the client that clicked the link, or null when it is not known.
UserAgent *string `json:"user_agent"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailClickedData defines model for EventEmailClickedData.
type EventEmailClickedType ¶
type EventEmailClickedType string
EventEmailClickedType Event type.
const (
EmailClicked EventEmailClickedType = "email.clicked"
)
Defines values for EventEmailClickedType.
func (EventEmailClickedType) Valid ¶
func (e EventEmailClickedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailClickedType enum.
type EventEmailComplained ¶
type EventEmailComplained struct {
// Data Payload of the email.complained event.
Data EventEmailComplainedData `json:"data"`
// Timestamp Time the complaint was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailComplainedType `json:"type"`
}
EventEmailComplained The recipient marked the email as spam through their mailbox provider's feedback loop. Fires once per recipient.
type EventEmailComplainedData ¶
type EventEmailComplainedData struct {
EmailId EmailID `json:"email_id"`
// FeedbackType The kind of feedback the mailbox provider reported (such as `abuse` or `fraud`), or null when the provider did not specify one.
FeedbackType *string `json:"feedback_type"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailComplainedData defines model for EventEmailComplainedData.
type EventEmailComplainedType ¶
type EventEmailComplainedType string
EventEmailComplainedType Event type.
const (
EmailComplained EventEmailComplainedType = "email.complained"
)
Defines values for EventEmailComplainedType.
func (EventEmailComplainedType) Valid ¶
func (e EventEmailComplainedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailComplainedType enum.
type EventEmailDeferred ¶
type EventEmailDeferred struct {
// Data Payload of the email.deferred event.
Data EventEmailDeferredData `json:"data"`
// Timestamp Time the deferral was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailDeferredType `json:"type"`
}
EventEmailDeferred The recipient's mail server temporarily refused the email; delivery will be retried. May fire more than once per recipient.
type EventEmailDeferredData ¶
type EventEmailDeferredData struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified. Distinguishes, for example, a greylisting deferral from a full mailbox.
BounceClass *int `json:"bounce_class"`
// BounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType EmailBounceType `json:"bounce_type"`
// DeferReason Human-readable reason the receiving mail server gave for the deferral, or null when none was provided.
DeferReason *string `json:"defer_reason"`
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// SendingIp The IP address used to send this message, or null when it is not known.
SendingIp *string `json:"sending_ip"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailDeferredData defines model for EventEmailDeferredData.
type EventEmailDeferredType ¶
type EventEmailDeferredType string
EventEmailDeferredType Event type.
const (
EmailDeferred EventEmailDeferredType = "email.deferred"
)
Defines values for EventEmailDeferredType.
func (EventEmailDeferredType) Valid ¶
func (e EventEmailDeferredType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailDeferredType enum.
type EventEmailDelivered ¶
type EventEmailDelivered struct {
// Data Payload of the email.delivered event.
Data EventEmailDeliveredData `json:"data"`
// Timestamp Time the recipient's mail server accepted the message.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailDeliveredType `json:"type"`
}
EventEmailDelivered An outbound email reached the recipient's mail server and was accepted.
type EventEmailDeliveredData ¶
type EventEmailDeliveredData = EventEmailBase
EventEmailDeliveredData Identity fields shared by every email lifecycle event payload.
type EventEmailDeliveredType ¶
type EventEmailDeliveredType string
EventEmailDeliveredType Event type.
const (
EmailDelivered EventEmailDeliveredType = "email.delivered"
)
Defines values for EventEmailDeliveredType.
func (EventEmailDeliveredType) Valid ¶
func (e EventEmailDeliveredType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailDeliveredType enum.
type EventEmailListUnsubscribed ¶
type EventEmailListUnsubscribed struct {
// Data Payload of the email.list_unsubscribed event.
Data EventEmailListUnsubscribedData `json:"data"`
// Timestamp Time the unsubscribe was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailListUnsubscribedType `json:"type"`
}
EventEmailListUnsubscribed Recipient unsubscribed via the RFC 8058 one-click List-Unsubscribe mechanism. Fires once per recipient.
type EventEmailListUnsubscribedData ¶
type EventEmailListUnsubscribedData = EventEmailBase
EventEmailListUnsubscribedData Identity fields shared by every email lifecycle event payload.
type EventEmailListUnsubscribedType ¶
type EventEmailListUnsubscribedType string
EventEmailListUnsubscribedType Event type.
const (
EmailListUnsubscribed EventEmailListUnsubscribedType = "email.list_unsubscribed"
)
Defines values for EventEmailListUnsubscribedType.
func (EventEmailListUnsubscribedType) Valid ¶
func (e EventEmailListUnsubscribedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailListUnsubscribedType enum.
type EventEmailMessageBase ¶ added in v0.2.2
type EventEmailMessageBase struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on the event so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Tags Tags provided on the send request, echoed on the event so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailMessageBase Identity fields shared by the message-level email lifecycle events (scheduled, canceled), which are not tied to a single recipient.
type EventEmailOpened ¶
type EventEmailOpened struct {
// Data Payload of the email.opened event.
Data EventEmailOpenedData `json:"data"`
// Timestamp Time the open was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailOpenedType `json:"type"`
}
EventEmailOpened The recipient opened the email (the tracking pixel was loaded). May fire more than once per recipient.
type EventEmailOpenedData ¶
type EventEmailOpenedData struct {
EmailId EmailID `json:"email_id"`
// IpAddress IP address of the client that opened the email, or null when it is not known.
IpAddress *string `json:"ip_address"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
// UserAgent User-agent string of the client that opened the email, or null when it is not known.
UserAgent *string `json:"user_agent"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailOpenedData defines model for EventEmailOpenedData.
type EventEmailOpenedType ¶
type EventEmailOpenedType string
EventEmailOpenedType Event type.
const (
EmailOpened EventEmailOpenedType = "email.opened"
)
Defines values for EventEmailOpenedType.
func (EventEmailOpenedType) Valid ¶
func (e EventEmailOpenedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailOpenedType enum.
type EventEmailOutOfBandBounce ¶
type EventEmailOutOfBandBounce struct {
// Data Payload of the email.out_of_band_bounce event.
Data EventEmailOutOfBandBounceData `json:"data"`
// Timestamp Time the bounce notification was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailOutOfBandBounceType `json:"type"`
}
EventEmailOutOfBandBounce A bounce notification arrived after the message had already been accepted for delivery. Fires once per recipient.
type EventEmailOutOfBandBounceData ¶
type EventEmailOutOfBandBounceData struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified.
BounceClass *int `json:"bounce_class"`
// BounceCode SMTP reply code returned by the receiving mail server, or null when none was provided.
BounceCode *string `json:"bounce_code"`
// BounceDescription Human-readable reason the receiving mail server gave for the bounce, or null when none was provided.
BounceDescription *string `json:"bounce_description"`
// BounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType EmailBounceType `json:"bounce_type"`
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// SendingIp The IP address used to send this message, or null when it is not known.
SendingIp *string `json:"sending_ip"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailOutOfBandBounceData defines model for EventEmailOutOfBandBounceData.
type EventEmailOutOfBandBounceType ¶
type EventEmailOutOfBandBounceType string
EventEmailOutOfBandBounceType Event type.
const (
EmailOutOfBandBounce EventEmailOutOfBandBounceType = "email.out_of_band_bounce"
)
Defines values for EventEmailOutOfBandBounceType.
func (EventEmailOutOfBandBounceType) Valid ¶
func (e EventEmailOutOfBandBounceType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailOutOfBandBounceType enum.
type EventEmailProcessed ¶
type EventEmailProcessed struct {
// Data Payload of the email.processed event.
Data EventEmailProcessedData `json:"data"`
// Timestamp Time Bird processed the message and queued it for SMTP delivery.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailProcessedType `json:"type"`
}
EventEmailProcessed Bird processed the message and queued it for delivery to the recipient's mail server. Fires once per recipient when the message enters the SMTP delivery queue.
type EventEmailProcessedData ¶
type EventEmailProcessedData = EventEmailBase
EventEmailProcessedData Identity fields shared by every email lifecycle event payload.
type EventEmailProcessedType ¶
type EventEmailProcessedType string
EventEmailProcessedType Event type.
const (
EmailProcessed EventEmailProcessedType = "email.processed"
)
Defines values for EventEmailProcessedType.
func (EventEmailProcessedType) Valid ¶
func (e EventEmailProcessedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailProcessedType enum.
type EventEmailReceived ¶
type EventEmailReceived struct {
// Data Payload of the email.received event.
Data EventEmailReceivedData `json:"data"`
// Timestamp When Bird received the message.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailReceivedType `json:"type"`
}
EventEmailReceived Bird received and parsed an inbound email. The payload carries the message's identifiers, sender and recipients, subject, threading reference, and authentication results — enough to route and triage without a fetch. Fetch the body, full headers, and attachments with GET /v1/email/inbound-messages/{id}.
type EventEmailReceivedData ¶
type EventEmailReceivedData struct {
// DkimPass Whether DKIM passed for the sender, or null when the result did not carry a DKIM verdict.
DkimPass *bool `json:"dkim_pass,omitempty"`
// DmarcPass Whether DMARC passed for the sender, or null when the result did not carry a DMARC verdict.
DmarcPass *bool `json:"dmarc_pass,omitempty"`
// From Envelope-from address.
From openapi_types.Email `json:"from"`
// InReplyTo In-Reply-To header — the Message-ID this message replies to, or null when it is not a reply.
InReplyTo *string `json:"in_reply_to,omitempty"`
InboundMessageId InboundEmailMessageID `json:"inbound_message_id"`
// MessageId RFC 5322 Message-ID header from the sender, or null when the sender did not include one.
MessageId *string `json:"message_id"`
// SpamScore Spam score for the message. Always null at present; reserved for a future content-scoring capability.
SpamScore *float32 `json:"spam_score,omitempty"`
// SpfPass Whether SPF passed for the sender, or null when the result did not carry an SPF verdict.
SpfPass *bool `json:"spf_pass,omitempty"`
// Subject Subject line as received, or null when the message had no subject.
Subject *string `json:"subject"`
// To Recipient addresses the message was sent to.
To []openapi_types.Email `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailReceivedData Payload of the email.received event.
type EventEmailReceivedType ¶
type EventEmailReceivedType string
EventEmailReceivedType Event type.
const (
EmailReceived EventEmailReceivedType = "email.received"
)
Defines values for EventEmailReceivedType.
func (EventEmailReceivedType) Valid ¶
func (e EventEmailReceivedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailReceivedType enum.
type EventEmailRejected ¶
type EventEmailRejected struct {
// Data Payload of the email.rejected event.
Data EventEmailRejectedData `json:"data"`
// Timestamp Time the rejection was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailRejectedType `json:"type"`
}
EventEmailRejected Bird rejected the email before sending it (suppression list hit, transmission failure, or a content/policy guard). Fires once per recipient.
type EventEmailRejectedData ¶
type EventEmailRejectedData struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// RejectionReason Why an email was rejected before delivery.
// `recipient_suppressed` means the recipient is on the workspace suppression list, so Bird did not attempt delivery. `transmission_failed` means the message could not be transmitted for delivery. `generation_failure` means the message could not be built for delivery (a template or content issue). `policy_rejection` means the message was refused by sending policy. `domain_unverified` means the sending domain was not verified. `quota_exceeded` means the organization's send quota was reached. `recipient_not_allowed` means a recipient was not permitted for this send (for shared onboarding-domain sends, recipients must be verified workspace members).
RejectionReason EmailRejectionReason `json:"rejection_reason"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailRejectedData defines model for EventEmailRejectedData.
type EventEmailRejectedType ¶
type EventEmailRejectedType string
EventEmailRejectedType Event type.
const (
EmailRejected EventEmailRejectedType = "email.rejected"
)
Defines values for EventEmailRejectedType.
func (EventEmailRejectedType) Valid ¶
func (e EventEmailRejectedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailRejectedType enum.
type EventEmailScheduled ¶ added in v0.2.2
type EventEmailScheduled struct {
// Data Payload of the email.scheduled event.
Data EventEmailScheduledData `json:"data"`
// Timestamp Time the send was scheduled.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailScheduledType `json:"type"`
}
EventEmailScheduled Bird accepted a send scheduled for a future time. Fires once per message when the schedule is created, not per recipient.
type EventEmailScheduledData ¶ added in v0.2.2
type EventEmailScheduledData struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on the event so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// ScheduledAt When the message is scheduled to send.
ScheduledAt time.Time `json:"scheduled_at"`
// Tags Tags provided on the send request, echoed on the event so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailScheduledData defines model for EventEmailScheduledData.
type EventEmailScheduledType ¶ added in v0.2.2
type EventEmailScheduledType string
EventEmailScheduledType Event type.
const (
EmailScheduled EventEmailScheduledType = "email.scheduled"
)
Defines values for EventEmailScheduledType.
func (EventEmailScheduledType) Valid ¶ added in v0.2.2
func (e EventEmailScheduledType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailScheduledType enum.
type EventEmailSuppressionCreated ¶
type EventEmailSuppressionCreated struct {
// Data Event payload. The fields for this event are not yet finalized.
Data map[string]interface{} `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailSuppressionCreatedType `json:"type"`
}
EventEmailSuppressionCreated An email address was added to the workspace's suppression list (manually, via complaint, or via hard bounce). Payload schema not yet finalized.
type EventEmailSuppressionCreatedType ¶
type EventEmailSuppressionCreatedType string
EventEmailSuppressionCreatedType Event type.
const (
EmailSuppressionCreated EventEmailSuppressionCreatedType = "email_suppression.created"
)
Defines values for EventEmailSuppressionCreatedType.
func (EventEmailSuppressionCreatedType) Valid ¶
func (e EventEmailSuppressionCreatedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailSuppressionCreatedType enum.
type EventEmailUnsubscribed ¶
type EventEmailUnsubscribed struct {
// Data Payload of the email.unsubscribed event.
Data EventEmailUnsubscribedData `json:"data"`
// Timestamp Time the unsubscribe was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailUnsubscribedType `json:"type"`
}
EventEmailUnsubscribed Recipient unsubscribed by clicking a tracked unsubscribe link in the email. Fires once per recipient.
type EventEmailUnsubscribedData ¶
type EventEmailUnsubscribedData = EventEmailBase
EventEmailUnsubscribedData Identity fields shared by every email lifecycle event payload.
type EventEmailUnsubscribedType ¶
type EventEmailUnsubscribedType string
EventEmailUnsubscribedType Event type.
const (
EmailUnsubscribed EventEmailUnsubscribedType = "email.unsubscribed"
)
Defines values for EventEmailUnsubscribedType.
func (EventEmailUnsubscribedType) Valid ¶
func (e EventEmailUnsubscribedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailUnsubscribedType enum.
type EventSMSAccepted ¶ added in v0.2.0
type EventSMSAccepted struct {
// Data Payload of the sms.accepted event.
Data EventSMSAcceptedData `json:"data"`
// Timestamp Time Bird accepted the request.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSAcceptedType `json:"type"`
}
EventSMSAccepted Bird accepted the SMS send request and queued it for processing.
type EventSMSAcceptedData ¶ added in v0.2.0
type EventSMSAcceptedData = EventSMSBase
EventSMSAcceptedData Identity fields shared by every SMS lifecycle event payload.
type EventSMSAcceptedType ¶ added in v0.2.0
type EventSMSAcceptedType string
EventSMSAcceptedType Event type.
const (
SmsAccepted EventSMSAcceptedType = "sms.accepted"
)
Defines values for EventSMSAcceptedType.
func (EventSMSAcceptedType) Valid ¶ added in v0.2.0
func (e EventSMSAcceptedType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSAcceptedType enum.
type EventSMSBase ¶ added in v0.2.0
type EventSMSBase struct {
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSBase Identity fields shared by every SMS lifecycle event payload.
type EventSMSDelivered ¶ added in v0.2.0
type EventSMSDelivered struct {
// Data Payload of the sms.delivered event.
Data EventSMSDeliveredData `json:"data"`
// Timestamp Time the carrier confirmed delivery.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSDeliveredType `json:"type"`
}
EventSMSDelivered The carrier confirmed delivery of the message to the recipient handset.
type EventSMSDeliveredData ¶ added in v0.2.0
type EventSMSDeliveredData struct {
// Carrier Carrier that delivered the message, or null when not known.
Carrier *string `json:"carrier"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// MccMnc Mobile country code and mobile network code of the carrier, or null when not known.
MccMnc *string `json:"mcc_mnc"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSDeliveredData defines model for EventSMSDeliveredData.
type EventSMSDeliveredType ¶ added in v0.2.0
type EventSMSDeliveredType string
EventSMSDeliveredType Event type.
const (
SmsDelivered EventSMSDeliveredType = "sms.delivered"
)
Defines values for EventSMSDeliveredType.
func (EventSMSDeliveredType) Valid ¶ added in v0.2.0
func (e EventSMSDeliveredType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSDeliveredType enum.
type EventSMSExpired ¶ added in v0.2.0
type EventSMSExpired struct {
// Data Payload of the sms.expired event.
Data EventSMSExpiredData `json:"data"`
// Timestamp Time the message expired.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSExpiredType `json:"type"`
}
EventSMSExpired The message's validity period elapsed before it could be delivered.
type EventSMSExpiredData ¶ added in v0.2.0
type EventSMSExpiredData = EventSMSBase
EventSMSExpiredData Identity fields shared by every SMS lifecycle event payload.
type EventSMSExpiredType ¶ added in v0.2.0
type EventSMSExpiredType string
EventSMSExpiredType Event type.
const (
SmsExpired EventSMSExpiredType = "sms.expired"
)
Defines values for EventSMSExpiredType.
func (EventSMSExpiredType) Valid ¶ added in v0.2.0
func (e EventSMSExpiredType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSExpiredType enum.
type EventSMSFailed ¶ added in v0.2.0
type EventSMSFailed struct {
// Data Payload of the sms.failed event.
Data EventSMSFailedData `json:"data"`
// Timestamp Time the failure was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSFailedType `json:"type"`
}
EventSMSFailed The message terminally failed and will not be delivered.
type EventSMSFailedData ¶ added in v0.2.0
type EventSMSFailedData struct {
// Error Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
Error *SMSError `json:"error,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSFailedData defines model for EventSMSFailedData.
type EventSMSFailedType ¶ added in v0.2.0
type EventSMSFailedType string
EventSMSFailedType Event type.
const (
SmsFailed EventSMSFailedType = "sms.failed"
)
Defines values for EventSMSFailedType.
func (EventSMSFailedType) Valid ¶ added in v0.2.0
func (e EventSMSFailedType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSFailedType enum.
type EventSMSRejected ¶ added in v0.2.0
type EventSMSRejected struct {
// Data Payload of the sms.rejected event.
Data EventSMSRejectedData `json:"data"`
// Timestamp Time the rejection was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSRejectedType `json:"type"`
}
EventSMSRejected Bird rejected the message before sending it to the carrier (invalid destination, suppression, or a content/policy guard).
type EventSMSRejectedData ¶ added in v0.2.0
type EventSMSRejectedData struct {
// Error Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
Error *SMSError `json:"error,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSRejectedData defines model for EventSMSRejectedData.
type EventSMSRejectedType ¶ added in v0.2.0
type EventSMSRejectedType string
EventSMSRejectedType Event type.
const (
SmsRejected EventSMSRejectedType = "sms.rejected"
)
Defines values for EventSMSRejectedType.
func (EventSMSRejectedType) Valid ¶ added in v0.2.0
func (e EventSMSRejectedType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSRejectedType enum.
type EventSMSSent ¶ added in v0.2.0
type EventSMSSent struct {
// Data Payload of the sms.sent event.
Data EventSMSSentData `json:"data"`
// Timestamp Time the message was handed to the carrier.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSSentType `json:"type"`
}
EventSMSSent Bird handed the message to the carrier for delivery.
type EventSMSSentData ¶ added in v0.2.0
type EventSMSSentData struct {
// Carrier Carrier that handled the message, or null when not known.
Carrier *string `json:"carrier"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// MccMnc Mobile country code and mobile network code of the carrier, or null when not known.
MccMnc *string `json:"mcc_mnc"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSSentData defines model for EventSMSSentData.
type EventSMSSentType ¶ added in v0.2.0
type EventSMSSentType string
EventSMSSentType Event type.
const (
SmsSent EventSMSSentType = "sms.sent"
)
Defines values for EventSMSSentType.
func (EventSMSSentType) Valid ¶ added in v0.2.0
func (e EventSMSSentType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSSentType enum.
type EventSMSUndelivered ¶ added in v0.2.0
type EventSMSUndelivered struct {
// Data Payload of the sms.undelivered event.
Data EventSMSUndeliveredData `json:"data"`
// Timestamp Time the non-delivery was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSUndeliveredType `json:"type"`
}
EventSMSUndelivered The carrier reported a non-permanent failure to deliver the message.
type EventSMSUndeliveredData ¶ added in v0.2.0
type EventSMSUndeliveredData struct {
// Error Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
Error *SMSError `json:"error,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSUndeliveredData defines model for EventSMSUndeliveredData.
type EventSMSUndeliveredType ¶ added in v0.2.0
type EventSMSUndeliveredType string
EventSMSUndeliveredType Event type.
const (
SmsUndelivered EventSMSUndeliveredType = "sms.undelivered"
)
Defines values for EventSMSUndeliveredType.
func (EventSMSUndeliveredType) Valid ¶ added in v0.2.0
func (e EventSMSUndeliveredType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSUndeliveredType enum.
type GetEmailMessageResponse ¶
type GetEmailMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailMessage
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetEmailMessageResponse ¶
func ParseGetEmailMessageResponse(rsp *http.Response) (*GetEmailMessageResponse, error)
ParseGetEmailMessageResponse parses an HTTP response from a GetEmailMessageWithResponse call
func (GetEmailMessageResponse) ContentType ¶
func (r GetEmailMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetEmailMessageResponse) Status ¶
func (r GetEmailMessageResponse) Status() string
Status returns HTTPResponse.Status
func (GetEmailMessageResponse) StatusCode ¶
func (r GetEmailMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetEmailTemplateResponse ¶ added in v0.3.0
type GetEmailTemplateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailTemplate
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetEmailTemplateResponse ¶ added in v0.3.0
func ParseGetEmailTemplateResponse(rsp *http.Response) (*GetEmailTemplateResponse, error)
ParseGetEmailTemplateResponse parses an HTTP response from a GetEmailTemplateWithResponse call
func (GetEmailTemplateResponse) ContentType ¶ added in v0.3.0
func (r GetEmailTemplateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetEmailTemplateResponse) Status ¶ added in v0.3.0
func (r GetEmailTemplateResponse) Status() string
Status returns HTTPResponse.Status
func (GetEmailTemplateResponse) StatusCode ¶ added in v0.3.0
func (r GetEmailTemplateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetEmailTemplateVersionResponse ¶ added in v0.3.0
type GetEmailTemplateVersionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailTemplateVersion
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetEmailTemplateVersionResponse ¶ added in v0.3.0
func ParseGetEmailTemplateVersionResponse(rsp *http.Response) (*GetEmailTemplateVersionResponse, error)
ParseGetEmailTemplateVersionResponse parses an HTTP response from a GetEmailTemplateVersionWithResponse call
func (GetEmailTemplateVersionResponse) ContentType ¶ added in v0.3.0
func (r GetEmailTemplateVersionResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetEmailTemplateVersionResponse) Status ¶ added in v0.3.0
func (r GetEmailTemplateVersionResponse) Status() string
Status returns HTTPResponse.Status
func (GetEmailTemplateVersionResponse) StatusCode ¶ added in v0.3.0
func (r GetEmailTemplateVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSMSMessageResponse ¶ added in v0.3.0
type GetSMSMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSMessage
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
JSON503 *ServiceUnavailable
}
func ParseGetSMSMessageResponse ¶ added in v0.3.0
func ParseGetSMSMessageResponse(rsp *http.Response) (*GetSMSMessageResponse, error)
ParseGetSMSMessageResponse parses an HTTP response from a GetSMSMessageWithResponse call
func (GetSMSMessageResponse) ContentType ¶ added in v0.3.0
func (r GetSMSMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSMSMessageResponse) Status ¶ added in v0.3.0
func (r GetSMSMessageResponse) Status() string
Status returns HTTPResponse.Status
func (GetSMSMessageResponse) StatusCode ¶ added in v0.3.0
func (r GetSMSMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSMSTemplateResponse ¶ added in v0.3.0
type GetSMSTemplateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSTemplate
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetSMSTemplateResponse ¶ added in v0.3.0
func ParseGetSMSTemplateResponse(rsp *http.Response) (*GetSMSTemplateResponse, error)
ParseGetSMSTemplateResponse parses an HTTP response from a GetSMSTemplateWithResponse call
func (GetSMSTemplateResponse) ContentType ¶ added in v0.3.0
func (r GetSMSTemplateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSMSTemplateResponse) Status ¶ added in v0.3.0
func (r GetSMSTemplateResponse) Status() string
Status returns HTTPResponse.Status
func (GetSMSTemplateResponse) StatusCode ¶ added in v0.3.0
func (r GetSMSTemplateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InboundAddress ¶ added in v0.3.0
type InboundAddress struct {
// Address The address to forward your mailbox to. Minted by Bird when the inbound address is created.
Address *openapi_types.Email `json:"address,omitempty"`
// CreatedAt When the inbound address was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
Id InboundAddressID `json:"id"`
// Label Your own label for this address, typically the source mailbox it maps to. Null when unset.
Label *string `json:"label"`
// UpdatedAt When the inbound address was last updated.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
InboundAddress A Bird-minted email address that receives mail on your behalf. Forward a real mailbox (for example, a support inbox) to this address and Bird parses every message it receives into a received email.
type InboundAddressCreate ¶ added in v0.3.0
type InboundAddressCreate struct {
// Label Your own label for this address, typically the source mailbox it maps to.
Label *string `json:"label,omitempty"`
}
InboundAddressCreate Parameters for minting a new inbound address.
type InboundAddressID ¶ added in v0.3.0
type InboundAddressID = string
InboundAddressID defines model for InboundAddressID.
type InboundAddressList ¶ added in v0.3.0
type InboundAddressList struct {
Data []InboundAddress `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
InboundAddressList defines model for InboundAddressList.
type InboundAddressUpdate ¶ added in v0.3.0
type InboundAddressUpdate struct {
// Label Your own label for this address. Pass null to clear it.
Label *string `json:"label,omitempty"`
}
InboundAddressUpdate Fields to update on an inbound address.
type InboundAttachment ¶ added in v0.3.0
type InboundAttachment struct {
// ContentType MIME type parsed from the attachment part, or null when absent.
ContentType *string `json:"content_type"`
// Filename Filename from the attachment's Content-Disposition, or null when the sender did not name the part.
Filename *string `json:"filename"`
Id InboundAttachmentID `json:"id"`
// Size Size of the attachment in bytes.
Size int `json:"size"`
}
InboundAttachment Metadata for a file attached to a received email. The raw bytes are fetched separately with `GET /v1/email/inbound-messages/{id}/attachments/{attachment_id}`.
type InboundAttachmentID ¶ added in v0.3.0
type InboundAttachmentID = string
InboundAttachmentID defines model for InboundAttachmentID.
type InboundAttachmentList ¶ added in v0.3.0
type InboundAttachmentList struct {
// Data Metadata for every attachment on the message. Empty when the message had no attachments.
Data []InboundAttachment `json:"data"`
}
InboundAttachmentList The attachments on a received email. Not paginated — a message carries a small, bounded set of attachments, all returned at once.
type InboundEmailMessage ¶ added in v0.3.0
type InboundEmailMessage struct {
// Attachments Metadata for each attachment found on the message. Empty when the message had no attachments.
Attachments []InboundAttachment `json:"attachments"`
// Cc Recipients on the message's Cc header.
Cc []EmailAddress `json:"cc"`
// DkimPass Whether DKIM passed for the sender, parsed from the message's authentication results. Null when the result did not carry a DKIM verdict.
DkimPass *bool `json:"dkim_pass"`
// DmarcPass Whether DMARC passed for the sender, parsed from the message's authentication results. Null when the result did not carry a DMARC verdict.
DmarcPass *bool `json:"dmarc_pass"`
// From An email address with an optional display name.
From EmailAddress `json:"from"`
Id InboundEmailMessageID `json:"id"`
// InReplyTo In-Reply-To header — the Message-ID this message replies to, or null when it is not a reply.
InReplyTo *string `json:"in_reply_to"`
// MessageId RFC 5322 Message-ID header from the sender, or null when the sender did not include one.
MessageId *string `json:"message_id"`
// ReceivedAt When Bird received the message.
ReceivedAt *time.Time `json:"received_at,omitempty"`
// References References header — the chain of Message-IDs in this conversation, oldest first. Absent when the message had no References header.
References *[]string `json:"references,omitempty"`
// SpamScore Spam score for the message. Always null at present; reserved for a future content-scoring capability.
SpamScore *float32 `json:"spam_score"`
// SpfPass Whether SPF passed for the sender, parsed from the message's authentication results. Null when the result did not carry an SPF verdict.
SpfPass *bool `json:"spf_pass"`
// Subject Subject line as received, or null when the message had no subject.
Subject *string `json:"subject"`
// ThreadId Conversation this message belongs to. Always null until threading is available.
ThreadId *string `json:"thread_id"`
// To Recipients on the message's To header.
To []EmailAddress `json:"to"`
}
InboundEmailMessage An email Bird received on your behalf, parsed from the original message. Fetch the body with `/body`, the original MIME with `/raw`, and attachment bytes with `/attachments/{attachment_id}`.
type InboundEmailMessageBody ¶ added in v0.3.0
type InboundEmailMessageBody struct {
// Html The HTML body of the message, or null when the message had no HTML part.
Html *string `json:"html"`
// Text The plain-text body of the message, or null when the message had no text part.
Text *string `json:"text"`
}
InboundEmailMessageBody The parsed body of a received email.
type InboundEmailMessageID ¶ added in v0.2.0
type InboundEmailMessageID = string
InboundEmailMessageID defines model for InboundEmailMessageID.
type InboundEmailMessageList ¶ added in v0.3.0
type InboundEmailMessageList struct {
Data []InboundEmailMessage `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
InboundEmailMessageList defines model for InboundEmailMessageList.
type ListEmailMessagesParams ¶
type ListEmailMessagesParams struct {
// Limit Maximum number of items to return per page.
Limit *PaginationLimit `form:"limit,omitempty" json:"limit,omitempty"`
// StartingAfter Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
StartingAfter *StartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`
// EndingBefore Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
EndingBefore *EndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`
// CreatedAfter Return only resources created strictly after this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedAfter *CreatedAfter `form:"created_after,omitempty" json:"created_after,omitempty"`
// CreatedBefore Return only resources created strictly before this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedBefore *CreatedBefore `form:"created_before,omitempty" json:"created_before,omitempty"`
// Status Filter by aggregate delivery status.
Status *ListEmailMessagesParamsStatus `form:"status,omitempty" json:"status,omitempty"`
// Tag Filter by tag. Accepts `name` to match any send carrying that tag name, or `name:value` to match a specific tag pair (e.g. `category:welcome`). Repeat the parameter to AND-combine several tag filters.
Tag *[]string `form:"tag,omitempty" json:"tag,omitempty"`
// Category Filter by category.
Category *ListEmailMessagesParamsCategory `form:"category,omitempty" json:"category,omitempty"`
// To Filter by recipient address. Exact match against any `to`/`cc`/`bcc` recipient on the message; normalised to lowercase before comparison.
To *openapi_types.Email `form:"to,omitempty" json:"to,omitempty"`
// From Filter by sender address. Exact match against the message `from` field; normalised to lowercase before comparison.
From *openapi_types.Email `form:"from,omitempty" json:"from,omitempty"`
}
ListEmailMessagesParams defines parameters for ListEmailMessages.
type ListEmailMessagesParamsCategory ¶
type ListEmailMessagesParamsCategory string
ListEmailMessagesParamsCategory defines parameters for ListEmailMessages.
const ( ListEmailMessagesParamsCategoryMarketing ListEmailMessagesParamsCategory = "marketing" ListEmailMessagesParamsCategoryTransactional ListEmailMessagesParamsCategory = "transactional" )
Defines values for ListEmailMessagesParamsCategory.
func (ListEmailMessagesParamsCategory) Valid ¶
func (e ListEmailMessagesParamsCategory) Valid() bool
Valid indicates whether the value is a known member of the ListEmailMessagesParamsCategory enum.
type ListEmailMessagesParamsStatus ¶
type ListEmailMessagesParamsStatus string
ListEmailMessagesParamsStatus defines parameters for ListEmailMessages.
const ( Accepted ListEmailMessagesParamsStatus = "accepted" Bounced ListEmailMessagesParamsStatus = "bounced" Canceled ListEmailMessagesParamsStatus = "canceled" Complained ListEmailMessagesParamsStatus = "complained" Deferred ListEmailMessagesParamsStatus = "deferred" Delivered ListEmailMessagesParamsStatus = "delivered" PartialFailure ListEmailMessagesParamsStatus = "partial_failure" Processed ListEmailMessagesParamsStatus = "processed" Rejected ListEmailMessagesParamsStatus = "rejected" Scheduled ListEmailMessagesParamsStatus = "scheduled" )
Defines values for ListEmailMessagesParamsStatus.
func (ListEmailMessagesParamsStatus) Valid ¶
func (e ListEmailMessagesParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the ListEmailMessagesParamsStatus enum.
type ListEmailMessagesResponse ¶
type ListEmailMessagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailMessageList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListEmailMessagesResponse ¶
func ParseListEmailMessagesResponse(rsp *http.Response) (*ListEmailMessagesResponse, error)
ParseListEmailMessagesResponse parses an HTTP response from a ListEmailMessagesWithResponse call
func (ListEmailMessagesResponse) ContentType ¶
func (r ListEmailMessagesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListEmailMessagesResponse) Status ¶
func (r ListEmailMessagesResponse) Status() string
Status returns HTTPResponse.Status
func (ListEmailMessagesResponse) StatusCode ¶
func (r ListEmailMessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListEmailTemplateVersionsResponse ¶ added in v0.3.0
type ListEmailTemplateVersionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailTemplateVersionList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListEmailTemplateVersionsResponse ¶ added in v0.3.0
func ParseListEmailTemplateVersionsResponse(rsp *http.Response) (*ListEmailTemplateVersionsResponse, error)
ParseListEmailTemplateVersionsResponse parses an HTTP response from a ListEmailTemplateVersionsWithResponse call
func (ListEmailTemplateVersionsResponse) ContentType ¶ added in v0.3.0
func (r ListEmailTemplateVersionsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListEmailTemplateVersionsResponse) Status ¶ added in v0.3.0
func (r ListEmailTemplateVersionsResponse) Status() string
Status returns HTTPResponse.Status
func (ListEmailTemplateVersionsResponse) StatusCode ¶ added in v0.3.0
func (r ListEmailTemplateVersionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListEmailTemplatesParams ¶ added in v0.3.0
type ListEmailTemplatesParams struct {
// Category Filter by template category.
Category *EmailTemplateCategory `form:"category,omitempty" json:"category,omitempty"`
// Source Filter by authoring format.
Source *EmailTemplateSource `form:"source,omitempty" json:"source,omitempty"`
// Name Filter by name prefix (case-insensitive).
Name *string `form:"name,omitempty" json:"name,omitempty"`
// Limit Maximum number of items to return per page.
Limit *PaginationLimit `form:"limit,omitempty" json:"limit,omitempty"`
// StartingAfter Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
StartingAfter *StartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`
// EndingBefore Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
EndingBefore *EndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`
}
ListEmailTemplatesParams defines parameters for ListEmailTemplates.
type ListEmailTemplatesResponse ¶ added in v0.3.0
type ListEmailTemplatesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailTemplateList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListEmailTemplatesResponse ¶ added in v0.3.0
func ParseListEmailTemplatesResponse(rsp *http.Response) (*ListEmailTemplatesResponse, error)
ParseListEmailTemplatesResponse parses an HTTP response from a ListEmailTemplatesWithResponse call
func (ListEmailTemplatesResponse) ContentType ¶ added in v0.3.0
func (r ListEmailTemplatesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListEmailTemplatesResponse) Status ¶ added in v0.3.0
func (r ListEmailTemplatesResponse) Status() string
Status returns HTTPResponse.Status
func (ListEmailTemplatesResponse) StatusCode ¶ added in v0.3.0
func (r ListEmailTemplatesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListSMSMessagesParams ¶ added in v0.3.0
type ListSMSMessagesParams struct {
// Limit Maximum number of items to return per page.
Limit *PaginationLimit `form:"limit,omitempty" json:"limit,omitempty"`
// StartingAfter Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
StartingAfter *StartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`
// EndingBefore Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
EndingBefore *EndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`
// CreatedAfter Return only resources created strictly after this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedAfter *CreatedAfter `form:"created_after,omitempty" json:"created_after,omitempty"`
// CreatedBefore Return only resources created strictly before this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedBefore *CreatedBefore `form:"created_before,omitempty" json:"created_before,omitempty"`
// Direction Filter by direction. Omit for both.
Direction *ListSMSMessagesParamsDirection `form:"direction,omitempty" json:"direction,omitempty"`
// Status Filter by status; repeat the parameter to match any of several. One of scheduled, accepted, sent, delivered, undelivered, failed, rejected, canceled, expired, or received.
Status *[]string `form:"status,omitempty" json:"status,omitempty"`
// ErrorCode Filter to messages whose failure reason matches one of the supplied values; repeat the parameter to match any of several. One of invalid_destination, unreachable, blocked_by_carrier, blocked_by_recipient, landline_unreachable, content_rejected, sender_unregistered, recipient_opted_out, provider_unavailable, or unknown.
ErrorCode *[]string `form:"error_code,omitempty" json:"error_code,omitempty"`
// Category Filter by category.
Category *ListSMSMessagesParamsCategory `form:"category,omitempty" json:"category,omitempty"`
// To Filter by recipient phone number (E.164 exact match).
To *string `form:"to,omitempty" json:"to,omitempty"`
// From Filter by sender (E.164, alphanumeric, or short code — exact match).
From *string `form:"from,omitempty" json:"from,omitempty"`
// Tag Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair. Repeat the parameter to AND-combine several tag filters.
Tag *[]string `form:"tag,omitempty" json:"tag,omitempty"`
}
ListSMSMessagesParams defines parameters for ListSMSMessages.
type ListSMSMessagesParamsCategory ¶ added in v0.3.0
type ListSMSMessagesParamsCategory string
ListSMSMessagesParamsCategory defines parameters for ListSMSMessages.
const ( ListSMSMessagesParamsCategoryAuthentication ListSMSMessagesParamsCategory = "authentication" ListSMSMessagesParamsCategoryMarketing ListSMSMessagesParamsCategory = "marketing" ListSMSMessagesParamsCategoryService ListSMSMessagesParamsCategory = "service" ListSMSMessagesParamsCategoryTransactional ListSMSMessagesParamsCategory = "transactional" )
Defines values for ListSMSMessagesParamsCategory.
func (ListSMSMessagesParamsCategory) Valid ¶ added in v0.3.0
func (e ListSMSMessagesParamsCategory) Valid() bool
Valid indicates whether the value is a known member of the ListSMSMessagesParamsCategory enum.
type ListSMSMessagesParamsDirection ¶ added in v0.3.0
type ListSMSMessagesParamsDirection string
ListSMSMessagesParamsDirection defines parameters for ListSMSMessages.
const ( ListSMSMessagesParamsDirectionInbound ListSMSMessagesParamsDirection = "inbound" ListSMSMessagesParamsDirectionOutbound ListSMSMessagesParamsDirection = "outbound" )
Defines values for ListSMSMessagesParamsDirection.
func (ListSMSMessagesParamsDirection) Valid ¶ added in v0.3.0
func (e ListSMSMessagesParamsDirection) Valid() bool
Valid indicates whether the value is a known member of the ListSMSMessagesParamsDirection enum.
type ListSMSMessagesResponse ¶ added in v0.3.0
type ListSMSMessagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSMessageList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
JSON503 *ServiceUnavailable
}
func ParseListSMSMessagesResponse ¶ added in v0.3.0
func ParseListSMSMessagesResponse(rsp *http.Response) (*ListSMSMessagesResponse, error)
ParseListSMSMessagesResponse parses an HTTP response from a ListSMSMessagesWithResponse call
func (ListSMSMessagesResponse) ContentType ¶ added in v0.3.0
func (r ListSMSMessagesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListSMSMessagesResponse) Status ¶ added in v0.3.0
func (r ListSMSMessagesResponse) Status() string
Status returns HTTPResponse.Status
func (ListSMSMessagesResponse) StatusCode ¶ added in v0.3.0
func (r ListSMSMessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListSMSTemplatesParams ¶ added in v0.3.0
type ListSMSTemplatesParams struct {
// Scope Filter by scope. Omit for all.
Scope *ListSMSTemplatesParamsScope `form:"scope,omitempty" json:"scope,omitempty"`
// Category Filter by category.
Category *ListSMSTemplatesParamsCategory `form:"category,omitempty" json:"category,omitempty"`
// Locale Keep only templates available in this language, as a BCP-47 tag.
Locale *string `form:"locale,omitempty" json:"locale,omitempty"`
}
ListSMSTemplatesParams defines parameters for ListSMSTemplates.
type ListSMSTemplatesParamsCategory ¶ added in v0.3.0
type ListSMSTemplatesParamsCategory string
ListSMSTemplatesParamsCategory defines parameters for ListSMSTemplates.
const ( ListSMSTemplatesParamsCategoryAuthentication ListSMSTemplatesParamsCategory = "authentication" ListSMSTemplatesParamsCategoryMarketing ListSMSTemplatesParamsCategory = "marketing" ListSMSTemplatesParamsCategoryService ListSMSTemplatesParamsCategory = "service" ListSMSTemplatesParamsCategoryTransactional ListSMSTemplatesParamsCategory = "transactional" )
Defines values for ListSMSTemplatesParamsCategory.
func (ListSMSTemplatesParamsCategory) Valid ¶ added in v0.3.0
func (e ListSMSTemplatesParamsCategory) Valid() bool
Valid indicates whether the value is a known member of the ListSMSTemplatesParamsCategory enum.
type ListSMSTemplatesParamsScope ¶ added in v0.3.0
type ListSMSTemplatesParamsScope string
ListSMSTemplatesParamsScope defines parameters for ListSMSTemplates.
const ( ListSMSTemplatesParamsScopeSystem ListSMSTemplatesParamsScope = "system" ListSMSTemplatesParamsScopeWorkspace ListSMSTemplatesParamsScope = "workspace" )
Defines values for ListSMSTemplatesParamsScope.
func (ListSMSTemplatesParamsScope) Valid ¶ added in v0.3.0
func (e ListSMSTemplatesParamsScope) Valid() bool
Valid indicates whether the value is a known member of the ListSMSTemplatesParamsScope enum.
type ListSMSTemplatesResponse ¶ added in v0.3.0
type ListSMSTemplatesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSTemplateList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListSMSTemplatesResponse ¶ added in v0.3.0
func ParseListSMSTemplatesResponse(rsp *http.Response) (*ListSMSTemplatesResponse, error)
ParseListSMSTemplatesResponse parses an HTTP response from a ListSMSTemplatesWithResponse call
func (ListSMSTemplatesResponse) ContentType ¶ added in v0.3.0
func (r ListSMSTemplatesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListSMSTemplatesResponse) Status ¶ added in v0.3.0
func (r ListSMSTemplatesResponse) Status() string
Status returns HTTPResponse.Status
func (ListSMSTemplatesResponse) StatusCode ¶ added in v0.3.0
func (r ListSMSTemplatesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PaginationLimit ¶
type PaginationLimit = int
PaginationLimit defines model for PaginationLimit.
type PayloadTooLarge ¶ added in v0.2.0
type PayloadTooLarge = Error
PayloadTooLarge defines model for PayloadTooLarge.
type PaymentRequired ¶
type PaymentRequired = Error
PaymentRequired defines model for PaymentRequired.
type PreconditionFailed ¶
type PreconditionFailed = Error
PreconditionFailed defines model for PreconditionFailed.
type PublishEmailTemplateParams ¶ added in v0.3.0
type PublishEmailTemplateParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
PublishEmailTemplateParams defines parameters for PublishEmailTemplate.
type PublishEmailTemplateResponse ¶ added in v0.3.0
type PublishEmailTemplateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailTemplateVersion
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON409 *Conflict
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParsePublishEmailTemplateResponse ¶ added in v0.3.0
func ParsePublishEmailTemplateResponse(rsp *http.Response) (*PublishEmailTemplateResponse, error)
ParsePublishEmailTemplateResponse parses an HTTP response from a PublishEmailTemplateWithResponse call
func (PublishEmailTemplateResponse) ContentType ¶ added in v0.3.0
func (r PublishEmailTemplateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PublishEmailTemplateResponse) Status ¶ added in v0.3.0
func (r PublishEmailTemplateResponse) Status() string
Status returns HTTPResponse.Status
func (PublishEmailTemplateResponse) StatusCode ¶ added in v0.3.0
func (r PublishEmailTemplateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RecipientRole ¶
type RecipientRole string
RecipientRole Envelope position of a recipient on an outbound email event.
const ( Bcc RecipientRole = "bcc" Cc RecipientRole = "cc" To RecipientRole = "to" )
Defines values for RecipientRole.
func (RecipientRole) Valid ¶
func (e RecipientRole) Valid() bool
Valid indicates whether the value is a known member of the RecipientRole enum.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SMSBatchSummary ¶ added in v0.3.0
type SMSBatchSummary struct {
// AcceptedCount Number of messages accepted in the batch.
AcceptedCount int `json:"accepted_count"`
}
SMSBatchSummary Aggregate result for an SMS batch.
type SMSCost ¶ added in v0.3.0
type SMSCost struct {
// Amount Total cost as a decimal string — the per-segment rate multiplied by the segment count, plus any surcharges.
Amount *string `json:"amount,omitempty"`
// Breakdown Per-component cost breakdown. Returned on single-message reads; omitted from list rows.
Breakdown *SMSCostBreakdown `json:"breakdown,omitempty"`
// CurrencyCode ISO 4217 three-letter currency code.
CurrencyCode *CurrencyCode `json:"currency_code,omitempty"`
}
SMSCost Cost of the message. Null until the message has been priced; the cost is populated as the message is processed, not at the moment it is accepted.
type SMSCostBreakdown ¶ added in v0.3.0
type SMSCostBreakdown struct {
// CarrierSurcharge Carrier surcharge component as a decimal string (for example US 10DLC fees). `0.0000` when none applies.
CarrierSurcharge string `json:"carrier_surcharge"`
// CountryCode ISO 3166-1 alpha-2 destination country the price was resolved for.
CountryCode string `json:"country_code"`
// PerSegment Per-segment price as a decimal string.
PerSegment string `json:"per_segment"`
// Segments Number of billable segments.
Segments int `json:"segments"`
}
SMSCostBreakdown Per-component cost breakdown. Returned on single-message reads; omitted from list rows.
type SMSError ¶ added in v0.2.0
type SMSError struct {
// CarrierErrorCode Raw carrier-supplied error code, when available, for low-level debugging.
CarrierErrorCode *string `json:"carrier_error_code,omitempty"`
// Code Bird-stable failure reason. `invalid_destination` — the number is not assigned, ported out, or malformed. `unreachable` — handset off or out of coverage. `blocked_by_carrier` — the carrier filtered the message. `blocked_by_recipient` — the recipient device blocked the sender. `landline_unreachable` — the destination is a landline that does not accept SMS. `content_rejected` — the carrier rejected the content. `sender_unregistered` — the sender is not registered for the destination. `recipient_opted_out` — the recipient is on a suppression list. `provider_unavailable` — an upstream failure after retries. `unknown` — an unmapped failure.
Code SMSErrorCode `json:"code"`
// Description Human-readable explanation of the failure.
Description string `json:"description"`
// OccurredAt When the failure occurred.
OccurredAt time.Time `json:"occurred_at"`
}
SMSError Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
type SMSErrorCode ¶ added in v0.2.0
type SMSErrorCode string
SMSErrorCode Bird-stable failure reason. `invalid_destination` — the number is not assigned, ported out, or malformed. `unreachable` — handset off or out of coverage. `blocked_by_carrier` — the carrier filtered the message. `blocked_by_recipient` — the recipient device blocked the sender. `landline_unreachable` — the destination is a landline that does not accept SMS. `content_rejected` — the carrier rejected the content. `sender_unregistered` — the sender is not registered for the destination. `recipient_opted_out` — the recipient is on a suppression list. `provider_unavailable` — an upstream failure after retries. `unknown` — an unmapped failure.
const ( BlockedByCarrier SMSErrorCode = "blocked_by_carrier" BlockedByRecipient SMSErrorCode = "blocked_by_recipient" ContentRejected SMSErrorCode = "content_rejected" InvalidDestination SMSErrorCode = "invalid_destination" LandlineUnreachable SMSErrorCode = "landline_unreachable" RecipientOptedOut SMSErrorCode = "recipient_opted_out" SenderUnregistered SMSErrorCode = "sender_unregistered" Unknown SMSErrorCode = "unknown" Unreachable SMSErrorCode = "unreachable" )
Defines values for SMSErrorCode.
func (SMSErrorCode) Valid ¶ added in v0.2.0
func (e SMSErrorCode) Valid() bool
Valid indicates whether the value is a known member of the SMSErrorCode enum.
type SMSMessage ¶ added in v0.3.0
type SMSMessage struct {
// Carrier Carrier that handled the message, when known. Populated once a delivery receipt identifies it.
Carrier *string `json:"carrier,omitempty"`
// Category Content classification supplied on the send. Null for inbound messages.
Category *SMSMessageCategory `json:"category,omitempty"`
// Cost Cost of the message. Null until the message has been priced; the cost is populated as the message is processed, not at the moment it is accepted.
Cost *SMSCost `json:"cost,omitempty"`
// CreatedAt When the message was accepted (outbound) or received (inbound).
CreatedAt *time.Time `json:"created_at,omitempty"`
// DeliveredAt When delivery was confirmed. Null until then.
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
// Direction Whether the message was sent from a Bird sender (`outbound`) or received from a subscriber (`inbound`).
Direction *SMSMessageDirection `json:"direction,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
Id SMSMessageID `json:"id"`
// LastError Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
LastError *SMSError `json:"last_error,omitempty"`
// MccMnc Mobile country code and mobile network code of the carrier, when known.
MccMnc *string `json:"mcc_mnc,omitempty"`
// Metadata Arbitrary JSON metadata stored on the message and echoed in webhook payloads.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Segments Segment breakdown for the message body. Segment count drives billing.
Segments SMSSegments `json:"segments"`
// SentAt When the message was handed to the carrier. Null until then.
SentAt *time.Time `json:"sent_at,omitempty"`
Status *SMSMessageStatus `json:"status,omitempty"`
// Tags Structured `{name, value}` filter labels applied to this message.
Tags *[]Tag `json:"tags,omitempty"`
// Text Message body.
Text string `json:"text"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
// ValidityPeriod How long, in seconds, Bird keeps trying to deliver before the message transitions to `expired`.
ValidityPeriod *int `json:"validity_period,omitempty"`
}
SMSMessage defines model for SMSMessage.
type SMSMessageBatchRequest ¶ added in v0.3.0
type SMSMessageBatchRequest = []SMSMessageSendRequest
SMSMessageBatchRequest Batch of SMS message send requests. All items are validated before any are queued.
type SMSMessageBatchResponse ¶ added in v0.3.0
type SMSMessageBatchResponse struct {
// Data One entry per message in the batch, in submission order.
Data []SMSMessage `json:"data"`
// Summary Aggregate result for an SMS batch.
Summary *SMSBatchSummary `json:"summary,omitempty"`
}
SMSMessageBatchResponse defines model for SMSMessageBatchResponse.
type SMSMessageCategory ¶ added in v0.3.0
type SMSMessageCategory string
SMSMessageCategory Content classification. Drives opt-out (STOP) policy, quiet-hours, and per-country compliance.
const ( SMSMessageCategoryAuthentication SMSMessageCategory = "authentication" SMSMessageCategoryMarketing SMSMessageCategory = "marketing" SMSMessageCategoryService SMSMessageCategory = "service" SMSMessageCategoryTransactional SMSMessageCategory = "transactional" )
Defines values for SMSMessageCategory.
func (SMSMessageCategory) Valid ¶ added in v0.3.0
func (e SMSMessageCategory) Valid() bool
Valid indicates whether the value is a known member of the SMSMessageCategory enum.
type SMSMessageDirection ¶ added in v0.3.0
type SMSMessageDirection string
SMSMessageDirection Whether the message was sent from a Bird sender (`outbound`) or received from a subscriber (`inbound`).
const ( SMSMessageDirectionInbound SMSMessageDirection = "inbound" SMSMessageDirectionOutbound SMSMessageDirection = "outbound" )
Defines values for SMSMessageDirection.
func (SMSMessageDirection) Valid ¶ added in v0.3.0
func (e SMSMessageDirection) Valid() bool
Valid indicates whether the value is a known member of the SMSMessageDirection enum.
type SMSMessageID ¶ added in v0.2.0
type SMSMessageID = string
SMSMessageID defines model for SMSMessageID.
type SMSMessageList ¶ added in v0.3.0
type SMSMessageList struct {
// Data Page of message objects.
Data []SMSMessage `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
SMSMessageList defines model for SMSMessageList.
type SMSMessageSendRequest ¶ added in v0.3.0
type SMSMessageSendRequest struct {
// AudienceId Preview feature — audience-targeted sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
AudienceId *string `json:"audience_id,omitempty"`
// BroadcastId Preview feature — broadcast correlation. Currently unavailable; supplying this field returns `422 unsupported_feature`.
BroadcastId *string `json:"broadcast_id,omitempty"`
// CampaignId Preview feature — campaign correlation for analytics. Currently unavailable; supplying this field returns `422 unsupported_feature`.
CampaignId *string `json:"campaign_id,omitempty"`
// Category Content classification. Drives opt-out (STOP) policy, quiet-hours, and per-country compliance. Required on a free-text send; omit it on a template send, where the category is derived from the template.
Category *SMSMessageCategory `json:"category,omitempty"`
// ContactId Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ContactId *string `json:"contact_id,omitempty"`
// From Sender to send from: an E.164 number (`+15557654321`), an alphanumeric sender ID (up to 11 characters, for example `MyBrand`), or a short code (5–6 digits). When omitted, Bird selects an eligible sender for you.
From *string `json:"from,omitempty"`
// MaxPricePerSegment Preview feature — per-segment price ceiling. Currently unavailable; supplying this field returns `422 unsupported_feature`.
MaxPricePerSegment *float32 `json:"max_price_per_segment,omitempty"`
// MediaUrls Preview feature — multimedia (MMS) attachments. Currently unavailable; supplying this field returns `422 unsupported_feature`.
MediaUrls *[]string `json:"media_urls,omitempty"`
// MessagingProfileId Preview feature — sender selection from a messaging profile pool. Currently unavailable; supplying this field returns `422 unsupported_feature`.
MessagingProfileId *string `json:"messaging_profile_id,omitempty"`
// Metadata Arbitrary JSON object stored on the message, returned on API reads, and echoed in webhook payloads. Maximum 2 KB serialized. Use metadata for per-send context like internal IDs and foreign keys. For low-cardinality filterable labels, use `tags` instead.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Personalization Preview feature — per-recipient substitution for batch sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
Personalization *map[string]interface{} `json:"personalization,omitempty"`
// ScheduledAt Preview feature — send-later scheduling. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
// Tags Structured `{name, value}` labels for filtering and analytics. Tags become first-class query dimensions: filter the list endpoint by tag name, slice analytics by tag, and surface in webhook payloads. Maximum 20 tags per send. Use tags for low-cardinality dimensions (`category`, `experiment_variant`). For arbitrary structured context you do not need as a filter dimension, use `metadata` instead.
Tags *[]Tag `json:"tags,omitempty"`
// Template Send using a stored template instead of free text. Mutually exclusive with `text`; the message category is derived from the template, so `from`, `category`, and `media_urls` are not accepted alongside it.
Template *SMSTemplateSend `json:"template,omitempty"`
// Text Free-text message body. Required unless `template` is supplied (the two are mutually exclusive). At least 1 character, up to a 12-segment cap (roughly 1836 GSM-7 or 804 UCS-2 characters). Bird does not truncate; a body exceeding 12 segments is rejected with a 422. The limit is on segment count, not characters, because GSM-7 and UCS-2 encodings differ in characters per segment.
Text *string `json:"text,omitempty"`
// To Recipient phone number in E.164 format (for example `+15551234567`). One recipient per message.
To string `json:"to"`
// TopicId Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
TopicId *string `json:"topic_id,omitempty"`
// TrackClicks Preview feature — link click tracking. Defaults to `false`. Currently unavailable; setting this to `true` returns `422 unsupported_feature`.
TrackClicks *bool `json:"track_clicks,omitempty"`
// ValidityPeriod Preview feature — how long, in seconds (60–172800), Bird keeps trying to deliver before the message transitions to `expired`. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ValidityPeriod *int `json:"validity_period,omitempty"`
// contains filtered or unexported fields
}
SMSMessageSendRequest A message to send. Supply exactly one of `text` (free-text, which also requires `category`) or `template` (a stored template, whose category is derived). Supplying both, or neither, is rejected.
func (SMSMessageSendRequest) AsSMSMessageSendRequest0 ¶ added in v0.3.0
func (t SMSMessageSendRequest) AsSMSMessageSendRequest0() (SMSMessageSendRequest0, error)
AsSMSMessageSendRequest0 returns the union data inside the SMSMessageSendRequest as a SMSMessageSendRequest0
func (SMSMessageSendRequest) AsSMSMessageSendRequest1 ¶ added in v0.3.0
func (t SMSMessageSendRequest) AsSMSMessageSendRequest1() (SMSMessageSendRequest1, error)
AsSMSMessageSendRequest1 returns the union data inside the SMSMessageSendRequest as a SMSMessageSendRequest1
func (*SMSMessageSendRequest) FromSMSMessageSendRequest0 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) FromSMSMessageSendRequest0(v SMSMessageSendRequest0) error
FromSMSMessageSendRequest0 overwrites any union data inside the SMSMessageSendRequest as the provided SMSMessageSendRequest0
func (*SMSMessageSendRequest) FromSMSMessageSendRequest1 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) FromSMSMessageSendRequest1(v SMSMessageSendRequest1) error
FromSMSMessageSendRequest1 overwrites any union data inside the SMSMessageSendRequest as the provided SMSMessageSendRequest1
func (SMSMessageSendRequest) MarshalJSON ¶ added in v0.3.0
func (t SMSMessageSendRequest) MarshalJSON() ([]byte, error)
func (*SMSMessageSendRequest) MergeSMSMessageSendRequest0 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest0(v SMSMessageSendRequest0) error
MergeSMSMessageSendRequest0 performs a merge with any union data inside the SMSMessageSendRequest, using the provided SMSMessageSendRequest0
func (*SMSMessageSendRequest) MergeSMSMessageSendRequest1 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest1(v SMSMessageSendRequest1) error
MergeSMSMessageSendRequest1 performs a merge with any union data inside the SMSMessageSendRequest, using the provided SMSMessageSendRequest1
func (*SMSMessageSendRequest) UnmarshalJSON ¶ added in v0.3.0
func (t *SMSMessageSendRequest) UnmarshalJSON(b []byte) error
type SMSMessageSendRequest0 ¶ added in v0.3.0
type SMSMessageSendRequest0 = interface{}
SMSMessageSendRequest0 defines model for .
type SMSMessageSendRequest1 ¶ added in v0.3.0
type SMSMessageSendRequest1 = interface{}
SMSMessageSendRequest1 defines model for .
type SMSMessageStatus ¶ added in v0.3.0
type SMSMessageStatus string
SMSMessageStatus Delivery status. `scheduled` means the message is queued to send at a future time and has not been dispatched yet. `accepted` means Bird accepted the request and it is awaiting handoff to the carrier network. `sent` means it was handed to the carrier and is awaiting a delivery receipt. `delivered` is confirmed delivery. `undelivered` is a non-permanent non-delivery (handset off, content blocked). `failed` is a terminal permanent failure. `rejected` means Bird refused it before reaching the carrier. `canceled` means a scheduled message was canceled before it was sent. `expired` means the validity period elapsed without a terminal receipt. `received` applies to inbound messages.
const ( SMSMessageStatusAccepted SMSMessageStatus = "accepted" SMSMessageStatusCanceled SMSMessageStatus = "canceled" SMSMessageStatusDelivered SMSMessageStatus = "delivered" SMSMessageStatusExpired SMSMessageStatus = "expired" SMSMessageStatusFailed SMSMessageStatus = "failed" SMSMessageStatusReceived SMSMessageStatus = "received" SMSMessageStatusRejected SMSMessageStatus = "rejected" SMSMessageStatusScheduled SMSMessageStatus = "scheduled" SMSMessageStatusSent SMSMessageStatus = "sent" SMSMessageStatusUndelivered SMSMessageStatus = "undelivered" )
Defines values for SMSMessageStatus.
func (SMSMessageStatus) Valid ¶ added in v0.3.0
func (e SMSMessageStatus) Valid() bool
Valid indicates whether the value is a known member of the SMSMessageStatus enum.
type SMSSegments ¶ added in v0.3.0
type SMSSegments struct {
// Characters Character count of the body under the selected encoding.
Characters *int `json:"characters,omitempty"`
// Count Number of segments the body is split into. Each segment is a billable unit.
Count *int `json:"count,omitempty"`
// Encoding Encoding used for the body. `GSM_7BIT` fits 160 characters in a single segment (153 per part when multi-segment); `UCS2` is used when the body contains any character outside the GSM 03.38 alphabet (emoji, CJK, some accented characters) and fits 70 characters in a single segment (67 per part when multi-segment).
Encoding *SMSSegmentsEncoding `json:"encoding,omitempty"`
}
SMSSegments Segment breakdown for the message body. Segment count drives billing.
type SMSSegmentsEncoding ¶ added in v0.3.0
type SMSSegmentsEncoding string
SMSSegmentsEncoding Encoding used for the body. `GSM_7BIT` fits 160 characters in a single segment (153 per part when multi-segment); `UCS2` is used when the body contains any character outside the GSM 03.38 alphabet (emoji, CJK, some accented characters) and fits 70 characters in a single segment (67 per part when multi-segment).
const ( GSM7BIT SMSSegmentsEncoding = "GSM_7BIT" UCS2 SMSSegmentsEncoding = "UCS2" )
Defines values for SMSSegmentsEncoding.
func (SMSSegmentsEncoding) Valid ¶ added in v0.3.0
func (e SMSSegmentsEncoding) Valid() bool
Valid indicates whether the value is a known member of the SMSSegmentsEncoding enum.
type SMSTemplate ¶ added in v0.3.0
type SMSTemplate struct {
// Alias The template's stable handle. Pass it (or the id) as the template reference when sending.
Alias *string `json:"alias,omitempty"`
// AvailableLocales The languages this template is available in, as BCP-47 tags.
AvailableLocales *[]string `json:"available_locales,omitempty"`
// Body The template body in its default language, shown for preview.
Body *string `json:"body,omitempty"`
// Category Content classification applied to messages sent from this template.
Category *SMSMessageCategory `json:"category,omitempty"`
// CreatedAt When the template was created. Null for built-in templates.
CreatedAt *time.Time `json:"created_at,omitempty"`
// DraftVersionId The current editable draft version. Always null today — SMS templates are not yet versioned; present for parity with email templates.
DraftVersionId *SMSTemplateVersionID `json:"draft_version_id,omitempty"`
Id SMSTemplateID `json:"id"`
// Name Human-readable description of what the template is for.
Name *string `json:"name,omitempty"`
// PublishedVersionId The currently published version, or null if the template has never been published. Always null today — SMS templates are not yet versioned; present for parity with email templates.
PublishedVersionId *SMSTemplateVersionID `json:"published_version_id,omitempty"`
// Revision The draft's revision counter. Always null today — SMS templates are not yet versioned; present for parity with email templates.
Revision *int `json:"revision,omitempty"`
// Scope Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
Scope *TemplateScope `json:"scope,omitempty"`
// Status The template's lifecycle state. Built-in templates are always `active`.
Status *SMSTemplateStatus `json:"status,omitempty"`
// UpdatedAt When the template was last updated. Null for built-in templates.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// Variables The typed slots this template fills in from the values you supply when sending.
Variables *[]TemplateVariable `json:"variables,omitempty"`
}
SMSTemplate defines model for SMSTemplate.
type SMSTemplateID ¶ added in v0.3.0
type SMSTemplateID = string
SMSTemplateID defines model for SMSTemplateID.
type SMSTemplateList ¶ added in v0.3.0
type SMSTemplateList struct {
// Data The templates available to your workspace. The catalogue is small and returned in full — this list is not paginated.
Data []SMSTemplate `json:"data"`
}
SMSTemplateList defines model for SMSTemplateList.
type SMSTemplateSend ¶ added in v0.3.0
type SMSTemplateSend struct {
// Alias The template to send, by its alias handle (for example `bird_otp_verification`). Browse the available templates and their variables with the templates endpoint.
Alias *string `json:"alias,omitempty"`
Id *SMSTemplateID `json:"id,omitempty"`
// Locale Language tag (BCP 47, for example `fr` or `pt-BR`) selecting the localized body. Falls back to the closest available language, then English, when the exact tag is not stocked. Omit for English.
Locale *string `json:"locale,omitempty"`
// Parameters Values for the template's variables, keyed by variable name. The accepted keys and their formats are fixed per template — see the template's `variables` on the templates endpoint. Every required variable must be supplied, and no undeclared key may be present. Cap: 16 KB serialized.
Parameters *map[string]interface{} `json:"parameters,omitempty"`
// contains filtered or unexported fields
}
SMSTemplateSend A send-by-template reference. Identify the template by its `id` or its `alias` (supply exactly one), optionally pick a locale, and pass its variable values in `parameters`.
func (SMSTemplateSend) AsSMSTemplateSend0 ¶ added in v0.3.0
func (t SMSTemplateSend) AsSMSTemplateSend0() (SMSTemplateSend0, error)
AsSMSTemplateSend0 returns the union data inside the SMSTemplateSend as a SMSTemplateSend0
func (SMSTemplateSend) AsSMSTemplateSend1 ¶ added in v0.3.0
func (t SMSTemplateSend) AsSMSTemplateSend1() (SMSTemplateSend1, error)
AsSMSTemplateSend1 returns the union data inside the SMSTemplateSend as a SMSTemplateSend1
func (*SMSTemplateSend) FromSMSTemplateSend0 ¶ added in v0.3.0
func (t *SMSTemplateSend) FromSMSTemplateSend0(v SMSTemplateSend0) error
FromSMSTemplateSend0 overwrites any union data inside the SMSTemplateSend as the provided SMSTemplateSend0
func (*SMSTemplateSend) FromSMSTemplateSend1 ¶ added in v0.3.0
func (t *SMSTemplateSend) FromSMSTemplateSend1(v SMSTemplateSend1) error
FromSMSTemplateSend1 overwrites any union data inside the SMSTemplateSend as the provided SMSTemplateSend1
func (SMSTemplateSend) MarshalJSON ¶ added in v0.3.0
func (t SMSTemplateSend) MarshalJSON() ([]byte, error)
func (*SMSTemplateSend) MergeSMSTemplateSend0 ¶ added in v0.3.0
func (t *SMSTemplateSend) MergeSMSTemplateSend0(v SMSTemplateSend0) error
MergeSMSTemplateSend0 performs a merge with any union data inside the SMSTemplateSend, using the provided SMSTemplateSend0
func (*SMSTemplateSend) MergeSMSTemplateSend1 ¶ added in v0.3.0
func (t *SMSTemplateSend) MergeSMSTemplateSend1(v SMSTemplateSend1) error
MergeSMSTemplateSend1 performs a merge with any union data inside the SMSTemplateSend, using the provided SMSTemplateSend1
func (*SMSTemplateSend) UnmarshalJSON ¶ added in v0.3.0
func (t *SMSTemplateSend) UnmarshalJSON(b []byte) error
type SMSTemplateSend0 ¶ added in v0.3.0
type SMSTemplateSend0 = interface{}
SMSTemplateSend0 defines model for .
type SMSTemplateSend1 ¶ added in v0.3.0
type SMSTemplateSend1 = interface{}
SMSTemplateSend1 defines model for .
type SMSTemplateStatus ¶ added in v0.3.0
type SMSTemplateStatus string
SMSTemplateStatus The template's lifecycle state. Built-in templates are always `active`.
const ( SMSTemplateStatusActive SMSTemplateStatus = "active" SMSTemplateStatusApproved SMSTemplateStatus = "approved" SMSTemplateStatusDraft SMSTemplateStatus = "draft" SMSTemplateStatusPending SMSTemplateStatus = "pending" SMSTemplateStatusRejected SMSTemplateStatus = "rejected" )
Defines values for SMSTemplateStatus.
func (SMSTemplateStatus) Valid ¶ added in v0.3.0
func (e SMSTemplateStatus) Valid() bool
Valid indicates whether the value is a known member of the SMSTemplateStatus enum.
type SMSTemplateVersionID ¶ added in v0.3.0
type SMSTemplateVersionID = string
SMSTemplateVersionID defines model for SMSTemplateVersionID.
type ServiceUnavailable ¶
type ServiceUnavailable = Error
ServiceUnavailable defines model for ServiceUnavailable.
type Suppression ¶
type Suppression struct {
// AppliesTo Blocking policy. "all" blocks every category. "non_transactional" blocks marketing and future non-transactional categories but allows transactional. "category" is reserved for category-specific preferences.
AppliesTo SuppressionAppliesTo `json:"applies_to"`
CreatedAt *time.Time `json:"created_at,omitempty"`
Email openapi_types.Email `json:"email"`
Id SuppressionID `json:"id"`
Origin SuppressionOrigin `json:"origin"`
Reason SuppressionReason `json:"reason"`
Scope SuppressionScope `json:"scope"`
// SourceEmailId ID of the email that triggered suppression. Null for manual additions.
SourceEmailId *EmailID `json:"source_email_id,omitempty"`
// SourceRecipientId ID of the recipient event that triggered suppression. Null for manual additions.
SourceRecipientId *RecipientID `json:"source_recipient_id,omitempty"`
}
Suppression defines model for Suppression.
type SuppressionAppliesTo ¶
type SuppressionAppliesTo string
SuppressionAppliesTo Blocking policy. "all" blocks every category. "non_transactional" blocks marketing and future non-transactional categories but allows transactional. "category" is reserved for category-specific preferences.
const ( SuppressionAppliesToAll SuppressionAppliesTo = "all" SuppressionAppliesToCategory SuppressionAppliesTo = "category" SuppressionAppliesToNonTransactional SuppressionAppliesTo = "non_transactional" )
Defines values for SuppressionAppliesTo.
func (SuppressionAppliesTo) Valid ¶
func (e SuppressionAppliesTo) Valid() bool
Valid indicates whether the value is a known member of the SuppressionAppliesTo enum.
type SuppressionCreate ¶
type SuppressionCreate struct {
// Email Email address to suppress. Normalized to lowercase before storage.
Email openapi_types.Email `json:"email"`
}
SuppressionCreate defines model for SuppressionCreate.
type SuppressionList ¶
type SuppressionList struct {
Data []Suppression `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
SuppressionList defines model for SuppressionList.
type SuppressionOrigin ¶
type SuppressionOrigin string
SuppressionOrigin defines model for Suppression.Origin.
const ( ApiKey SuppressionOrigin = "api_key" BounceEvent SuppressionOrigin = "bounce_event" ComplaintEvent SuppressionOrigin = "complaint_event" UnsubscribeEvent SuppressionOrigin = "unsubscribe_event" User SuppressionOrigin = "user" )
Defines values for SuppressionOrigin.
func (SuppressionOrigin) Valid ¶
func (e SuppressionOrigin) Valid() bool
Valid indicates whether the value is a known member of the SuppressionOrigin enum.
type SuppressionReason ¶
type SuppressionReason string
SuppressionReason defines model for Suppression.Reason.
const ( Complaint SuppressionReason = "complaint" HardBounce SuppressionReason = "hard_bounce" Manual SuppressionReason = "manual" Unsubscribe SuppressionReason = "unsubscribe" )
Defines values for SuppressionReason.
func (SuppressionReason) Valid ¶
func (e SuppressionReason) Valid() bool
Valid indicates whether the value is a known member of the SuppressionReason enum.
type SuppressionScope ¶
type SuppressionScope struct {
// Id Public ID or alias of the scoped resource. For workspace scope, this is the workspace ID (ws_ prefix).
Id string `json:"id"`
// Type The scope this suppression applies to. Suppressions are currently workspace-scoped; the other scope types are reserved for future use.
Type SuppressionScopeType `json:"type"`
}
SuppressionScope defines model for SuppressionScope.
type SuppressionScopeType ¶
type SuppressionScopeType string
SuppressionScopeType The scope this suppression applies to. Suppressions are currently workspace-scoped; the other scope types are reserved for future use.
const ( SuppressionScopeTypeAudience SuppressionScopeType = "audience" SuppressionScopeTypeCategory SuppressionScopeType = "category" SuppressionScopeTypeContact SuppressionScopeType = "contact" SuppressionScopeTypeDomain SuppressionScopeType = "domain" SuppressionScopeTypeTopic SuppressionScopeType = "topic" SuppressionScopeTypeWorkspace SuppressionScopeType = "workspace" )
Defines values for SuppressionScopeType.
func (SuppressionScopeType) Valid ¶
func (e SuppressionScopeType) Valid() bool
Valid indicates whether the value is a known member of the SuppressionScopeType enum.
type Tag ¶ added in v0.3.0
type Tag struct {
// Name Tag name. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 32 characters.
Name string `json:"name"`
// Value Tag value. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 64 characters.
Value string `json:"value"`
}
Tag Structured key/value label attached to a message. Surfaces in list filters, the event log, and webhook payloads. Use tags for low-cardinality filtering dimensions (category, experiment ID, template ID). For arbitrary per-send context that does not need to be filterable, use `metadata`. Tag count and per-tag size are capped to keep per-send tag payloads small — see the send request for the array maximum. Tag names are unique within a send; supplying the same name twice is rejected.
type TemplateScope ¶ added in v0.3.0
type TemplateScope string
TemplateScope Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
const ( TemplateScopeSystem TemplateScope = "system" TemplateScopeWorkspace TemplateScope = "workspace" )
Defines values for TemplateScope.
func (TemplateScope) Valid ¶ added in v0.3.0
func (e TemplateScope) Valid() bool
Valid indicates whether the value is a known member of the TemplateScope enum.
type TemplateVariable ¶ added in v0.3.0
type TemplateVariable struct {
// Constraint A human-readable description of the accepted values.
Constraint *string `json:"constraint,omitempty"`
// Key The parameters key this slot is filled with.
Key *string `json:"key,omitempty"`
// Required Whether the slot must be supplied when sending. Advisory for email templates, where a missing value renders as empty rather than rejecting the send.
Required *bool `json:"required,omitempty"`
// Type The value type this slot accepts. Open enum — treat any unrecognized value as a future type rather than an error. SMS templates use the typed slots (`code`, `amount`, …); email templates use `text`.
Type *string `json:"type,omitempty"`
}
TemplateVariable A single variable slot a template fills in from the values supplied when sending. Shared across channels (SMS, email) so template introspection reads the same everywhere.
type Timestamps ¶
type Timestamps struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Timestamps defines model for Timestamps.
type UnderscoreListEnvelope ¶
type UnderscoreListEnvelope struct {
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
UnderscoreListEnvelope defines model for _ListEnvelope.
type UnderscoreListEnvelopeWithTotal ¶
type UnderscoreListEnvelopeWithTotal struct {
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
// Total Total number of items matching the request's filters across all pages. Present only when `include_total=true` was passed; otherwise null.
Total *int64 `json:"total,omitempty"`
}
UnderscoreListEnvelopeWithTotal defines model for _ListEnvelopeWithTotal.
type UpdateEmailTemplateJSONRequestBody ¶ added in v0.3.0
type UpdateEmailTemplateJSONRequestBody = EmailTemplateUpdate
UpdateEmailTemplateJSONRequestBody defines body for UpdateEmailTemplate for application/json ContentType.
type UpdateEmailTemplateParams ¶ added in v0.3.0
type UpdateEmailTemplateParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
UpdateEmailTemplateParams defines parameters for UpdateEmailTemplate.
type UpdateEmailTemplateResponse ¶ added in v0.3.0
type UpdateEmailTemplateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailTemplate
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON409 *Conflict
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseUpdateEmailTemplateResponse ¶ added in v0.3.0
func ParseUpdateEmailTemplateResponse(rsp *http.Response) (*UpdateEmailTemplateResponse, error)
ParseUpdateEmailTemplateResponse parses an HTTP response from a UpdateEmailTemplateWithResponse call
func (UpdateEmailTemplateResponse) ContentType ¶ added in v0.3.0
func (r UpdateEmailTemplateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateEmailTemplateResponse) Status ¶ added in v0.3.0
func (r UpdateEmailTemplateResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateEmailTemplateResponse) StatusCode ¶ added in v0.3.0
func (r UpdateEmailTemplateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Verification ¶ added in v0.3.0
type Verification struct {
// Channels The ordered channels this verification uses to deliver the passcode. An email recipient is verified over email; a phone recipient is verified over SMS.
Channels *[]VerificationChannelEntry `json:"channels,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
// ExpiresAt When the verification expires if no correct passcode is submitted.
ExpiresAt *time.Time `json:"expires_at,omitempty"`
Id VerificationID `json:"id"`
// LastChannel The channel the most recent passcode was sent on, or null before the first send. Open enum — new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.
LastChannel *string `json:"last_channel,omitempty"`
// Metadata The key/value pairs attached when the verification was created.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Reason Why the verification reached its final state, or null while pending or once verified. Open enum — treat any unrecognized value as a future reason.
Reason *string `json:"reason,omitempty"`
// Status The verification's current state: pending (awaiting a valid passcode), verified, failed (too many incorrect attempts), or expired (the time window elapsed before a correct passcode).
Status *VerificationStatus `json:"status,omitempty"`
// To The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
To VerificationTo `json:"to"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// VerifiedAt When the verification was completed, or null if it is not yet verified.
VerifiedAt *time.Time `json:"verified_at,omitempty"`
}
Verification defines model for Verification.
type VerificationChannel ¶ added in v0.3.0
type VerificationChannel = string
VerificationChannel The channel a passcode is delivered over. Open enum — new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.
type VerificationChannelEntry ¶ added in v0.3.0
type VerificationChannelEntry struct {
// Channel The channel a passcode is delivered over. Open enum — new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.
Channel VerificationChannel `json:"channel"`
}
VerificationChannelEntry defines model for VerificationChannelEntry.
type VerificationCheckRequest ¶ added in v0.3.0
type VerificationCheckRequest struct {
// Code The passcode the recipient received.
Code string `json:"code"`
// To The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
To VerificationTo `json:"to"`
}
VerificationCheckRequest defines model for VerificationCheckRequest.
type VerificationCheckResult ¶ added in v0.3.0
type VerificationCheckResult struct {
// AttemptsRemaining The number of check attempts left, or null once the verification is complete.
AttemptsRemaining *int `json:"attempts_remaining,omitempty"`
// Reason Why the check did not succeed, or null when success is true. incorrect_code means the passcode was wrong and attempts remain; expired means the time window elapsed; attempts_exhausted means too many incorrect attempts. Open enum — treat any unrecognized value as a future reason.
Reason *string `json:"reason,omitempty"`
// Success Whether the submitted passcode verified this verification. true means the passcode was correct and the verification is now complete; false means it was not verified — see reason. A verification that has already reached a final state is no longer checkable and returns 404.
Success *bool `json:"success,omitempty"`
Verification Verification `json:"verification"`
}
VerificationCheckResult defines model for VerificationCheckResult.
type VerificationCreateRequest ¶ added in v0.3.0
type VerificationCreateRequest struct {
// Metadata Optional key/value pairs to attach to the verification, for example a correlation id. Returned on the verification.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Options Per-request overrides applied to this verification only.
Options *VerificationOptions `json:"options,omitempty"`
// To The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
To VerificationTo `json:"to"`
}
VerificationCreateRequest defines model for VerificationCreateRequest.
type VerificationID ¶ added in v0.3.0
type VerificationID = string
VerificationID defines model for VerificationID.
type VerificationOptions ¶ added in v0.3.0
type VerificationOptions struct {
// Channels Reorder or narrow the delivery channels for this request. List channel names in the order to try them; a channel you omit is not used for this request, and a channel not already enabled for the recipient is ignored. Omit the field to use the configured order.
Channels *[]VerificationChannel `json:"channels,omitempty"`
// CodeLength Passcode length for this verification, overriding the configured length.
CodeLength *int `json:"code_length,omitempty"`
}
VerificationOptions Per-request overrides applied to this verification only.
type VerificationStatus ¶ added in v0.3.0
type VerificationStatus string
VerificationStatus The verification's current state: pending (awaiting a valid passcode), verified, failed (too many incorrect attempts), or expired (the time window elapsed before a correct passcode).
const ( VerificationStatusBlocked VerificationStatus = "blocked" VerificationStatusCanceled VerificationStatus = "canceled" VerificationStatusExpired VerificationStatus = "expired" VerificationStatusFailed VerificationStatus = "failed" VerificationStatusPending VerificationStatus = "pending" VerificationStatusVerified VerificationStatus = "verified" )
Defines values for VerificationStatus.
func (VerificationStatus) Valid ¶ added in v0.3.0
func (e VerificationStatus) Valid() bool
Valid indicates whether the value is a known member of the VerificationStatus enum.
type VerificationTo ¶ added in v0.3.0
type VerificationTo struct {
// EmailAddress The recipient's email address.
EmailAddress *openapi_types.Email `json:"email_address,omitempty"`
// PhoneNumber The recipient's phone number in E.164 format.
PhoneNumber *string `json:"phone_number,omitempty"`
}
VerificationTo The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
type WebhookAttempt ¶
type WebhookAttempt struct {
// AttemptedAt When the delivery attempt was made.
AttemptedAt *time.Time `json:"attempted_at,omitempty"`
// EventId Bird's source event ID, stable across retries of the same event. Null only for older attempts recorded before event IDs were available.
EventId *WebhookEventID `json:"event_id,omitempty"`
// EventType Webhook event type. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
EventType WebhookEventType `json:"event_type"`
// Id Unique identifier for this delivery attempt.
Id *string `json:"id,omitempty"`
// ResponseBody Body returned by your endpoint, truncated when oversized. Empty string when no body was returned.
ResponseBody *string `json:"response_body,omitempty"`
// ResponseDurationMs Round-trip duration in milliseconds.
ResponseDurationMs int `json:"response_duration_ms"`
// ResponseStatusCode HTTP status returned by the receiver. Null when no response was received (timeout, connection error, DNS failure).
ResponseStatusCode *int `json:"response_status_code"`
// Status Current state of the delivery attempt. `pending` covers in-flight and sending attempts; `failed` is reserved for terminal failures.
Status WebhookAttemptStatus `json:"status"`
// Url The endpoint URL the attempt targeted.
Url string `json:"url"`
}
WebhookAttempt defines model for WebhookAttempt.
type WebhookAttemptList ¶
type WebhookAttemptList struct {
Data []WebhookAttempt `json:"data"`
}
WebhookAttemptList defines model for WebhookAttemptList.
type WebhookAttemptStatus ¶
type WebhookAttemptStatus string
WebhookAttemptStatus Current state of the delivery attempt. `pending` covers in-flight and sending attempts; `failed` is reserved for terminal failures.
const ( WebhookAttemptStatusDelivered WebhookAttemptStatus = "delivered" WebhookAttemptStatusFailed WebhookAttemptStatus = "failed" WebhookAttemptStatusPending WebhookAttemptStatus = "pending" )
Defines values for WebhookAttemptStatus.
func (WebhookAttemptStatus) Valid ¶
func (e WebhookAttemptStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookAttemptStatus enum.
type WebhookEndpoint ¶
type WebhookEndpoint struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
Description *string `json:"description,omitempty"`
// Events Concrete event types this endpoint is subscribed to.
Events []WebhookEventType `json:"events"`
Id WebhookEndpointID `json:"id"`
Status *WebhookEndpointStatus `json:"status,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Url string `json:"url"`
}
WebhookEndpoint defines model for WebhookEndpoint.
type WebhookEndpointCreate ¶
type WebhookEndpointCreate struct {
// Description Human-readable label for this endpoint.
Description *string `json:"description,omitempty"`
// Events Concrete event types to subscribe to.
Events []WebhookEventType `json:"events"`
// Url HTTPS URL to deliver events to.
Url string `json:"url"`
}
WebhookEndpointCreate defines model for WebhookEndpointCreate.
type WebhookEndpointCreated ¶
type WebhookEndpointCreated struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
Description *string `json:"description,omitempty"`
// Events Concrete event types this endpoint is subscribed to.
Events []WebhookEventType `json:"events"`
Id WebhookEndpointID `json:"id"`
// Secret Signing secret (whsec_ prefix). Present in this response only — store it immediately, it cannot be retrieved again.
Secret string `json:"secret" pii:"true"`
Status *WebhookEndpointCreatedStatus `json:"status,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Url string `json:"url"`
}
WebhookEndpointCreated defines model for WebhookEndpointCreated.
type WebhookEndpointCreatedStatus ¶
type WebhookEndpointCreatedStatus string
WebhookEndpointCreatedStatus defines model for WebhookEndpointCreated.Status.
const ( WebhookEndpointCreatedStatusActive WebhookEndpointCreatedStatus = "active" WebhookEndpointCreatedStatusDegraded WebhookEndpointCreatedStatus = "degraded" WebhookEndpointCreatedStatusPaused WebhookEndpointCreatedStatus = "paused" )
Defines values for WebhookEndpointCreatedStatus.
func (WebhookEndpointCreatedStatus) Valid ¶
func (e WebhookEndpointCreatedStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEndpointCreatedStatus enum.
type WebhookEndpointID ¶
type WebhookEndpointID = string
WebhookEndpointID defines model for WebhookEndpointID.
type WebhookEndpointList ¶
type WebhookEndpointList struct {
Data []WebhookEndpoint `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
// Total Total number of items matching the request's filters across all pages. Present only when `include_total=true` was passed; otherwise null.
Total *int64 `json:"total,omitempty"`
}
WebhookEndpointList defines model for WebhookEndpointList.
type WebhookEndpointStatus ¶
type WebhookEndpointStatus string
WebhookEndpointStatus defines model for WebhookEndpoint.Status.
const ( WebhookEndpointStatusActive WebhookEndpointStatus = "active" WebhookEndpointStatusDegraded WebhookEndpointStatus = "degraded" WebhookEndpointStatusPaused WebhookEndpointStatus = "paused" )
Defines values for WebhookEndpointStatus.
func (WebhookEndpointStatus) Valid ¶
func (e WebhookEndpointStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEndpointStatus enum.
type WebhookEndpointUpdate ¶
type WebhookEndpointUpdate struct {
// Description Human-readable label for this endpoint.
Description *string `json:"description,omitempty"`
// Events Replacement set of event type subscriptions.
Events *[]WebhookEventType `json:"events,omitempty"`
// Status Set to "active" to re-enable a paused endpoint, or "paused" to stop delivery.
Status *WebhookEndpointUpdateStatus `json:"status,omitempty"`
// Url New HTTPS URL to deliver events to.
Url *string `json:"url,omitempty"`
}
WebhookEndpointUpdate defines model for WebhookEndpointUpdate.
type WebhookEndpointUpdateStatus ¶
type WebhookEndpointUpdateStatus string
WebhookEndpointUpdateStatus Set to "active" to re-enable a paused endpoint, or "paused" to stop delivery.
const ( Active WebhookEndpointUpdateStatus = "active" Paused WebhookEndpointUpdateStatus = "paused" )
Defines values for WebhookEndpointUpdateStatus.
func (WebhookEndpointUpdateStatus) Valid ¶
func (e WebhookEndpointUpdateStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEndpointUpdateStatus enum.
type WebhookEvent ¶
type WebhookEvent struct {
// contains filtered or unexported fields
}
WebhookEvent Discriminated union of every webhook event the Bird platform emits. Each variant is the full delivery body: `type` names the event, `timestamp` is when the event occurred, and `data` carries the event-specific payload. The `type` property selects the variant — SDKs that consume this schema (openapi-typescript, oapi-codegen) generate a narrowed union keyed on `type`, so customer code can switch on the event id and access the variant-specific payload fields without casting. Delivery metadata (the event id and per-attempt signature headers) rides in HTTP headers per Standard Webhooks and is handled by the SDK's webhook verification helper, which returns one of these variants.
func (WebhookEvent) AsEventDomainFailed ¶
func (t WebhookEvent) AsEventDomainFailed() (EventDomainFailed, error)
AsEventDomainFailed returns the union data inside the WebhookEvent as a EventDomainFailed
func (WebhookEvent) AsEventDomainVerified ¶
func (t WebhookEvent) AsEventDomainVerified() (EventDomainVerified, error)
AsEventDomainVerified returns the union data inside the WebhookEvent as a EventDomainVerified
func (WebhookEvent) AsEventEmailAccepted ¶
func (t WebhookEvent) AsEventEmailAccepted() (EventEmailAccepted, error)
AsEventEmailAccepted returns the union data inside the WebhookEvent as a EventEmailAccepted
func (WebhookEvent) AsEventEmailBounced ¶
func (t WebhookEvent) AsEventEmailBounced() (EventEmailBounced, error)
AsEventEmailBounced returns the union data inside the WebhookEvent as a EventEmailBounced
func (WebhookEvent) AsEventEmailCanceled ¶ added in v0.2.2
func (t WebhookEvent) AsEventEmailCanceled() (EventEmailCanceled, error)
AsEventEmailCanceled returns the union data inside the WebhookEvent as a EventEmailCanceled
func (WebhookEvent) AsEventEmailClicked ¶
func (t WebhookEvent) AsEventEmailClicked() (EventEmailClicked, error)
AsEventEmailClicked returns the union data inside the WebhookEvent as a EventEmailClicked
func (WebhookEvent) AsEventEmailComplained ¶
func (t WebhookEvent) AsEventEmailComplained() (EventEmailComplained, error)
AsEventEmailComplained returns the union data inside the WebhookEvent as a EventEmailComplained
func (WebhookEvent) AsEventEmailDeferred ¶
func (t WebhookEvent) AsEventEmailDeferred() (EventEmailDeferred, error)
AsEventEmailDeferred returns the union data inside the WebhookEvent as a EventEmailDeferred
func (WebhookEvent) AsEventEmailDelivered ¶
func (t WebhookEvent) AsEventEmailDelivered() (EventEmailDelivered, error)
AsEventEmailDelivered returns the union data inside the WebhookEvent as a EventEmailDelivered
func (WebhookEvent) AsEventEmailListUnsubscribed ¶
func (t WebhookEvent) AsEventEmailListUnsubscribed() (EventEmailListUnsubscribed, error)
AsEventEmailListUnsubscribed returns the union data inside the WebhookEvent as a EventEmailListUnsubscribed
func (WebhookEvent) AsEventEmailOpened ¶
func (t WebhookEvent) AsEventEmailOpened() (EventEmailOpened, error)
AsEventEmailOpened returns the union data inside the WebhookEvent as a EventEmailOpened
func (WebhookEvent) AsEventEmailOutOfBandBounce ¶
func (t WebhookEvent) AsEventEmailOutOfBandBounce() (EventEmailOutOfBandBounce, error)
AsEventEmailOutOfBandBounce returns the union data inside the WebhookEvent as a EventEmailOutOfBandBounce
func (WebhookEvent) AsEventEmailProcessed ¶
func (t WebhookEvent) AsEventEmailProcessed() (EventEmailProcessed, error)
AsEventEmailProcessed returns the union data inside the WebhookEvent as a EventEmailProcessed
func (WebhookEvent) AsEventEmailReceived ¶
func (t WebhookEvent) AsEventEmailReceived() (EventEmailReceived, error)
AsEventEmailReceived returns the union data inside the WebhookEvent as a EventEmailReceived
func (WebhookEvent) AsEventEmailRejected ¶
func (t WebhookEvent) AsEventEmailRejected() (EventEmailRejected, error)
AsEventEmailRejected returns the union data inside the WebhookEvent as a EventEmailRejected
func (WebhookEvent) AsEventEmailScheduled ¶ added in v0.2.2
func (t WebhookEvent) AsEventEmailScheduled() (EventEmailScheduled, error)
AsEventEmailScheduled returns the union data inside the WebhookEvent as a EventEmailScheduled
func (WebhookEvent) AsEventEmailSuppressionCreated ¶
func (t WebhookEvent) AsEventEmailSuppressionCreated() (EventEmailSuppressionCreated, error)
AsEventEmailSuppressionCreated returns the union data inside the WebhookEvent as a EventEmailSuppressionCreated
func (WebhookEvent) AsEventEmailUnsubscribed ¶
func (t WebhookEvent) AsEventEmailUnsubscribed() (EventEmailUnsubscribed, error)
AsEventEmailUnsubscribed returns the union data inside the WebhookEvent as a EventEmailUnsubscribed
func (WebhookEvent) AsEventSMSAccepted ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSAccepted() (EventSMSAccepted, error)
AsEventSMSAccepted returns the union data inside the WebhookEvent as a EventSMSAccepted
func (WebhookEvent) AsEventSMSDelivered ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSDelivered() (EventSMSDelivered, error)
AsEventSMSDelivered returns the union data inside the WebhookEvent as a EventSMSDelivered
func (WebhookEvent) AsEventSMSExpired ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSExpired() (EventSMSExpired, error)
AsEventSMSExpired returns the union data inside the WebhookEvent as a EventSMSExpired
func (WebhookEvent) AsEventSMSFailed ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSFailed() (EventSMSFailed, error)
AsEventSMSFailed returns the union data inside the WebhookEvent as a EventSMSFailed
func (WebhookEvent) AsEventSMSRejected ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSRejected() (EventSMSRejected, error)
AsEventSMSRejected returns the union data inside the WebhookEvent as a EventSMSRejected
func (WebhookEvent) AsEventSMSSent ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSSent() (EventSMSSent, error)
AsEventSMSSent returns the union data inside the WebhookEvent as a EventSMSSent
func (WebhookEvent) AsEventSMSUndelivered ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSUndelivered() (EventSMSUndelivered, error)
AsEventSMSUndelivered returns the union data inside the WebhookEvent as a EventSMSUndelivered
func (WebhookEvent) Discriminator ¶
func (t WebhookEvent) Discriminator() (string, error)
func (*WebhookEvent) FromEventDomainFailed ¶
func (t *WebhookEvent) FromEventDomainFailed(v EventDomainFailed) error
FromEventDomainFailed overwrites any union data inside the WebhookEvent as the provided EventDomainFailed
func (*WebhookEvent) FromEventDomainVerified ¶
func (t *WebhookEvent) FromEventDomainVerified(v EventDomainVerified) error
FromEventDomainVerified overwrites any union data inside the WebhookEvent as the provided EventDomainVerified
func (*WebhookEvent) FromEventEmailAccepted ¶
func (t *WebhookEvent) FromEventEmailAccepted(v EventEmailAccepted) error
FromEventEmailAccepted overwrites any union data inside the WebhookEvent as the provided EventEmailAccepted
func (*WebhookEvent) FromEventEmailBounced ¶
func (t *WebhookEvent) FromEventEmailBounced(v EventEmailBounced) error
FromEventEmailBounced overwrites any union data inside the WebhookEvent as the provided EventEmailBounced
func (*WebhookEvent) FromEventEmailCanceled ¶ added in v0.2.2
func (t *WebhookEvent) FromEventEmailCanceled(v EventEmailCanceled) error
FromEventEmailCanceled overwrites any union data inside the WebhookEvent as the provided EventEmailCanceled
func (*WebhookEvent) FromEventEmailClicked ¶
func (t *WebhookEvent) FromEventEmailClicked(v EventEmailClicked) error
FromEventEmailClicked overwrites any union data inside the WebhookEvent as the provided EventEmailClicked
func (*WebhookEvent) FromEventEmailComplained ¶
func (t *WebhookEvent) FromEventEmailComplained(v EventEmailComplained) error
FromEventEmailComplained overwrites any union data inside the WebhookEvent as the provided EventEmailComplained
func (*WebhookEvent) FromEventEmailDeferred ¶
func (t *WebhookEvent) FromEventEmailDeferred(v EventEmailDeferred) error
FromEventEmailDeferred overwrites any union data inside the WebhookEvent as the provided EventEmailDeferred
func (*WebhookEvent) FromEventEmailDelivered ¶
func (t *WebhookEvent) FromEventEmailDelivered(v EventEmailDelivered) error
FromEventEmailDelivered overwrites any union data inside the WebhookEvent as the provided EventEmailDelivered
func (*WebhookEvent) FromEventEmailListUnsubscribed ¶
func (t *WebhookEvent) FromEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
FromEventEmailListUnsubscribed overwrites any union data inside the WebhookEvent as the provided EventEmailListUnsubscribed
func (*WebhookEvent) FromEventEmailOpened ¶
func (t *WebhookEvent) FromEventEmailOpened(v EventEmailOpened) error
FromEventEmailOpened overwrites any union data inside the WebhookEvent as the provided EventEmailOpened
func (*WebhookEvent) FromEventEmailOutOfBandBounce ¶
func (t *WebhookEvent) FromEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
FromEventEmailOutOfBandBounce overwrites any union data inside the WebhookEvent as the provided EventEmailOutOfBandBounce
func (*WebhookEvent) FromEventEmailProcessed ¶
func (t *WebhookEvent) FromEventEmailProcessed(v EventEmailProcessed) error
FromEventEmailProcessed overwrites any union data inside the WebhookEvent as the provided EventEmailProcessed
func (*WebhookEvent) FromEventEmailReceived ¶
func (t *WebhookEvent) FromEventEmailReceived(v EventEmailReceived) error
FromEventEmailReceived overwrites any union data inside the WebhookEvent as the provided EventEmailReceived
func (*WebhookEvent) FromEventEmailRejected ¶
func (t *WebhookEvent) FromEventEmailRejected(v EventEmailRejected) error
FromEventEmailRejected overwrites any union data inside the WebhookEvent as the provided EventEmailRejected
func (*WebhookEvent) FromEventEmailScheduled ¶ added in v0.2.2
func (t *WebhookEvent) FromEventEmailScheduled(v EventEmailScheduled) error
FromEventEmailScheduled overwrites any union data inside the WebhookEvent as the provided EventEmailScheduled
func (*WebhookEvent) FromEventEmailSuppressionCreated ¶
func (t *WebhookEvent) FromEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
FromEventEmailSuppressionCreated overwrites any union data inside the WebhookEvent as the provided EventEmailSuppressionCreated
func (*WebhookEvent) FromEventEmailUnsubscribed ¶
func (t *WebhookEvent) FromEventEmailUnsubscribed(v EventEmailUnsubscribed) error
FromEventEmailUnsubscribed overwrites any union data inside the WebhookEvent as the provided EventEmailUnsubscribed
func (*WebhookEvent) FromEventSMSAccepted ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSAccepted(v EventSMSAccepted) error
FromEventSMSAccepted overwrites any union data inside the WebhookEvent as the provided EventSMSAccepted
func (*WebhookEvent) FromEventSMSDelivered ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSDelivered(v EventSMSDelivered) error
FromEventSMSDelivered overwrites any union data inside the WebhookEvent as the provided EventSMSDelivered
func (*WebhookEvent) FromEventSMSExpired ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSExpired(v EventSMSExpired) error
FromEventSMSExpired overwrites any union data inside the WebhookEvent as the provided EventSMSExpired
func (*WebhookEvent) FromEventSMSFailed ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSFailed(v EventSMSFailed) error
FromEventSMSFailed overwrites any union data inside the WebhookEvent as the provided EventSMSFailed
func (*WebhookEvent) FromEventSMSRejected ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSRejected(v EventSMSRejected) error
FromEventSMSRejected overwrites any union data inside the WebhookEvent as the provided EventSMSRejected
func (*WebhookEvent) FromEventSMSSent ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSSent(v EventSMSSent) error
FromEventSMSSent overwrites any union data inside the WebhookEvent as the provided EventSMSSent
func (*WebhookEvent) FromEventSMSUndelivered ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSUndelivered(v EventSMSUndelivered) error
FromEventSMSUndelivered overwrites any union data inside the WebhookEvent as the provided EventSMSUndelivered
func (WebhookEvent) MarshalJSON ¶
func (t WebhookEvent) MarshalJSON() ([]byte, error)
func (*WebhookEvent) MergeEventDomainFailed ¶
func (t *WebhookEvent) MergeEventDomainFailed(v EventDomainFailed) error
MergeEventDomainFailed performs a merge with any union data inside the WebhookEvent, using the provided EventDomainFailed
func (*WebhookEvent) MergeEventDomainVerified ¶
func (t *WebhookEvent) MergeEventDomainVerified(v EventDomainVerified) error
MergeEventDomainVerified performs a merge with any union data inside the WebhookEvent, using the provided EventDomainVerified
func (*WebhookEvent) MergeEventEmailAccepted ¶
func (t *WebhookEvent) MergeEventEmailAccepted(v EventEmailAccepted) error
MergeEventEmailAccepted performs a merge with any union data inside the WebhookEvent, using the provided EventEmailAccepted
func (*WebhookEvent) MergeEventEmailBounced ¶
func (t *WebhookEvent) MergeEventEmailBounced(v EventEmailBounced) error
MergeEventEmailBounced performs a merge with any union data inside the WebhookEvent, using the provided EventEmailBounced
func (*WebhookEvent) MergeEventEmailCanceled ¶ added in v0.2.2
func (t *WebhookEvent) MergeEventEmailCanceled(v EventEmailCanceled) error
MergeEventEmailCanceled performs a merge with any union data inside the WebhookEvent, using the provided EventEmailCanceled
func (*WebhookEvent) MergeEventEmailClicked ¶
func (t *WebhookEvent) MergeEventEmailClicked(v EventEmailClicked) error
MergeEventEmailClicked performs a merge with any union data inside the WebhookEvent, using the provided EventEmailClicked
func (*WebhookEvent) MergeEventEmailComplained ¶
func (t *WebhookEvent) MergeEventEmailComplained(v EventEmailComplained) error
MergeEventEmailComplained performs a merge with any union data inside the WebhookEvent, using the provided EventEmailComplained
func (*WebhookEvent) MergeEventEmailDeferred ¶
func (t *WebhookEvent) MergeEventEmailDeferred(v EventEmailDeferred) error
MergeEventEmailDeferred performs a merge with any union data inside the WebhookEvent, using the provided EventEmailDeferred
func (*WebhookEvent) MergeEventEmailDelivered ¶
func (t *WebhookEvent) MergeEventEmailDelivered(v EventEmailDelivered) error
MergeEventEmailDelivered performs a merge with any union data inside the WebhookEvent, using the provided EventEmailDelivered
func (*WebhookEvent) MergeEventEmailListUnsubscribed ¶
func (t *WebhookEvent) MergeEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
MergeEventEmailListUnsubscribed performs a merge with any union data inside the WebhookEvent, using the provided EventEmailListUnsubscribed
func (*WebhookEvent) MergeEventEmailOpened ¶
func (t *WebhookEvent) MergeEventEmailOpened(v EventEmailOpened) error
MergeEventEmailOpened performs a merge with any union data inside the WebhookEvent, using the provided EventEmailOpened
func (*WebhookEvent) MergeEventEmailOutOfBandBounce ¶
func (t *WebhookEvent) MergeEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
MergeEventEmailOutOfBandBounce performs a merge with any union data inside the WebhookEvent, using the provided EventEmailOutOfBandBounce
func (*WebhookEvent) MergeEventEmailProcessed ¶
func (t *WebhookEvent) MergeEventEmailProcessed(v EventEmailProcessed) error
MergeEventEmailProcessed performs a merge with any union data inside the WebhookEvent, using the provided EventEmailProcessed
func (*WebhookEvent) MergeEventEmailReceived ¶
func (t *WebhookEvent) MergeEventEmailReceived(v EventEmailReceived) error
MergeEventEmailReceived performs a merge with any union data inside the WebhookEvent, using the provided EventEmailReceived
func (*WebhookEvent) MergeEventEmailRejected ¶
func (t *WebhookEvent) MergeEventEmailRejected(v EventEmailRejected) error
MergeEventEmailRejected performs a merge with any union data inside the WebhookEvent, using the provided EventEmailRejected
func (*WebhookEvent) MergeEventEmailScheduled ¶ added in v0.2.2
func (t *WebhookEvent) MergeEventEmailScheduled(v EventEmailScheduled) error
MergeEventEmailScheduled performs a merge with any union data inside the WebhookEvent, using the provided EventEmailScheduled
func (*WebhookEvent) MergeEventEmailSuppressionCreated ¶
func (t *WebhookEvent) MergeEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
MergeEventEmailSuppressionCreated performs a merge with any union data inside the WebhookEvent, using the provided EventEmailSuppressionCreated
func (*WebhookEvent) MergeEventEmailUnsubscribed ¶
func (t *WebhookEvent) MergeEventEmailUnsubscribed(v EventEmailUnsubscribed) error
MergeEventEmailUnsubscribed performs a merge with any union data inside the WebhookEvent, using the provided EventEmailUnsubscribed
func (*WebhookEvent) MergeEventSMSAccepted ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSAccepted(v EventSMSAccepted) error
MergeEventSMSAccepted performs a merge with any union data inside the WebhookEvent, using the provided EventSMSAccepted
func (*WebhookEvent) MergeEventSMSDelivered ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSDelivered(v EventSMSDelivered) error
MergeEventSMSDelivered performs a merge with any union data inside the WebhookEvent, using the provided EventSMSDelivered
func (*WebhookEvent) MergeEventSMSExpired ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSExpired(v EventSMSExpired) error
MergeEventSMSExpired performs a merge with any union data inside the WebhookEvent, using the provided EventSMSExpired
func (*WebhookEvent) MergeEventSMSFailed ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSFailed(v EventSMSFailed) error
MergeEventSMSFailed performs a merge with any union data inside the WebhookEvent, using the provided EventSMSFailed
func (*WebhookEvent) MergeEventSMSRejected ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSRejected(v EventSMSRejected) error
MergeEventSMSRejected performs a merge with any union data inside the WebhookEvent, using the provided EventSMSRejected
func (*WebhookEvent) MergeEventSMSSent ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSSent(v EventSMSSent) error
MergeEventSMSSent performs a merge with any union data inside the WebhookEvent, using the provided EventSMSSent
func (*WebhookEvent) MergeEventSMSUndelivered ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSUndelivered(v EventSMSUndelivered) error
MergeEventSMSUndelivered performs a merge with any union data inside the WebhookEvent, using the provided EventSMSUndelivered
func (*WebhookEvent) UnmarshalJSON ¶
func (t *WebhookEvent) UnmarshalJSON(b []byte) error
func (WebhookEvent) ValueByDiscriminator ¶
func (t WebhookEvent) ValueByDiscriminator() (interface{}, error)
type WebhookEventID ¶ added in v0.2.0
type WebhookEventID = string
WebhookEventID defines model for WebhookEventID.
type WebhookEventType ¶
type WebhookEventType = string
WebhookEventType Webhook event type. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
type WebhookReplayRequest ¶
type WebhookReplayRequest struct {
// Since Replay events created at or after this timestamp. Defaults to 24h ago when omitted.
Since *time.Time `json:"since,omitempty"`
// Until Replay events created before or at this timestamp. Omit to bound only by `since`.
Until *time.Time `json:"until,omitempty"`
}
WebhookReplayRequest defines model for WebhookReplayRequest.
type WebhookRotateSecretResponse ¶
type WebhookRotateSecretResponse struct {
// Secret The new signing secret (whsec_ prefix). Store this immediately — it is not shown again.
Secret string `json:"secret" pii:"true"`
}
WebhookRotateSecretResponse defines model for WebhookRotateSecretResponse.
type WebhookTestRequest ¶
type WebhookTestRequest struct {
// EventType Event type to simulate. Defaults to a generic test ping if omitted.
EventType *string `json:"event_type,omitempty"`
}
WebhookTestRequest defines model for WebhookTestRequest.
type WebhookTestResponse ¶
type WebhookTestResponse struct {
// Error A short explanation of why the event could not be delivered. Present only when your endpoint could not be reached.
Error *string `json:"error,omitempty"`
// EventPayload Discriminated union of every webhook event the Bird platform emits.
// Each variant is the full delivery body: `type` names the event, `timestamp` is when the event occurred, and `data` carries the event-specific payload. The `type` property selects the variant — SDKs that consume this schema (openapi-typescript, oapi-codegen) generate a narrowed union keyed on `type`, so customer code can switch on the event id and access the variant-specific payload fields without casting.
// Delivery metadata (the event id and per-attempt signature headers) rides in HTTP headers per Standard Webhooks and is handled by the SDK's webhook verification helper, which returns one of these variants.
EventPayload *WebhookEvent `json:"event_payload,omitempty"`
// ResponseBody Response body returned by your endpoint, truncated when oversized. Empty when no body was returned.
ResponseBody *string `json:"response_body,omitempty"`
// ResponseDurationMs Round-trip delivery latency in milliseconds.
ResponseDurationMs int `json:"response_duration_ms"`
// ResponseStatusCode HTTP status returned by your endpoint. Null when no response was received (timeout, connection error, DNS failure).
ResponseStatusCode *int `json:"response_status_code"`
// Status Whether your endpoint accepted the test event. `delivered` means it returned a 2xx status; `failed` means it returned a non-2xx status or could not be reached.
Status WebhookTestResponseStatus `json:"status"`
}
WebhookTestResponse defines model for WebhookTestResponse.
type WebhookTestResponseStatus ¶
type WebhookTestResponseStatus string
WebhookTestResponseStatus Whether your endpoint accepted the test event. `delivered` means it returned a 2xx status; `failed` means it returned a non-2xx status or could not be reached.
const ( WebhookTestResponseStatusDelivered WebhookTestResponseStatus = "delivered" WebhookTestResponseStatusFailed WebhookTestResponseStatus = "failed" )
Defines values for WebhookTestResponseStatus.
func (WebhookTestResponseStatus) Valid ¶
func (e WebhookTestResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookTestResponseStatus enum.
type XWorkspaceId ¶ added in v0.3.0
type XWorkspaceId = string
XWorkspaceId defines model for XWorkspaceId.