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 NewGetEmailMessageRequest(server string, messageId EmailID) (*http.Request, error)
- func NewListEmailMessagesRequest(server string, params *ListEmailMessagesParams) (*http.Request, error)
- type BadRequest
- 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) GetEmailMessage(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListEmailMessages(ctx context.Context, params *ListEmailMessagesParams, ...) (*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) GetEmailMessageWithResponse(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*GetEmailMessageResponse, error)
- func (c *ClientWithResponses) ListEmailMessagesWithResponse(ctx context.Context, params *ListEmailMessagesParams, ...) (*ListEmailMessagesResponse, error)
- type ClientWithResponsesInterface
- type CreateEmailMessageBatchJSONRequestBody
- type CreateEmailMessageBatchParams
- type CreateEmailMessageBatchResponse
- type CreateEmailMessageJSONRequestBody
- type CreateEmailMessageParams
- type CreateEmailMessageResponse
- type CreatedAfter
- type CreatedBefore
- 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 EmailRecipientList
- type EmailRecipientRejectionReason
- type EmailRecipientStatus
- type EmailRejectionReason
- type EmailTag
- type EndingBefore
- type Error
- type ErrorBody
- type ErrorBodyType
- type ErrorDetail
- type EventDomainFailed
- type EventDomainFailedType
- type EventDomainVerified
- type EventDomainVerifiedType
- type EventEmailAccepted
- type EventEmailAcceptedData
- type EventEmailAcceptedType
- type EventEmailBase
- type EventEmailBounced
- type EventEmailBouncedData
- type EventEmailBouncedType
- 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 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 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 Gone
- type HttpRequestDoer
- type IdempotencyKey
- type InboundEmailMessageID
- type IncludeTotal
- type InternalError
- type ListEmailMessagesParams
- type ListEmailMessagesParamsCategory
- type ListEmailMessagesParamsStatus
- type ListEmailMessagesResponse
- type NotFound
- type OrderDesc
- type PaginationLimit
- type PayloadTooLarge
- type PaymentRequired
- type PreconditionFailed
- type RateLimited
- type RecipientID
- type RecipientRole
- type RequestEditorFn
- type SMSError
- type SMSErrorCode
- type SMSMessageID
- type SMSTag
- type ServiceUnavailable
- type StartingAfter
- type Suppression
- type SuppressionAppliesTo
- type SuppressionCreate
- type SuppressionID
- type SuppressionList
- type SuppressionOrigin
- type SuppressionReason
- type SuppressionScope
- type SuppressionScopeType
- type Timestamps
- type TooEarly
- type Unauthorized
- type UnderscoreListEnvelope
- type UnderscoreListEnvelopeWithTotal
- type Unprocessable
- 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) 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) 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) 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) 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) 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) 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 WorkspaceEmailSettings
- type WorkspaceEmailSettingsUpdate
- type WorkspaceID
- type WorkspaceSettings
- type WorkspaceSettingsUpdate
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 NewGetEmailMessageRequest ¶
NewGetEmailMessageRequest generates requests for GetEmailMessage
func NewListEmailMessagesRequest ¶
func NewListEmailMessagesRequest(server string, params *ListEmailMessagesParams) (*http.Request, error)
NewListEmailMessagesRequest generates requests for ListEmailMessages
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) GetEmailMessage ¶
func (*Client) ListEmailMessages ¶
func (c *Client) ListEmailMessages(ctx context.Context, params *ListEmailMessagesParams, 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)
}
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) GetEmailMessageWithResponse ¶
func (c *ClientWithResponses) GetEmailMessageWithResponse(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*GetEmailMessageResponse, error)
GetEmailMessageWithResponse request returning *GetEmailMessageResponse
func (*ClientWithResponses) ListEmailMessagesWithResponse ¶
func (c *ClientWithResponses) ListEmailMessagesWithResponse(ctx context.Context, params *ListEmailMessagesParams, reqEditors ...RequestEditorFn) (*ListEmailMessagesResponse, error)
ListEmailMessagesWithResponse request returning *ListEmailMessagesResponse
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)
}
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 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 ( EmailEventRejectionReasonGenerationFailure EmailEventRejectionReason = "generation_failure" EmailEventRejectionReasonLessThannil EmailEventRejectionReason = "<nil>" EmailEventRejectionReasonPolicyRejection EmailEventRejectionReason = "policy_rejection" 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"`
// Status Aggregate delivery status derived from recipient states. `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 *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 *[]EmailTag `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"`
// 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.
Subject string `json:"subject"`
// 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 *[]EmailTag `json:"tags,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. `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 ( EmailMessageStatusAccepted EmailMessageStatus = "accepted" EmailMessageStatusBounced EmailMessageStatus = "bounced" EmailMessageStatusComplained EmailMessageStatus = "complained" EmailMessageStatusDeferred EmailMessageStatus = "deferred" EmailMessageStatusDelivered EmailMessageStatus = "delivered" EmailMessageStatusPartialFailure EmailMessageStatus = "partial_failure" EmailMessageStatusProcessed EmailMessageStatus = "processed" EmailMessageStatusRejected EmailMessageStatus = "rejected" )
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 {
// 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.
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 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.
const ( EmailRecipientRejectionReasonGenerationFailure EmailRecipientRejectionReason = "generation_failure" EmailRecipientRejectionReasonLessThannil EmailRecipientRejectionReason = "<nil>" EmailRecipientRejectionReasonPolicyRejection EmailRecipientRejectionReason = "policy_rejection" 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.
const ( GenerationFailure EmailRejectionReason = "generation_failure" PolicyRejection EmailRejectionReason = "policy_rejection" RecipientSuppressed EmailRejectionReason = "recipient_suppressed" TransmissionFailed 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 EmailTag ¶
type EmailTag 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"`
}
EmailTag Structured key/value tag attached to an email send. 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 EmailMessageSendRequest for the array maximum.
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"`
// Param Identifies the offending field. Omitted when not applicable.
Param *string `json:"param,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 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 *[]EmailTag `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 *[]EmailTag `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 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 *[]EmailTag `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 *[]EmailTag `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 *[]EmailTag `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 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 *[]EmailTag `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 *[]EmailTag `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.
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 *[]EmailTag `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 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 *[]SMSTag `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 *[]SMSTag `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 *[]SMSTag `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 *[]SMSTag `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 *[]SMSTag `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 *[]SMSTag `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 HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InboundEmailMessageID ¶ added in v0.2.0
type InboundEmailMessageID = string
InboundEmailMessageID defines model for InboundEmailMessageID.
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`). For filtering on arbitrary `metadata` fields, use the metadata path-filter parameters instead.
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 ( ListEmailMessagesParamsStatusAccepted ListEmailMessagesParamsStatus = "accepted" ListEmailMessagesParamsStatusBounced ListEmailMessagesParamsStatus = "bounced" ListEmailMessagesParamsStatusComplained ListEmailMessagesParamsStatus = "complained" ListEmailMessagesParamsStatusDeferred ListEmailMessagesParamsStatus = "deferred" ListEmailMessagesParamsStatusDelivered ListEmailMessagesParamsStatus = "delivered" ListEmailMessagesParamsStatusPartialFailure ListEmailMessagesParamsStatus = "partial_failure" ListEmailMessagesParamsStatusProcessed ListEmailMessagesParamsStatus = "processed" ListEmailMessagesParamsStatusRejected ListEmailMessagesParamsStatus = "rejected" )
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 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 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 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 SMSMessageID ¶ added in v0.2.0
type SMSMessageID = string
SMSMessageID defines model for SMSMessageID.
type SMSTag ¶ added in v0.2.0
type SMSTag 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"`
}
SMSTag Structured key/value tag attached to an SMS message. Surfaces in list filters, the event log, and webhook payloads. Use tags for low-cardinality filtering dimensions (category, experiment 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 SMSMessageSendRequest for the array maximum.
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 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 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) 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) 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) 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) 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) 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) 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 WorkspaceEmailSettings ¶
type WorkspaceEmailSettings struct {
// StorageEnabled Whether the content of outgoing email — the HTML and text body and any attachments — is retained so it can be retrieved later through the message content endpoint. When disabled, only message metadata is kept.
StorageEnabled bool `json:"storage_enabled"`
}
WorkspaceEmailSettings defines model for WorkspaceEmailSettings.
type WorkspaceEmailSettingsUpdate ¶
type WorkspaceEmailSettingsUpdate struct {
// StorageEnabled Whether the content of outgoing email — the HTML and text body and any attachments — is retained so it can be retrieved later through the message content endpoint. When disabled, only message metadata is kept.
StorageEnabled *bool `json:"storage_enabled,omitempty"`
}
WorkspaceEmailSettingsUpdate defines model for WorkspaceEmailSettingsUpdate.
type WorkspaceSettings ¶
type WorkspaceSettings struct {
Email WorkspaceEmailSettings `json:"email"`
}
WorkspaceSettings defines model for WorkspaceSettings.
type WorkspaceSettingsUpdate ¶
type WorkspaceSettingsUpdate struct {
Email *WorkspaceEmailSettingsUpdate `json:"email,omitempty"`
}
WorkspaceSettingsUpdate defines model for WorkspaceSettingsUpdate.