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 NewArchiveContactPropertyRequest(server string, propertyId ContactPropertyID, ...) (*http.Request, error)
- func NewAssignAudienceContactsRequest(server string, audienceId AudienceID, params *AssignAudienceContactsParams, ...) (*http.Request, error)
- func NewAssignAudienceContactsRequestWithBody(server string, audienceId AudienceID, params *AssignAudienceContactsParams, ...) (*http.Request, error)
- func NewCancelEmailMessageRequest(server string, messageId EmailID, params *CancelEmailMessageParams) (*http.Request, error)
- func NewCreateAudienceRequest(server string, params *CreateAudienceParams, ...) (*http.Request, error)
- func NewCreateAudienceRequestWithBody(server string, params *CreateAudienceParams, contentType string, ...) (*http.Request, error)
- func NewCreateContactBatchRequest(server string, params *CreateContactBatchParams, ...) (*http.Request, error)
- func NewCreateContactBatchRequestWithBody(server string, params *CreateContactBatchParams, contentType string, ...) (*http.Request, error)
- func NewCreateContactPropertyRequest(server string, params *CreateContactPropertyParams, ...) (*http.Request, error)
- func NewCreateContactPropertyRequestWithBody(server string, params *CreateContactPropertyParams, contentType string, ...) (*http.Request, error)
- func NewCreateContactRequest(server string, params *CreateContactParams, body CreateContactJSONRequestBody) (*http.Request, error)
- func NewCreateContactRequestWithBody(server string, params *CreateContactParams, contentType string, body io.Reader) (*http.Request, error)
- 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 NewCreateSMSMessageBatchRequest(server string, params *CreateSMSMessageBatchParams, ...) (*http.Request, error)
- func NewCreateSMSMessageBatchRequestWithBody(server string, params *CreateSMSMessageBatchParams, contentType string, ...) (*http.Request, error)
- func NewCreateSMSMessageRequest(server string, params *CreateSMSMessageParams, ...) (*http.Request, error)
- func NewCreateSMSMessageRequestWithBody(server string, params *CreateSMSMessageParams, contentType string, ...) (*http.Request, error)
- func NewDeleteAudienceRequest(server string, audienceId AudienceID, params *DeleteAudienceParams) (*http.Request, error)
- func NewDeleteContactRequest(server string, contactId ContactID, params *DeleteContactParams) (*http.Request, error)
- func NewGetAudienceRequest(server string, audienceId AudienceID) (*http.Request, error)
- func NewGetContactPropertyRequest(server string, propertyId ContactPropertyID) (*http.Request, error)
- func NewGetContactRequest(server string, contactId ContactID) (*http.Request, error)
- func NewGetEmailMessageRequest(server string, messageId EmailID) (*http.Request, error)
- func NewGetSMSMessageRequest(server string, messageId SMSMessageID) (*http.Request, error)
- func NewGetSMSTemplateRequest(server string, templateRef string) (*http.Request, error)
- func NewGetWhatsAppMessageRequest(server string, messageId WhatsAppMessageID) (*http.Request, error)
- func NewListAudienceContactsRequest(server string, audienceId AudienceID, params *ListAudienceContactsParams) (*http.Request, error)
- func NewListAudiencesRequest(server string, params *ListAudiencesParams) (*http.Request, error)
- func NewListContactPropertiesRequest(server string, params *ListContactPropertiesParams) (*http.Request, error)
- func NewListContactsRequest(server string, params *ListContactsParams) (*http.Request, error)
- func NewListEmailMessagesRequest(server string, params *ListEmailMessagesParams) (*http.Request, error)
- func NewListSMSMessagesRequest(server string, params *ListSMSMessagesParams) (*http.Request, error)
- func NewListSMSTemplatesRequest(server string, params *ListSMSTemplatesParams) (*http.Request, error)
- func NewListWhatsAppMessageEventsRequest(server string, messageId WhatsAppMessageID, ...) (*http.Request, error)
- func NewListWhatsAppMessagesRequest(server string, params *ListWhatsAppMessagesParams) (*http.Request, error)
- func NewListWhatsAppTemplatesRequest(server string) (*http.Request, error)
- func NewSendWhatsAppMessageRequest(server string, params *SendWhatsAppMessageParams, ...) (*http.Request, error)
- func NewSendWhatsAppMessageRequestWithBody(server string, params *SendWhatsAppMessageParams, contentType string, ...) (*http.Request, error)
- func NewUnarchiveContactPropertyRequest(server string, propertyId ContactPropertyID, ...) (*http.Request, error)
- func NewUnassignAudienceContactRequest(server string, audienceId AudienceID, contactId ContactID, ...) (*http.Request, error)
- func NewUnassignAudienceContactsRequest(server string, audienceId AudienceID, params *UnassignAudienceContactsParams, ...) (*http.Request, error)
- func NewUnassignAudienceContactsRequestWithBody(server string, audienceId AudienceID, params *UnassignAudienceContactsParams, ...) (*http.Request, error)
- func NewUpdateAudienceRequest(server string, audienceId AudienceID, params *UpdateAudienceParams, ...) (*http.Request, error)
- func NewUpdateAudienceRequestWithBody(server string, audienceId AudienceID, params *UpdateAudienceParams, ...) (*http.Request, error)
- func NewUpdateContactPropertyRequest(server string, propertyId ContactPropertyID, ...) (*http.Request, error)
- func NewUpdateContactPropertyRequestWithBody(server string, propertyId ContactPropertyID, ...) (*http.Request, error)
- func NewUpdateContactRequest(server string, contactId ContactID, params *UpdateContactParams, ...) (*http.Request, error)
- func NewUpdateContactRequestWithBody(server string, contactId ContactID, params *UpdateContactParams, ...) (*http.Request, error)
- type APIKeyID
- type AgentDomain
- type AgentDomainCreate
- type AgentDomainID
- type AgentDomainList
- type AgentDomainStatus
- type ArchiveContactPropertyParams
- type ArchiveContactPropertyResponse
- type AssignAudienceContactsJSONRequestBody
- type AssignAudienceContactsParams
- type AssignAudienceContactsResponse
- type Audience
- type AudienceContactsAddRequest
- type AudienceContactsRemoveRequest
- type AudienceCreateRequest
- type AudienceCreateRequestType
- type AudienceID
- type AudienceList
- type AudienceMember
- type AudienceMemberList
- type AudienceType
- type AudienceUpdateRequest
- type BadRequest
- type CancelEmailMessageParams
- type CancelEmailMessageResponse
- type Client
- func (c *Client) ArchiveContactProperty(ctx context.Context, propertyId ContactPropertyID, ...) (*http.Response, error)
- func (c *Client) AssignAudienceContacts(ctx context.Context, audienceId AudienceID, ...) (*http.Response, error)
- func (c *Client) AssignAudienceContactsWithBody(ctx context.Context, audienceId AudienceID, ...) (*http.Response, error)
- func (c *Client) CancelEmailMessage(ctx context.Context, messageId EmailID, params *CancelEmailMessageParams, ...) (*http.Response, error)
- func (c *Client) CreateAudience(ctx context.Context, params *CreateAudienceParams, ...) (*http.Response, error)
- func (c *Client) CreateAudienceWithBody(ctx context.Context, params *CreateAudienceParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateContact(ctx context.Context, params *CreateContactParams, ...) (*http.Response, error)
- func (c *Client) CreateContactBatch(ctx context.Context, params *CreateContactBatchParams, ...) (*http.Response, error)
- func (c *Client) CreateContactBatchWithBody(ctx context.Context, params *CreateContactBatchParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateContactProperty(ctx context.Context, params *CreateContactPropertyParams, ...) (*http.Response, error)
- func (c *Client) CreateContactPropertyWithBody(ctx context.Context, params *CreateContactPropertyParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateContactWithBody(ctx context.Context, params *CreateContactParams, contentType string, ...) (*http.Response, error)
- 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) CreateSMSMessage(ctx context.Context, params *CreateSMSMessageParams, ...) (*http.Response, error)
- func (c *Client) CreateSMSMessageBatch(ctx context.Context, params *CreateSMSMessageBatchParams, ...) (*http.Response, error)
- func (c *Client) CreateSMSMessageBatchWithBody(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateSMSMessageWithBody(ctx context.Context, params *CreateSMSMessageParams, contentType string, ...) (*http.Response, error)
- func (c *Client) DeleteAudience(ctx context.Context, audienceId AudienceID, params *DeleteAudienceParams, ...) (*http.Response, error)
- func (c *Client) DeleteContact(ctx context.Context, contactId ContactID, params *DeleteContactParams, ...) (*http.Response, error)
- func (c *Client) GetAudience(ctx context.Context, audienceId AudienceID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetContact(ctx context.Context, contactId ContactID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetContactProperty(ctx context.Context, propertyId ContactPropertyID, ...) (*http.Response, error)
- func (c *Client) GetEmailMessage(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSMSMessage(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSMSTemplate(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetWhatsAppMessage(ctx context.Context, messageId WhatsAppMessageID, ...) (*http.Response, error)
- func (c *Client) ListAudienceContacts(ctx context.Context, audienceId AudienceID, params *ListAudienceContactsParams, ...) (*http.Response, error)
- func (c *Client) ListAudiences(ctx context.Context, params *ListAudiencesParams, ...) (*http.Response, error)
- func (c *Client) ListContactProperties(ctx context.Context, params *ListContactPropertiesParams, ...) (*http.Response, error)
- func (c *Client) ListContacts(ctx context.Context, params *ListContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListEmailMessages(ctx context.Context, params *ListEmailMessagesParams, ...) (*http.Response, error)
- func (c *Client) ListSMSMessages(ctx context.Context, params *ListSMSMessagesParams, ...) (*http.Response, error)
- func (c *Client) ListSMSTemplates(ctx context.Context, params *ListSMSTemplatesParams, ...) (*http.Response, error)
- func (c *Client) ListWhatsAppMessageEvents(ctx context.Context, messageId WhatsAppMessageID, ...) (*http.Response, error)
- func (c *Client) ListWhatsAppMessages(ctx context.Context, params *ListWhatsAppMessagesParams, ...) (*http.Response, error)
- func (c *Client) ListWhatsAppTemplates(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SendWhatsAppMessage(ctx context.Context, params *SendWhatsAppMessageParams, ...) (*http.Response, error)
- func (c *Client) SendWhatsAppMessageWithBody(ctx context.Context, params *SendWhatsAppMessageParams, contentType string, ...) (*http.Response, error)
- func (c *Client) UnarchiveContactProperty(ctx context.Context, propertyId ContactPropertyID, ...) (*http.Response, error)
- func (c *Client) UnassignAudienceContact(ctx context.Context, audienceId AudienceID, contactId ContactID, ...) (*http.Response, error)
- func (c *Client) UnassignAudienceContacts(ctx context.Context, audienceId AudienceID, ...) (*http.Response, error)
- func (c *Client) UnassignAudienceContactsWithBody(ctx context.Context, audienceId AudienceID, ...) (*http.Response, error)
- func (c *Client) UpdateAudience(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, ...) (*http.Response, error)
- func (c *Client) UpdateAudienceWithBody(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, ...) (*http.Response, error)
- func (c *Client) UpdateContact(ctx context.Context, contactId ContactID, params *UpdateContactParams, ...) (*http.Response, error)
- func (c *Client) UpdateContactProperty(ctx context.Context, propertyId ContactPropertyID, ...) (*http.Response, error)
- func (c *Client) UpdateContactPropertyWithBody(ctx context.Context, propertyId ContactPropertyID, ...) (*http.Response, error)
- func (c *Client) UpdateContactWithBody(ctx context.Context, contactId ContactID, params *UpdateContactParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ArchiveContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, ...) (*ArchiveContactPropertyResponse, error)
- func (c *ClientWithResponses) AssignAudienceContactsWithBodyWithResponse(ctx context.Context, audienceId AudienceID, ...) (*AssignAudienceContactsResponse, error)
- func (c *ClientWithResponses) AssignAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, ...) (*AssignAudienceContactsResponse, error)
- func (c *ClientWithResponses) CancelEmailMessageWithResponse(ctx context.Context, messageId EmailID, params *CancelEmailMessageParams, ...) (*CancelEmailMessageResponse, error)
- func (c *ClientWithResponses) CreateAudienceWithBodyWithResponse(ctx context.Context, params *CreateAudienceParams, contentType string, ...) (*CreateAudienceResponse, error)
- func (c *ClientWithResponses) CreateAudienceWithResponse(ctx context.Context, params *CreateAudienceParams, ...) (*CreateAudienceResponse, error)
- func (c *ClientWithResponses) CreateContactBatchWithBodyWithResponse(ctx context.Context, params *CreateContactBatchParams, contentType string, ...) (*CreateContactBatchResponse, error)
- func (c *ClientWithResponses) CreateContactBatchWithResponse(ctx context.Context, params *CreateContactBatchParams, ...) (*CreateContactBatchResponse, error)
- func (c *ClientWithResponses) CreateContactPropertyWithBodyWithResponse(ctx context.Context, params *CreateContactPropertyParams, contentType string, ...) (*CreateContactPropertyResponse, error)
- func (c *ClientWithResponses) CreateContactPropertyWithResponse(ctx context.Context, params *CreateContactPropertyParams, ...) (*CreateContactPropertyResponse, error)
- func (c *ClientWithResponses) CreateContactWithBodyWithResponse(ctx context.Context, params *CreateContactParams, contentType string, ...) (*CreateContactResponse, error)
- func (c *ClientWithResponses) CreateContactWithResponse(ctx context.Context, params *CreateContactParams, ...) (*CreateContactResponse, error)
- 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) CreateSMSMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, ...) (*CreateSMSMessageBatchResponse, error)
- func (c *ClientWithResponses) CreateSMSMessageBatchWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, ...) (*CreateSMSMessageBatchResponse, error)
- func (c *ClientWithResponses) CreateSMSMessageWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageParams, contentType string, ...) (*CreateSMSMessageResponse, error)
- func (c *ClientWithResponses) CreateSMSMessageWithResponse(ctx context.Context, params *CreateSMSMessageParams, ...) (*CreateSMSMessageResponse, error)
- func (c *ClientWithResponses) DeleteAudienceWithResponse(ctx context.Context, audienceId AudienceID, params *DeleteAudienceParams, ...) (*DeleteAudienceResponse, error)
- func (c *ClientWithResponses) DeleteContactWithResponse(ctx context.Context, contactId ContactID, params *DeleteContactParams, ...) (*DeleteContactResponse, error)
- func (c *ClientWithResponses) GetAudienceWithResponse(ctx context.Context, audienceId AudienceID, reqEditors ...RequestEditorFn) (*GetAudienceResponse, error)
- func (c *ClientWithResponses) GetContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, ...) (*GetContactPropertyResponse, error)
- func (c *ClientWithResponses) GetContactWithResponse(ctx context.Context, contactId ContactID, reqEditors ...RequestEditorFn) (*GetContactResponse, error)
- func (c *ClientWithResponses) GetEmailMessageWithResponse(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*GetEmailMessageResponse, error)
- func (c *ClientWithResponses) GetSMSMessageWithResponse(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*GetSMSMessageResponse, error)
- func (c *ClientWithResponses) GetSMSTemplateWithResponse(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*GetSMSTemplateResponse, error)
- func (c *ClientWithResponses) GetWhatsAppMessageWithResponse(ctx context.Context, messageId WhatsAppMessageID, ...) (*GetWhatsAppMessageResponse, error)
- func (c *ClientWithResponses) ListAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, params *ListAudienceContactsParams, ...) (*ListAudienceContactsResponse, error)
- func (c *ClientWithResponses) ListAudiencesWithResponse(ctx context.Context, params *ListAudiencesParams, ...) (*ListAudiencesResponse, error)
- func (c *ClientWithResponses) ListContactPropertiesWithResponse(ctx context.Context, params *ListContactPropertiesParams, ...) (*ListContactPropertiesResponse, error)
- func (c *ClientWithResponses) ListContactsWithResponse(ctx context.Context, params *ListContactsParams, reqEditors ...RequestEditorFn) (*ListContactsResponse, error)
- func (c *ClientWithResponses) ListEmailMessagesWithResponse(ctx context.Context, params *ListEmailMessagesParams, ...) (*ListEmailMessagesResponse, error)
- func (c *ClientWithResponses) ListSMSMessagesWithResponse(ctx context.Context, params *ListSMSMessagesParams, ...) (*ListSMSMessagesResponse, error)
- func (c *ClientWithResponses) ListSMSTemplatesWithResponse(ctx context.Context, params *ListSMSTemplatesParams, ...) (*ListSMSTemplatesResponse, error)
- func (c *ClientWithResponses) ListWhatsAppMessageEventsWithResponse(ctx context.Context, messageId WhatsAppMessageID, ...) (*ListWhatsAppMessageEventsResponse, error)
- func (c *ClientWithResponses) ListWhatsAppMessagesWithResponse(ctx context.Context, params *ListWhatsAppMessagesParams, ...) (*ListWhatsAppMessagesResponse, error)
- func (c *ClientWithResponses) ListWhatsAppTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWhatsAppTemplatesResponse, error)
- func (c *ClientWithResponses) SendWhatsAppMessageWithBodyWithResponse(ctx context.Context, params *SendWhatsAppMessageParams, contentType string, ...) (*SendWhatsAppMessageResponse, error)
- func (c *ClientWithResponses) SendWhatsAppMessageWithResponse(ctx context.Context, params *SendWhatsAppMessageParams, ...) (*SendWhatsAppMessageResponse, error)
- func (c *ClientWithResponses) UnarchiveContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, ...) (*UnarchiveContactPropertyResponse, error)
- func (c *ClientWithResponses) UnassignAudienceContactWithResponse(ctx context.Context, audienceId AudienceID, contactId ContactID, ...) (*UnassignAudienceContactResponse, error)
- func (c *ClientWithResponses) UnassignAudienceContactsWithBodyWithResponse(ctx context.Context, audienceId AudienceID, ...) (*UnassignAudienceContactsResponse, error)
- func (c *ClientWithResponses) UnassignAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, ...) (*UnassignAudienceContactsResponse, error)
- func (c *ClientWithResponses) UpdateAudienceWithBodyWithResponse(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, ...) (*UpdateAudienceResponse, error)
- func (c *ClientWithResponses) UpdateAudienceWithResponse(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, ...) (*UpdateAudienceResponse, error)
- func (c *ClientWithResponses) UpdateContactPropertyWithBodyWithResponse(ctx context.Context, propertyId ContactPropertyID, ...) (*UpdateContactPropertyResponse, error)
- func (c *ClientWithResponses) UpdateContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, ...) (*UpdateContactPropertyResponse, error)
- func (c *ClientWithResponses) UpdateContactWithBodyWithResponse(ctx context.Context, contactId ContactID, params *UpdateContactParams, ...) (*UpdateContactResponse, error)
- func (c *ClientWithResponses) UpdateContactWithResponse(ctx context.Context, contactId ContactID, params *UpdateContactParams, ...) (*UpdateContactResponse, error)
- type ClientWithResponsesInterface
- type Conflict
- type Contact
- type ContactCreateRequest
- type ContactID
- type ContactList
- type ContactProperty
- type ContactPropertyCreateRequest
- type ContactPropertyCreateRequestType
- type ContactPropertyID
- type ContactPropertyList
- type ContactPropertyType
- type ContactPropertyUpdateRequest
- type ContactUpdateRequest
- type ContactUpsertError
- type ContactUpsertRequest
- type ContactUpsertRequestDataMode
- type ContactUpsertResult
- type ContactUpsertResultItem
- type ContactUpsertResultItemStatus
- type CreateAudienceJSONRequestBody
- type CreateAudienceParams
- type CreateAudienceResponse
- type CreateContactBatchJSONRequestBody
- type CreateContactBatchParams
- type CreateContactBatchResponse
- type CreateContactJSONRequestBody
- type CreateContactParams
- type CreateContactPropertyJSONRequestBody
- type CreateContactPropertyParams
- type CreateContactPropertyResponse
- type CreateContactResponse
- type CreateEmailMessageBatchJSONRequestBody
- type CreateEmailMessageBatchParams
- type CreateEmailMessageBatchResponse
- type CreateEmailMessageJSONRequestBody
- type CreateEmailMessageParams
- type CreateEmailMessageResponse
- type CreateSMSMessageBatchJSONRequestBody
- type CreateSMSMessageBatchParams
- type CreateSMSMessageBatchResponse
- type CreateSMSMessageJSONRequestBody
- type CreateSMSMessageParams
- type CreateSMSMessageResponse
- type CreatedAfter
- type CreatedBefore
- type CurrencyCode
- type DeleteAudienceParams
- type DeleteAudienceResponse
- type DeleteContactParams
- type DeleteContactResponse
- type DocsSearchResponse
- type DocsSearchResult
- type EmailAddress
- type EmailAddressInput
- func (t EmailAddressInput) AsEmailAddress() (EmailAddress, error)
- func (t EmailAddressInput) AsEmailAddressInput0() (EmailAddressInput0, error)
- func (t *EmailAddressInput) FromEmailAddress(v EmailAddress) error
- func (t *EmailAddressInput) FromEmailAddressInput0(v EmailAddressInput0) error
- func (t EmailAddressInput) MarshalJSON() ([]byte, error)
- func (t *EmailAddressInput) MergeEmailAddress(v EmailAddress) error
- func (t *EmailAddressInput) MergeEmailAddressInput0(v EmailAddressInput0) error
- func (t *EmailAddressInput) UnmarshalJSON(b []byte) error
- type EmailAddressInput0
- type EmailAttachment
- type EmailAttachmentID
- type EmailAttachmentRef
- type EmailBounceType
- type EmailEvent
- type EmailEventBounceType
- type EmailEventList
- type EmailEventRejectionReason
- type EmailEventType
- type EmailID
- type EmailInboundRouteID
- type EmailLabelsUpdate
- type EmailMailboxComposeRequest
- type EmailMailboxComposeRequestCategory
- type EmailMessage
- type EmailMessageBatchItem
- type EmailMessageBatchItemCategory
- type EmailMessageBatchItemStatus
- type EmailMessageBatchRequest
- type EmailMessageBatchResponse
- type EmailMessageCategory
- type EmailMessageContent
- type EmailMessageList
- type EmailMessageSendRequest
- type EmailMessageSendRequestCategory
- type EmailMessageStatus
- type EmailRecipient
- type EmailRecipientBounceType
- type EmailRecipientList
- type EmailRecipientRejectionReason
- type EmailRecipientStatus
- type EmailRejectionReason
- type EmailSmtpConfig
- type EmailSmtpConfigCategory
- type EmailSmtpConfigList
- type EmailSmtpConfigUpdate
- type EmailSmtpConfigUpdateCategory
- type EmailTemplateID
- type EmailTemplateSend
- func (t EmailTemplateSend) AsEmailTemplateSend0() (EmailTemplateSend0, error)
- func (t EmailTemplateSend) AsEmailTemplateSend1() (EmailTemplateSend1, error)
- func (t *EmailTemplateSend) FromEmailTemplateSend0(v EmailTemplateSend0) error
- func (t *EmailTemplateSend) FromEmailTemplateSend1(v EmailTemplateSend1) error
- func (t EmailTemplateSend) MarshalJSON() ([]byte, error)
- func (t *EmailTemplateSend) MergeEmailTemplateSend0(v EmailTemplateSend0) error
- func (t *EmailTemplateSend) MergeEmailTemplateSend1(v EmailTemplateSend1) error
- func (t *EmailTemplateSend) UnmarshalJSON(b []byte) error
- type EmailTemplateSend0
- type EmailTemplateSend1
- type EmailThread
- type EmailThreadLastDirection
- type EmailThreadList
- type EmailThreadMessage
- type EmailThreadMessageAttachment
- type EmailThreadMessageAttachmentList
- type EmailThreadMessageBody
- type EmailThreadMessageDirection
- type EmailThreadMessageDisposition
- type EmailThreadMessageForwardRequest
- type EmailThreadMessageForwardRequestCategory
- type EmailThreadMessageList
- type EmailThreadMessageRecipient
- type EmailThreadMessageRecipientStatus
- type EmailThreadMessageReplyRequest
- type EmailThreadMessageReplyRequestCategory
- type EmailThreadMessageSource
- type EmailThreadMessageUpdateRequest
- type EmailThreadUpdateRequest
- type EndingBefore
- type Error
- type ErrorBody
- type ErrorBodyType
- type ErrorDetail
- type ErrorNextAction
- type EventDomainFailed
- type EventDomainFailedType
- type EventDomainVerified
- type EventDomainVerifiedType
- type EventEmailAccepted
- type EventEmailAcceptedData
- type EventEmailAcceptedType
- type EventEmailBase
- type EventEmailBounced
- type EventEmailBouncedData
- type EventEmailBouncedType
- type EventEmailCanceled
- type EventEmailCanceledData
- type EventEmailCanceledType
- type EventEmailClicked
- type EventEmailClickedData
- type EventEmailClickedType
- type EventEmailComplained
- type EventEmailComplainedData
- type EventEmailComplainedType
- type EventEmailDeferred
- type EventEmailDeferredData
- type EventEmailDeferredType
- type EventEmailDelivered
- type EventEmailDeliveredData
- type EventEmailDeliveredType
- type EventEmailListUnsubscribed
- type EventEmailListUnsubscribedData
- type EventEmailListUnsubscribedType
- type EventEmailMailboxMessageDelivered
- type EventEmailMailboxMessageDeliveredData
- type EventEmailMailboxMessageDeliveredType
- type EventEmailMailboxMessageFailed
- type EventEmailMailboxMessageFailedData
- type EventEmailMailboxMessageFailedType
- type EventEmailMailboxMessageReceived
- type EventEmailMailboxMessageReceivedBlocked
- type EventEmailMailboxMessageReceivedBlockedType
- type EventEmailMailboxMessageReceivedData
- type EventEmailMailboxMessageReceivedDataDisposition
- type EventEmailMailboxMessageReceivedType
- type EventEmailMailboxMessageReceivedUnauthenticated
- type EventEmailMailboxMessageReceivedUnauthenticatedType
- type EventEmailMailboxMessageSent
- type EventEmailMailboxMessageSentData
- type EventEmailMailboxMessageSentType
- type EventEmailMailboxSuspended
- type EventEmailMailboxSuspendedData
- type EventEmailMailboxSuspendedType
- type EventEmailMailboxThreadCreated
- type EventEmailMailboxThreadCreatedData
- type EventEmailMailboxThreadCreatedDataInitiatedBy
- type EventEmailMailboxThreadCreatedType
- type EventEmailMessageBase
- type EventEmailOpened
- type EventEmailOpenedData
- type EventEmailOpenedType
- type EventEmailOutOfBandBounce
- type EventEmailOutOfBandBounceData
- type EventEmailOutOfBandBounceType
- type EventEmailProcessed
- type EventEmailProcessedData
- type EventEmailProcessedType
- type EventEmailReceived
- type EventEmailReceivedData
- type EventEmailReceivedType
- type EventEmailRejected
- type EventEmailRejectedData
- type EventEmailRejectedType
- type EventEmailScheduled
- type EventEmailScheduledData
- type EventEmailScheduledType
- type EventEmailSuppressionCreated
- type EventEmailSuppressionCreatedType
- type EventEmailUnsubscribed
- type EventEmailUnsubscribedData
- type EventEmailUnsubscribedType
- type EventSMSAccepted
- type EventSMSAcceptedData
- type EventSMSAcceptedType
- type EventSMSBase
- type EventSMSDelivered
- type EventSMSDeliveredData
- type EventSMSDeliveredType
- type EventSMSExpired
- type EventSMSExpiredData
- type EventSMSExpiredType
- type EventSMSFailed
- type EventSMSFailedData
- type EventSMSFailedType
- type EventSMSRejected
- type EventSMSRejectedData
- type EventSMSRejectedType
- type EventSMSSent
- type EventSMSSentData
- type EventSMSSentType
- type EventSMSUndelivered
- type EventSMSUndeliveredData
- type EventSMSUndeliveredType
- type Forbidden
- type GetAudienceResponse
- type GetContactPropertyResponse
- type GetContactResponse
- type GetEmailMessageResponse
- type GetSMSMessageResponse
- type GetSMSTemplateResponse
- type GetWhatsAppMessageResponse
- type Gone
- type HttpRequestDoer
- type IdempotencyKey
- type InboundAddress
- type InboundAddressCreate
- type InboundAddressID
- type InboundAddressList
- type InboundAddressUpdate
- type InboundAttachment
- type InboundAttachmentID
- type InboundAttachmentList
- type InboundEmailMessage
- type InboundEmailMessageBody
- type InboundEmailMessageID
- type InboundEmailMessageList
- type InboundRoute
- type InboundRouteAction
- type InboundRouteCreate
- type InboundRouteCreateAction
- type InboundRouteCreateMatchType
- type InboundRouteList
- type InboundRouteMatchType
- type InboundRouteUpdate
- type InboundRouteUpdateAction
- type InboundRouteUpdateMatchType
- type IncludeTotal
- type InternalError
- type ListAudienceContactsParams
- type ListAudienceContactsResponse
- type ListAudiencesParams
- type ListAudiencesResponse
- type ListContactPropertiesParams
- type ListContactPropertiesResponse
- type ListContactsParams
- type ListContactsResponse
- type ListEmailMessagesParams
- type ListEmailMessagesParamsCategory
- type ListEmailMessagesParamsStatus
- type ListEmailMessagesResponse
- type ListSMSMessagesParams
- type ListSMSMessagesParamsCategory
- type ListSMSMessagesParamsDirection
- type ListSMSMessagesResponse
- type ListSMSTemplatesParams
- type ListSMSTemplatesParamsCategory
- type ListSMSTemplatesParamsScope
- type ListSMSTemplatesResponse
- type ListWhatsAppMessageEventsParams
- type ListWhatsAppMessageEventsResponse
- type ListWhatsAppMessagesParams
- type ListWhatsAppMessagesResponse
- type ListWhatsAppTemplatesResponse
- type Mailbox
- type MailboxChannel
- type MailboxCreate
- type MailboxCreateReceivePolicy
- type MailboxCreateRetentionTier
- type MailboxID
- type MailboxList
- type MailboxOwner
- type MailboxOwnerType
- type MailboxReceivePolicy
- type MailboxRetentionTier
- type MailboxState
- type MailboxUpdate
- type MailboxUpdateReceivePolicy
- type MailboxUpdateRetentionTier
- type NotFound
- type OrderDesc
- type PaginationLimit
- type PayloadTooLarge
- type PaymentRequired
- type PreconditionFailed
- type RateLimited
- type ReceiveRule
- type ReceiveRuleAction
- type ReceiveRuleCreate
- type ReceiveRuleCreateAction
- type ReceiveRuleEntryType
- type ReceiveRuleID
- type ReceiveRuleList
- type RecipientID
- type RecipientRole
- type RequestEditorFn
- type SMSBatchSummary
- type SMSCost
- type SMSCostBreakdown
- type SMSError
- type SMSErrorCode
- type SMSMessage
- type SMSMessageBatchRequest
- type SMSMessageBatchResponse
- type SMSMessageCategory
- type SMSMessageDirection
- type SMSMessageID
- type SMSMessageList
- type SMSMessageSendRequest
- func (t SMSMessageSendRequest) AsSMSMessageSendRequest0() (SMSMessageSendRequest0, error)
- func (t SMSMessageSendRequest) AsSMSMessageSendRequest1() (SMSMessageSendRequest1, error)
- func (t *SMSMessageSendRequest) FromSMSMessageSendRequest0(v SMSMessageSendRequest0) error
- func (t *SMSMessageSendRequest) FromSMSMessageSendRequest1(v SMSMessageSendRequest1) error
- func (t SMSMessageSendRequest) MarshalJSON() ([]byte, error)
- func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest0(v SMSMessageSendRequest0) error
- func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest1(v SMSMessageSendRequest1) error
- func (t *SMSMessageSendRequest) UnmarshalJSON(b []byte) error
- type SMSMessageSendRequest0
- type SMSMessageSendRequest1
- type SMSMessageStatus
- type SMSSegments
- type SMSSegmentsEncoding
- type SMSTemplate
- type SMSTemplateID
- type SMSTemplateList
- type SMSTemplateSend
- func (t SMSTemplateSend) AsSMSTemplateSend0() (SMSTemplateSend0, error)
- func (t SMSTemplateSend) AsSMSTemplateSend1() (SMSTemplateSend1, error)
- func (t *SMSTemplateSend) FromSMSTemplateSend0(v SMSTemplateSend0) error
- func (t *SMSTemplateSend) FromSMSTemplateSend1(v SMSTemplateSend1) error
- func (t SMSTemplateSend) MarshalJSON() ([]byte, error)
- func (t *SMSTemplateSend) MergeSMSTemplateSend0(v SMSTemplateSend0) error
- func (t *SMSTemplateSend) MergeSMSTemplateSend1(v SMSTemplateSend1) error
- func (t *SMSTemplateSend) UnmarshalJSON(b []byte) error
- type SMSTemplateSend0
- type SMSTemplateSend1
- type SMSTemplateStatus
- type SMSTemplateVersionID
- type SendWhatsAppMessageJSONRequestBody
- type SendWhatsAppMessageParams
- type SendWhatsAppMessageRequest
- type SendWhatsAppMessageResponse
- type SendWhatsAppMessageTemplate
- type ServiceUnavailable
- type StartingAfter
- type Suppression
- type SuppressionAppliesTo
- type SuppressionCreate
- type SuppressionID
- type SuppressionList
- type SuppressionOrigin
- type SuppressionReason
- type SuppressionScope
- type SuppressionScopeType
- type Tag
- type TemplateName
- type TemplateScope
- type TemplateVariable
- type ThreadID
- type Timestamps
- type TooEarly
- type UnarchiveContactPropertyParams
- type UnarchiveContactPropertyResponse
- type UnassignAudienceContactParams
- type UnassignAudienceContactResponse
- type UnassignAudienceContactsJSONRequestBody
- type UnassignAudienceContactsParams
- type UnassignAudienceContactsResponse
- type Unauthorized
- type UnderscoreListEnvelope
- type UnderscoreListEnvelopeWithTotal
- type UnmetGate
- type Unprocessable
- type UpdateAudienceJSONRequestBody
- type UpdateAudienceParams
- type UpdateAudienceResponse
- type UpdateContactJSONRequestBody
- type UpdateContactParams
- type UpdateContactPropertyJSONRequestBody
- type UpdateContactPropertyParams
- type UpdateContactPropertyResponse
- type UpdateContactResponse
- type Verification
- type VerificationChannel
- type VerificationChannelEntry
- type VerificationCheckRequest
- type VerificationCheckResult
- type VerificationCreateRequest
- type VerificationID
- type VerificationOptions
- type VerificationStatus
- type VerificationTo
- type WebhookAttempt
- type WebhookAttemptList
- type WebhookAttemptStatus
- type WebhookEndpoint
- type WebhookEndpointCreate
- type WebhookEndpointCreated
- type WebhookEndpointCreatedStatus
- type WebhookEndpointID
- type WebhookEndpointList
- type WebhookEndpointStatus
- type WebhookEndpointUpdate
- type WebhookEndpointUpdateStatus
- type WebhookEvent
- func (t WebhookEvent) AsEventDomainFailed() (EventDomainFailed, error)
- func (t WebhookEvent) AsEventDomainVerified() (EventDomainVerified, error)
- func (t WebhookEvent) AsEventEmailAccepted() (EventEmailAccepted, error)
- func (t WebhookEvent) AsEventEmailBounced() (EventEmailBounced, error)
- func (t WebhookEvent) AsEventEmailCanceled() (EventEmailCanceled, error)
- func (t WebhookEvent) AsEventEmailClicked() (EventEmailClicked, error)
- func (t WebhookEvent) AsEventEmailComplained() (EventEmailComplained, error)
- func (t WebhookEvent) AsEventEmailDeferred() (EventEmailDeferred, error)
- func (t WebhookEvent) AsEventEmailDelivered() (EventEmailDelivered, error)
- func (t WebhookEvent) AsEventEmailListUnsubscribed() (EventEmailListUnsubscribed, error)
- func (t WebhookEvent) AsEventEmailMailboxMessageDelivered() (EventEmailMailboxMessageDelivered, error)
- func (t WebhookEvent) AsEventEmailMailboxMessageFailed() (EventEmailMailboxMessageFailed, error)
- func (t WebhookEvent) AsEventEmailMailboxMessageReceived() (EventEmailMailboxMessageReceived, error)
- func (t WebhookEvent) AsEventEmailMailboxMessageReceivedBlocked() (EventEmailMailboxMessageReceivedBlocked, error)
- func (t WebhookEvent) AsEventEmailMailboxMessageReceivedUnauthenticated() (EventEmailMailboxMessageReceivedUnauthenticated, error)
- func (t WebhookEvent) AsEventEmailMailboxMessageSent() (EventEmailMailboxMessageSent, error)
- func (t WebhookEvent) AsEventEmailMailboxSuspended() (EventEmailMailboxSuspended, error)
- func (t WebhookEvent) AsEventEmailMailboxThreadCreated() (EventEmailMailboxThreadCreated, error)
- func (t WebhookEvent) AsEventEmailOpened() (EventEmailOpened, error)
- func (t WebhookEvent) AsEventEmailOutOfBandBounce() (EventEmailOutOfBandBounce, error)
- func (t WebhookEvent) AsEventEmailProcessed() (EventEmailProcessed, error)
- func (t WebhookEvent) AsEventEmailReceived() (EventEmailReceived, error)
- func (t WebhookEvent) AsEventEmailRejected() (EventEmailRejected, error)
- func (t WebhookEvent) AsEventEmailScheduled() (EventEmailScheduled, error)
- func (t WebhookEvent) AsEventEmailSuppressionCreated() (EventEmailSuppressionCreated, error)
- func (t WebhookEvent) AsEventEmailUnsubscribed() (EventEmailUnsubscribed, error)
- func (t WebhookEvent) AsEventSMSAccepted() (EventSMSAccepted, error)
- func (t WebhookEvent) AsEventSMSDelivered() (EventSMSDelivered, error)
- func (t WebhookEvent) AsEventSMSExpired() (EventSMSExpired, error)
- func (t WebhookEvent) AsEventSMSFailed() (EventSMSFailed, error)
- func (t WebhookEvent) AsEventSMSRejected() (EventSMSRejected, error)
- func (t WebhookEvent) AsEventSMSSent() (EventSMSSent, error)
- func (t WebhookEvent) AsEventSMSUndelivered() (EventSMSUndelivered, error)
- func (t WebhookEvent) Discriminator() (string, error)
- func (t *WebhookEvent) FromEventDomainFailed(v EventDomainFailed) error
- func (t *WebhookEvent) FromEventDomainVerified(v EventDomainVerified) error
- func (t *WebhookEvent) FromEventEmailAccepted(v EventEmailAccepted) error
- func (t *WebhookEvent) FromEventEmailBounced(v EventEmailBounced) error
- func (t *WebhookEvent) FromEventEmailCanceled(v EventEmailCanceled) error
- func (t *WebhookEvent) FromEventEmailClicked(v EventEmailClicked) error
- func (t *WebhookEvent) FromEventEmailComplained(v EventEmailComplained) error
- func (t *WebhookEvent) FromEventEmailDeferred(v EventEmailDeferred) error
- func (t *WebhookEvent) FromEventEmailDelivered(v EventEmailDelivered) error
- func (t *WebhookEvent) FromEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
- func (t *WebhookEvent) FromEventEmailMailboxMessageDelivered(v EventEmailMailboxMessageDelivered) error
- func (t *WebhookEvent) FromEventEmailMailboxMessageFailed(v EventEmailMailboxMessageFailed) error
- func (t *WebhookEvent) FromEventEmailMailboxMessageReceived(v EventEmailMailboxMessageReceived) error
- func (t *WebhookEvent) FromEventEmailMailboxMessageReceivedBlocked(v EventEmailMailboxMessageReceivedBlocked) error
- func (t *WebhookEvent) FromEventEmailMailboxMessageReceivedUnauthenticated(v EventEmailMailboxMessageReceivedUnauthenticated) error
- func (t *WebhookEvent) FromEventEmailMailboxMessageSent(v EventEmailMailboxMessageSent) error
- func (t *WebhookEvent) FromEventEmailMailboxSuspended(v EventEmailMailboxSuspended) error
- func (t *WebhookEvent) FromEventEmailMailboxThreadCreated(v EventEmailMailboxThreadCreated) error
- func (t *WebhookEvent) FromEventEmailOpened(v EventEmailOpened) error
- func (t *WebhookEvent) FromEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
- func (t *WebhookEvent) FromEventEmailProcessed(v EventEmailProcessed) error
- func (t *WebhookEvent) FromEventEmailReceived(v EventEmailReceived) error
- func (t *WebhookEvent) FromEventEmailRejected(v EventEmailRejected) error
- func (t *WebhookEvent) FromEventEmailScheduled(v EventEmailScheduled) error
- func (t *WebhookEvent) FromEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
- func (t *WebhookEvent) FromEventEmailUnsubscribed(v EventEmailUnsubscribed) error
- func (t *WebhookEvent) FromEventSMSAccepted(v EventSMSAccepted) error
- func (t *WebhookEvent) FromEventSMSDelivered(v EventSMSDelivered) error
- func (t *WebhookEvent) FromEventSMSExpired(v EventSMSExpired) error
- func (t *WebhookEvent) FromEventSMSFailed(v EventSMSFailed) error
- func (t *WebhookEvent) FromEventSMSRejected(v EventSMSRejected) error
- func (t *WebhookEvent) FromEventSMSSent(v EventSMSSent) error
- func (t *WebhookEvent) FromEventSMSUndelivered(v EventSMSUndelivered) error
- func (t WebhookEvent) MarshalJSON() ([]byte, error)
- func (t *WebhookEvent) MergeEventDomainFailed(v EventDomainFailed) error
- func (t *WebhookEvent) MergeEventDomainVerified(v EventDomainVerified) error
- func (t *WebhookEvent) MergeEventEmailAccepted(v EventEmailAccepted) error
- func (t *WebhookEvent) MergeEventEmailBounced(v EventEmailBounced) error
- func (t *WebhookEvent) MergeEventEmailCanceled(v EventEmailCanceled) error
- func (t *WebhookEvent) MergeEventEmailClicked(v EventEmailClicked) error
- func (t *WebhookEvent) MergeEventEmailComplained(v EventEmailComplained) error
- func (t *WebhookEvent) MergeEventEmailDeferred(v EventEmailDeferred) error
- func (t *WebhookEvent) MergeEventEmailDelivered(v EventEmailDelivered) error
- func (t *WebhookEvent) MergeEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
- func (t *WebhookEvent) MergeEventEmailMailboxMessageDelivered(v EventEmailMailboxMessageDelivered) error
- func (t *WebhookEvent) MergeEventEmailMailboxMessageFailed(v EventEmailMailboxMessageFailed) error
- func (t *WebhookEvent) MergeEventEmailMailboxMessageReceived(v EventEmailMailboxMessageReceived) error
- func (t *WebhookEvent) MergeEventEmailMailboxMessageReceivedBlocked(v EventEmailMailboxMessageReceivedBlocked) error
- func (t *WebhookEvent) MergeEventEmailMailboxMessageReceivedUnauthenticated(v EventEmailMailboxMessageReceivedUnauthenticated) error
- func (t *WebhookEvent) MergeEventEmailMailboxMessageSent(v EventEmailMailboxMessageSent) error
- func (t *WebhookEvent) MergeEventEmailMailboxSuspended(v EventEmailMailboxSuspended) error
- func (t *WebhookEvent) MergeEventEmailMailboxThreadCreated(v EventEmailMailboxThreadCreated) error
- func (t *WebhookEvent) MergeEventEmailOpened(v EventEmailOpened) error
- func (t *WebhookEvent) MergeEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
- func (t *WebhookEvent) MergeEventEmailProcessed(v EventEmailProcessed) error
- func (t *WebhookEvent) MergeEventEmailReceived(v EventEmailReceived) error
- func (t *WebhookEvent) MergeEventEmailRejected(v EventEmailRejected) error
- func (t *WebhookEvent) MergeEventEmailScheduled(v EventEmailScheduled) error
- func (t *WebhookEvent) MergeEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
- func (t *WebhookEvent) MergeEventEmailUnsubscribed(v EventEmailUnsubscribed) error
- func (t *WebhookEvent) MergeEventSMSAccepted(v EventSMSAccepted) error
- func (t *WebhookEvent) MergeEventSMSDelivered(v EventSMSDelivered) error
- func (t *WebhookEvent) MergeEventSMSExpired(v EventSMSExpired) error
- func (t *WebhookEvent) MergeEventSMSFailed(v EventSMSFailed) error
- func (t *WebhookEvent) MergeEventSMSRejected(v EventSMSRejected) error
- func (t *WebhookEvent) MergeEventSMSSent(v EventSMSSent) error
- func (t *WebhookEvent) MergeEventSMSUndelivered(v EventSMSUndelivered) error
- func (t *WebhookEvent) UnmarshalJSON(b []byte) error
- func (t WebhookEvent) ValueByDiscriminator() (interface{}, error)
- type WebhookEventID
- type WebhookEventType
- type WebhookReplayRequest
- type WebhookRotateSecretResponse
- type WebhookTestRequest
- type WebhookTestResponse
- type WebhookTestResponseStatus
- type WhatsAppError
- type WhatsAppErrorCode
- type WhatsAppEvent
- type WhatsAppEventID
- type WhatsAppEventList
- type WhatsAppMessage
- type WhatsAppMessageBusiness
- type WhatsAppMessageContact
- type WhatsAppMessageDirection
- type WhatsAppMessageID
- type WhatsAppMessageList
- type WhatsAppMessageStatus
- type WhatsAppMessageTemplate
- type WhatsAppMessageTemplateComponent
- type WhatsAppMessageTemplateComponentParameter
- type WhatsAppTemplate
- type WhatsAppTemplateButton
- type WhatsAppTemplateCategory
- type WhatsAppTemplateComponent
- type WhatsAppTemplateExampleParameter
- type WhatsAppTemplateList
- type WhatsAppTemplateParameterType
- type WhatsAppTemplateStatus
- type WorkspaceID
- type XWorkspaceId
Constants ¶
const ( BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes" CookieAuthScopes cookieAuthContextKey = "CookieAuth.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func NewArchiveContactPropertyRequest ¶ added in v0.4.0
func NewArchiveContactPropertyRequest(server string, propertyId ContactPropertyID, params *ArchiveContactPropertyParams) (*http.Request, error)
NewArchiveContactPropertyRequest generates requests for ArchiveContactProperty
func NewAssignAudienceContactsRequest ¶ added in v0.4.0
func NewAssignAudienceContactsRequest(server string, audienceId AudienceID, params *AssignAudienceContactsParams, body AssignAudienceContactsJSONRequestBody) (*http.Request, error)
NewAssignAudienceContactsRequest calls the generic AssignAudienceContacts builder with application/json body
func NewAssignAudienceContactsRequestWithBody ¶ added in v0.4.0
func NewAssignAudienceContactsRequestWithBody(server string, audienceId AudienceID, params *AssignAudienceContactsParams, contentType string, body io.Reader) (*http.Request, error)
NewAssignAudienceContactsRequestWithBody generates requests for AssignAudienceContacts with any type of body
func NewCancelEmailMessageRequest ¶ added in v0.4.1
func NewCancelEmailMessageRequest(server string, messageId EmailID, params *CancelEmailMessageParams) (*http.Request, error)
NewCancelEmailMessageRequest generates requests for CancelEmailMessage
func NewCreateAudienceRequest ¶ added in v0.4.0
func NewCreateAudienceRequest(server string, params *CreateAudienceParams, body CreateAudienceJSONRequestBody) (*http.Request, error)
NewCreateAudienceRequest calls the generic CreateAudience builder with application/json body
func NewCreateAudienceRequestWithBody ¶ added in v0.4.0
func NewCreateAudienceRequestWithBody(server string, params *CreateAudienceParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateAudienceRequestWithBody generates requests for CreateAudience with any type of body
func NewCreateContactBatchRequest ¶ added in v0.4.0
func NewCreateContactBatchRequest(server string, params *CreateContactBatchParams, body CreateContactBatchJSONRequestBody) (*http.Request, error)
NewCreateContactBatchRequest calls the generic CreateContactBatch builder with application/json body
func NewCreateContactBatchRequestWithBody ¶ added in v0.4.0
func NewCreateContactBatchRequestWithBody(server string, params *CreateContactBatchParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateContactBatchRequestWithBody generates requests for CreateContactBatch with any type of body
func NewCreateContactPropertyRequest ¶ added in v0.4.0
func NewCreateContactPropertyRequest(server string, params *CreateContactPropertyParams, body CreateContactPropertyJSONRequestBody) (*http.Request, error)
NewCreateContactPropertyRequest calls the generic CreateContactProperty builder with application/json body
func NewCreateContactPropertyRequestWithBody ¶ added in v0.4.0
func NewCreateContactPropertyRequestWithBody(server string, params *CreateContactPropertyParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateContactPropertyRequestWithBody generates requests for CreateContactProperty with any type of body
func NewCreateContactRequest ¶ added in v0.4.0
func NewCreateContactRequest(server string, params *CreateContactParams, body CreateContactJSONRequestBody) (*http.Request, error)
NewCreateContactRequest calls the generic CreateContact builder with application/json body
func NewCreateContactRequestWithBody ¶ added in v0.4.0
func NewCreateContactRequestWithBody(server string, params *CreateContactParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateContactRequestWithBody generates requests for CreateContact with any type of body
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 NewCreateSMSMessageBatchRequest ¶ added in v0.3.0
func NewCreateSMSMessageBatchRequest(server string, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody) (*http.Request, error)
NewCreateSMSMessageBatchRequest calls the generic CreateSMSMessageBatch builder with application/json body
func NewCreateSMSMessageBatchRequestWithBody ¶ added in v0.3.0
func NewCreateSMSMessageBatchRequestWithBody(server string, params *CreateSMSMessageBatchParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateSMSMessageBatchRequestWithBody generates requests for CreateSMSMessageBatch with any type of body
func NewCreateSMSMessageRequest ¶ added in v0.3.0
func NewCreateSMSMessageRequest(server string, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody) (*http.Request, error)
NewCreateSMSMessageRequest calls the generic CreateSMSMessage builder with application/json body
func NewCreateSMSMessageRequestWithBody ¶ added in v0.3.0
func NewCreateSMSMessageRequestWithBody(server string, params *CreateSMSMessageParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateSMSMessageRequestWithBody generates requests for CreateSMSMessage with any type of body
func NewDeleteAudienceRequest ¶ added in v0.4.0
func NewDeleteAudienceRequest(server string, audienceId AudienceID, params *DeleteAudienceParams) (*http.Request, error)
NewDeleteAudienceRequest generates requests for DeleteAudience
func NewDeleteContactRequest ¶ added in v0.4.0
func NewDeleteContactRequest(server string, contactId ContactID, params *DeleteContactParams) (*http.Request, error)
NewDeleteContactRequest generates requests for DeleteContact
func NewGetAudienceRequest ¶ added in v0.4.0
func NewGetAudienceRequest(server string, audienceId AudienceID) (*http.Request, error)
NewGetAudienceRequest generates requests for GetAudience
func NewGetContactPropertyRequest ¶ added in v0.4.0
func NewGetContactPropertyRequest(server string, propertyId ContactPropertyID) (*http.Request, error)
NewGetContactPropertyRequest generates requests for GetContactProperty
func NewGetContactRequest ¶ added in v0.4.0
NewGetContactRequest generates requests for GetContact
func NewGetEmailMessageRequest ¶
NewGetEmailMessageRequest generates requests for GetEmailMessage
func NewGetSMSMessageRequest ¶ added in v0.3.0
func NewGetSMSMessageRequest(server string, messageId SMSMessageID) (*http.Request, error)
NewGetSMSMessageRequest generates requests for GetSMSMessage
func NewGetSMSTemplateRequest ¶ added in v0.3.0
NewGetSMSTemplateRequest generates requests for GetSMSTemplate
func NewGetWhatsAppMessageRequest ¶ added in v0.6.0
func NewGetWhatsAppMessageRequest(server string, messageId WhatsAppMessageID) (*http.Request, error)
NewGetWhatsAppMessageRequest generates requests for GetWhatsAppMessage
func NewListAudienceContactsRequest ¶ added in v0.4.0
func NewListAudienceContactsRequest(server string, audienceId AudienceID, params *ListAudienceContactsParams) (*http.Request, error)
NewListAudienceContactsRequest generates requests for ListAudienceContacts
func NewListAudiencesRequest ¶ added in v0.4.0
func NewListAudiencesRequest(server string, params *ListAudiencesParams) (*http.Request, error)
NewListAudiencesRequest generates requests for ListAudiences
func NewListContactPropertiesRequest ¶ added in v0.4.0
func NewListContactPropertiesRequest(server string, params *ListContactPropertiesParams) (*http.Request, error)
NewListContactPropertiesRequest generates requests for ListContactProperties
func NewListContactsRequest ¶ added in v0.4.0
func NewListContactsRequest(server string, params *ListContactsParams) (*http.Request, error)
NewListContactsRequest generates requests for ListContacts
func NewListEmailMessagesRequest ¶
func NewListEmailMessagesRequest(server string, params *ListEmailMessagesParams) (*http.Request, error)
NewListEmailMessagesRequest generates requests for ListEmailMessages
func NewListSMSMessagesRequest ¶ added in v0.3.0
func NewListSMSMessagesRequest(server string, params *ListSMSMessagesParams) (*http.Request, error)
NewListSMSMessagesRequest generates requests for ListSMSMessages
func NewListSMSTemplatesRequest ¶ added in v0.3.0
func NewListSMSTemplatesRequest(server string, params *ListSMSTemplatesParams) (*http.Request, error)
NewListSMSTemplatesRequest generates requests for ListSMSTemplates
func NewListWhatsAppMessageEventsRequest ¶ added in v0.6.0
func NewListWhatsAppMessageEventsRequest(server string, messageId WhatsAppMessageID, params *ListWhatsAppMessageEventsParams) (*http.Request, error)
NewListWhatsAppMessageEventsRequest generates requests for ListWhatsAppMessageEvents
func NewListWhatsAppMessagesRequest ¶ added in v0.6.0
func NewListWhatsAppMessagesRequest(server string, params *ListWhatsAppMessagesParams) (*http.Request, error)
NewListWhatsAppMessagesRequest generates requests for ListWhatsAppMessages
func NewListWhatsAppTemplatesRequest ¶ added in v0.6.0
NewListWhatsAppTemplatesRequest generates requests for ListWhatsAppTemplates
func NewSendWhatsAppMessageRequest ¶ added in v0.6.0
func NewSendWhatsAppMessageRequest(server string, params *SendWhatsAppMessageParams, body SendWhatsAppMessageJSONRequestBody) (*http.Request, error)
NewSendWhatsAppMessageRequest calls the generic SendWhatsAppMessage builder with application/json body
func NewSendWhatsAppMessageRequestWithBody ¶ added in v0.6.0
func NewSendWhatsAppMessageRequestWithBody(server string, params *SendWhatsAppMessageParams, contentType string, body io.Reader) (*http.Request, error)
NewSendWhatsAppMessageRequestWithBody generates requests for SendWhatsAppMessage with any type of body
func NewUnarchiveContactPropertyRequest ¶ added in v0.4.0
func NewUnarchiveContactPropertyRequest(server string, propertyId ContactPropertyID, params *UnarchiveContactPropertyParams) (*http.Request, error)
NewUnarchiveContactPropertyRequest generates requests for UnarchiveContactProperty
func NewUnassignAudienceContactRequest ¶ added in v0.4.0
func NewUnassignAudienceContactRequest(server string, audienceId AudienceID, contactId ContactID, params *UnassignAudienceContactParams) (*http.Request, error)
NewUnassignAudienceContactRequest generates requests for UnassignAudienceContact
func NewUnassignAudienceContactsRequest ¶ added in v0.4.0
func NewUnassignAudienceContactsRequest(server string, audienceId AudienceID, params *UnassignAudienceContactsParams, body UnassignAudienceContactsJSONRequestBody) (*http.Request, error)
NewUnassignAudienceContactsRequest calls the generic UnassignAudienceContacts builder with application/json body
func NewUnassignAudienceContactsRequestWithBody ¶ added in v0.4.0
func NewUnassignAudienceContactsRequestWithBody(server string, audienceId AudienceID, params *UnassignAudienceContactsParams, contentType string, body io.Reader) (*http.Request, error)
NewUnassignAudienceContactsRequestWithBody generates requests for UnassignAudienceContacts with any type of body
func NewUpdateAudienceRequest ¶ added in v0.4.0
func NewUpdateAudienceRequest(server string, audienceId AudienceID, params *UpdateAudienceParams, body UpdateAudienceJSONRequestBody) (*http.Request, error)
NewUpdateAudienceRequest calls the generic UpdateAudience builder with application/json body
func NewUpdateAudienceRequestWithBody ¶ added in v0.4.0
func NewUpdateAudienceRequestWithBody(server string, audienceId AudienceID, params *UpdateAudienceParams, contentType string, body io.Reader) (*http.Request, error)
NewUpdateAudienceRequestWithBody generates requests for UpdateAudience with any type of body
func NewUpdateContactPropertyRequest ¶ added in v0.4.0
func NewUpdateContactPropertyRequest(server string, propertyId ContactPropertyID, params *UpdateContactPropertyParams, body UpdateContactPropertyJSONRequestBody) (*http.Request, error)
NewUpdateContactPropertyRequest calls the generic UpdateContactProperty builder with application/json body
func NewUpdateContactPropertyRequestWithBody ¶ added in v0.4.0
func NewUpdateContactPropertyRequestWithBody(server string, propertyId ContactPropertyID, params *UpdateContactPropertyParams, contentType string, body io.Reader) (*http.Request, error)
NewUpdateContactPropertyRequestWithBody generates requests for UpdateContactProperty with any type of body
func NewUpdateContactRequest ¶ added in v0.4.0
func NewUpdateContactRequest(server string, contactId ContactID, params *UpdateContactParams, body UpdateContactJSONRequestBody) (*http.Request, error)
NewUpdateContactRequest calls the generic UpdateContact builder with application/json body
func NewUpdateContactRequestWithBody ¶ added in v0.4.0
func NewUpdateContactRequestWithBody(server string, contactId ContactID, params *UpdateContactParams, contentType string, body io.Reader) (*http.Request, error)
NewUpdateContactRequestWithBody generates requests for UpdateContact with any type of body
Types ¶
type AgentDomain ¶ added in v0.4.1
type AgentDomain struct {
// CreatedAt When the domain was claimed.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Domain The full agent domain that mailbox addresses live under.
Domain *string `json:"domain,omitempty"`
// Handle The claimed handle — the leftmost label of the agent domain. Immutable.
Handle *string `json:"handle,omitempty"`
Id AgentDomainID `json:"id"`
// ReleasedAt When the domain was released. Null while active.
ReleasedAt *time.Time `json:"released_at,omitempty"`
// Status Lifecycle status. `provisioning` domains are being set up and become `active` shortly — poll the domain until it does. `active` domains receive mail. `releasing` domains are being released; once `released` they no longer receive mail, and the handle stays reserved to this workspace.
Status *AgentDomainStatus `json:"status,omitempty"`
// UpdatedAt When the domain was last updated.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
AgentDomain Your workspace's agent domain — a Bird-hosted subdomain (`{handle}.{region}.mailbox.bird.com`) that mailbox addresses live under. Each workspace can hold one active agent domain; the handle is globally unique and immutable once claimed.
type AgentDomainCreate ¶ added in v0.4.1
type AgentDomainCreate struct {
// Handle The handle to claim. Lowercase letters, digits, and hyphens; must start and end with a letter or digit. Handles are globally unique, immutable, and checked against a reserved list — brand, financial, and infrastructure terms cannot be claimed.
Handle string `json:"handle"`
}
AgentDomainCreate Parameters for claiming your workspace's agent domain.
type AgentDomainID ¶ added in v0.4.1
type AgentDomainID = string
AgentDomainID defines model for AgentDomainID.
type AgentDomainList ¶ added in v0.4.1
type AgentDomainList struct {
Data []AgentDomain `json:"data"`
}
AgentDomainList The workspace's agent domains. Contains at most one active domain, plus any released domains whose handles remain reserved to this workspace.
type AgentDomainStatus ¶ added in v0.4.1
type AgentDomainStatus string
AgentDomainStatus Lifecycle status. `provisioning` domains are being set up and become `active` shortly — poll the domain until it does. `active` domains receive mail. `releasing` domains are being released; once `released` they no longer receive mail, and the handle stays reserved to this workspace.
const ( AgentDomainStatusActive AgentDomainStatus = "active" AgentDomainStatusProvisioning AgentDomainStatus = "provisioning" AgentDomainStatusReleased AgentDomainStatus = "released" AgentDomainStatusReleasing AgentDomainStatus = "releasing" )
Defines values for AgentDomainStatus.
func (AgentDomainStatus) Valid ¶ added in v0.4.1
func (e AgentDomainStatus) Valid() bool
Valid indicates whether the value is a known member of the AgentDomainStatus enum.
type ArchiveContactPropertyParams ¶ added in v0.4.0
type ArchiveContactPropertyParams 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"`
}
ArchiveContactPropertyParams defines parameters for ArchiveContactProperty.
type ArchiveContactPropertyResponse ¶ added in v0.4.0
type ArchiveContactPropertyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ContactProperty
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON409 *Conflict
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseArchiveContactPropertyResponse ¶ added in v0.4.0
func ParseArchiveContactPropertyResponse(rsp *http.Response) (*ArchiveContactPropertyResponse, error)
ParseArchiveContactPropertyResponse parses an HTTP response from a ArchiveContactPropertyWithResponse call
func (ArchiveContactPropertyResponse) ContentType ¶ added in v0.4.0
func (r ArchiveContactPropertyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ArchiveContactPropertyResponse) Status ¶ added in v0.4.0
func (r ArchiveContactPropertyResponse) Status() string
Status returns HTTPResponse.Status
func (ArchiveContactPropertyResponse) StatusCode ¶ added in v0.4.0
func (r ArchiveContactPropertyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AssignAudienceContactsJSONRequestBody ¶ added in v0.4.0
type AssignAudienceContactsJSONRequestBody = AudienceContactsAddRequest
AssignAudienceContactsJSONRequestBody defines body for AssignAudienceContacts for application/json ContentType.
type AssignAudienceContactsParams ¶ added in v0.4.0
type AssignAudienceContactsParams 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"`
}
AssignAudienceContactsParams defines parameters for AssignAudienceContacts.
type AssignAudienceContactsResponse ¶ added in v0.4.0
type AssignAudienceContactsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseAssignAudienceContactsResponse ¶ added in v0.4.0
func ParseAssignAudienceContactsResponse(rsp *http.Response) (*AssignAudienceContactsResponse, error)
ParseAssignAudienceContactsResponse parses an HTTP response from a AssignAudienceContactsWithResponse call
func (AssignAudienceContactsResponse) ContentType ¶ added in v0.4.0
func (r AssignAudienceContactsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (AssignAudienceContactsResponse) Status ¶ added in v0.4.0
func (r AssignAudienceContactsResponse) Status() string
Status returns HTTPResponse.Status
func (AssignAudienceContactsResponse) StatusCode ¶ added in v0.4.0
func (r AssignAudienceContactsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Audience ¶ added in v0.4.0
type Audience struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
// Description Longer description of who this audience is.
Description *string `json:"description,omitempty"`
Id AudienceID `json:"id"`
// Name Display name for the audience.
Name string `json:"name"`
// Type How the audience's recipients are determined. `static` audiences have an explicit member list you manage via the API. `dynamic` and `external` are preview values and currently unavailable — creating an audience with either returns an error.
Type AudienceType `json:"type"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Audience defines model for Audience.
type AudienceContactsAddRequest ¶ added in v0.4.0
type AudienceContactsAddRequest struct {
// ContactIds Contacts to add to the audience. Adding a contact that is already a member has no effect. If any ID does not exist, the whole request fails and no contacts are added.
ContactIds []ContactID `json:"contact_ids"`
}
AudienceContactsAddRequest defines model for AudienceContactsAddRequest.
type AudienceContactsRemoveRequest ¶ added in v0.4.0
type AudienceContactsRemoveRequest struct {
// ContactIds Contacts to remove from the audience. Removing a contact that is not a member has no effect. If any ID does not exist, the whole request fails and no contacts are removed.
ContactIds []ContactID `json:"contact_ids"`
}
AudienceContactsRemoveRequest defines model for AudienceContactsRemoveRequest.
type AudienceCreateRequest ¶ added in v0.4.0
type AudienceCreateRequest struct {
// Description Longer description of who this audience is.
Description *string `json:"description,omitempty"`
// Name Display name for the audience.
Name string `json:"name"`
// Type How the audience's recipients are determined. `static` audiences have an explicit member list you manage via the API. `dynamic` and `external` are preview values and currently unavailable — creating an audience with either returns an error.
Type *AudienceCreateRequestType `json:"type,omitempty"`
}
AudienceCreateRequest defines model for AudienceCreateRequest.
type AudienceCreateRequestType ¶ added in v0.4.0
type AudienceCreateRequestType string
AudienceCreateRequestType How the audience's recipients are determined. `static` audiences have an explicit member list you manage via the API. `dynamic` and `external` are preview values and currently unavailable — creating an audience with either returns an error.
const ( AudienceCreateRequestTypeAudienceTypeDynamic AudienceCreateRequestType = "dynamic" AudienceCreateRequestTypeAudienceTypeExternal AudienceCreateRequestType = "external" AudienceCreateRequestTypeAudienceTypeStatic AudienceCreateRequestType = "static" )
Defines values for AudienceCreateRequestType.
func (AudienceCreateRequestType) Valid ¶ added in v0.4.0
func (e AudienceCreateRequestType) Valid() bool
Valid indicates whether the value is a known member of the AudienceCreateRequestType enum.
type AudienceList ¶ added in v0.4.0
type AudienceList struct {
// Data Page of audience objects.
Data []Audience `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"`
}
AudienceList defines model for AudienceList.
type AudienceMember ¶ added in v0.4.0
type AudienceMember struct {
Contact Contact `json:"contact"`
// JoinedAt When this contact joined the audience. Members are listed in join order, most recent first.
JoinedAt *time.Time `json:"joined_at,omitempty"`
}
AudienceMember defines model for AudienceMember.
type AudienceMemberList ¶ added in v0.4.0
type AudienceMemberList struct {
// Data Page of audience members, each a contact paired with the time it joined the audience.
Data []AudienceMember `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"`
}
AudienceMemberList defines model for AudienceMemberList.
type AudienceType ¶ added in v0.4.0
type AudienceType string
AudienceType How the audience's recipients are determined. `static` audiences have an explicit member list you manage via the API. `dynamic` and `external` are preview values and currently unavailable — creating an audience with either returns an error.
const ( AudienceTypeAudienceTypeDynamic AudienceType = "dynamic" AudienceTypeAudienceTypeExternal AudienceType = "external" AudienceTypeAudienceTypeStatic AudienceType = "static" )
Defines values for AudienceType.
func (AudienceType) Valid ¶ added in v0.4.0
func (e AudienceType) Valid() bool
Valid indicates whether the value is a known member of the AudienceType enum.
type AudienceUpdateRequest ¶ added in v0.4.0
type AudienceUpdateRequest struct {
// Description Longer description of who this audience is. Set to null to clear.
Description *string `json:"description,omitempty"`
// Name Display name for the audience.
Name *string `json:"name,omitempty"`
}
AudienceUpdateRequest defines model for AudienceUpdateRequest.
type CancelEmailMessageParams ¶ added in v0.4.1
type CancelEmailMessageParams 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"`
}
CancelEmailMessageParams defines parameters for CancelEmailMessage.
type CancelEmailMessageResponse ¶ added in v0.4.1
type CancelEmailMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON409 *Conflict
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCancelEmailMessageResponse ¶ added in v0.4.1
func ParseCancelEmailMessageResponse(rsp *http.Response) (*CancelEmailMessageResponse, error)
ParseCancelEmailMessageResponse parses an HTTP response from a CancelEmailMessageWithResponse call
func (CancelEmailMessageResponse) ContentType ¶ added in v0.4.1
func (r CancelEmailMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CancelEmailMessageResponse) Status ¶ added in v0.4.1
func (r CancelEmailMessageResponse) Status() string
Status returns HTTPResponse.Status
func (CancelEmailMessageResponse) StatusCode ¶ added in v0.4.1
func (r CancelEmailMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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) ArchiveContactProperty ¶ added in v0.4.0
func (c *Client) ArchiveContactProperty(ctx context.Context, propertyId ContactPropertyID, params *ArchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AssignAudienceContacts ¶ added in v0.4.0
func (c *Client) AssignAudienceContacts(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, body AssignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AssignAudienceContactsWithBody ¶ added in v0.4.0
func (c *Client) AssignAudienceContactsWithBody(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CancelEmailMessage ¶ added in v0.4.1
func (c *Client) CancelEmailMessage(ctx context.Context, messageId EmailID, params *CancelEmailMessageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAudience ¶ added in v0.4.0
func (c *Client) CreateAudience(ctx context.Context, params *CreateAudienceParams, body CreateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateAudienceWithBody ¶ added in v0.4.0
func (*Client) CreateContact ¶ added in v0.4.0
func (c *Client) CreateContact(ctx context.Context, params *CreateContactParams, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateContactBatch ¶ added in v0.4.0
func (c *Client) CreateContactBatch(ctx context.Context, params *CreateContactBatchParams, body CreateContactBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateContactBatchWithBody ¶ added in v0.4.0
func (*Client) CreateContactProperty ¶ added in v0.4.0
func (c *Client) CreateContactProperty(ctx context.Context, params *CreateContactPropertyParams, body CreateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateContactPropertyWithBody ¶ added in v0.4.0
func (*Client) CreateContactWithBody ¶ added in v0.4.0
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) CreateSMSMessage ¶ added in v0.3.0
func (c *Client) CreateSMSMessage(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateSMSMessageBatch ¶ added in v0.3.0
func (c *Client) CreateSMSMessageBatch(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateSMSMessageBatchWithBody ¶ added in v0.3.0
func (*Client) CreateSMSMessageWithBody ¶ added in v0.3.0
func (*Client) DeleteAudience ¶ added in v0.4.0
func (c *Client) DeleteAudience(ctx context.Context, audienceId AudienceID, params *DeleteAudienceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteContact ¶ added in v0.4.0
func (c *Client) DeleteContact(ctx context.Context, contactId ContactID, params *DeleteContactParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetAudience ¶ added in v0.4.0
func (c *Client) GetAudience(ctx context.Context, audienceId AudienceID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetContact ¶ added in v0.4.0
func (*Client) GetContactProperty ¶ added in v0.4.0
func (c *Client) GetContactProperty(ctx context.Context, propertyId ContactPropertyID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetEmailMessage ¶
func (*Client) GetSMSMessage ¶ added in v0.3.0
func (c *Client) GetSMSMessage(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSMSTemplate ¶ added in v0.3.0
func (*Client) GetWhatsAppMessage ¶ added in v0.6.0
func (c *Client) GetWhatsAppMessage(ctx context.Context, messageId WhatsAppMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAudienceContacts ¶ added in v0.4.0
func (c *Client) ListAudienceContacts(ctx context.Context, audienceId AudienceID, params *ListAudienceContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAudiences ¶ added in v0.4.0
func (c *Client) ListAudiences(ctx context.Context, params *ListAudiencesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListContactProperties ¶ added in v0.4.0
func (c *Client) ListContactProperties(ctx context.Context, params *ListContactPropertiesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListContacts ¶ added in v0.4.0
func (c *Client) ListContacts(ctx context.Context, params *ListContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListEmailMessages ¶
func (c *Client) ListEmailMessages(ctx context.Context, params *ListEmailMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListSMSMessages ¶ added in v0.3.0
func (c *Client) ListSMSMessages(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListSMSTemplates ¶ added in v0.3.0
func (c *Client) ListSMSTemplates(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListWhatsAppMessageEvents ¶ added in v0.6.0
func (c *Client) ListWhatsAppMessageEvents(ctx context.Context, messageId WhatsAppMessageID, params *ListWhatsAppMessageEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListWhatsAppMessages ¶ added in v0.6.0
func (c *Client) ListWhatsAppMessages(ctx context.Context, params *ListWhatsAppMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListWhatsAppTemplates ¶ added in v0.6.0
func (*Client) SendWhatsAppMessage ¶ added in v0.6.0
func (c *Client) SendWhatsAppMessage(ctx context.Context, params *SendWhatsAppMessageParams, body SendWhatsAppMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SendWhatsAppMessageWithBody ¶ added in v0.6.0
func (*Client) UnarchiveContactProperty ¶ added in v0.4.0
func (c *Client) UnarchiveContactProperty(ctx context.Context, propertyId ContactPropertyID, params *UnarchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UnassignAudienceContact ¶ added in v0.4.0
func (c *Client) UnassignAudienceContact(ctx context.Context, audienceId AudienceID, contactId ContactID, params *UnassignAudienceContactParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UnassignAudienceContacts ¶ added in v0.4.0
func (c *Client) UnassignAudienceContacts(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, body UnassignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UnassignAudienceContactsWithBody ¶ added in v0.4.0
func (c *Client) UnassignAudienceContactsWithBody(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateAudience ¶ added in v0.4.0
func (c *Client) UpdateAudience(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, body UpdateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateAudienceWithBody ¶ added in v0.4.0
func (c *Client) UpdateAudienceWithBody(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateContact ¶ added in v0.4.0
func (c *Client) UpdateContact(ctx context.Context, contactId ContactID, params *UpdateContactParams, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateContactProperty ¶ added in v0.4.0
func (c *Client) UpdateContactProperty(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, body UpdateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateContactPropertyWithBody ¶ added in v0.4.0
func (c *Client) UpdateContactPropertyWithBody(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateContactWithBody ¶ added in v0.4.0
type ClientInterface ¶
type ClientInterface interface {
// ListAudiences request
ListAudiences(ctx context.Context, params *ListAudiencesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAudienceWithBody request with any body
CreateAudienceWithBody(ctx context.Context, params *CreateAudienceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAudience(ctx context.Context, params *CreateAudienceParams, body CreateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteAudience request
DeleteAudience(ctx context.Context, audienceId AudienceID, params *DeleteAudienceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAudience request
GetAudience(ctx context.Context, audienceId AudienceID, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateAudienceWithBody request with any body
UpdateAudienceWithBody(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateAudience(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, body UpdateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListAudienceContacts request
ListAudienceContacts(ctx context.Context, audienceId AudienceID, params *ListAudienceContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// AssignAudienceContactsWithBody request with any body
AssignAudienceContactsWithBody(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AssignAudienceContacts(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, body AssignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// UnassignAudienceContactsWithBody request with any body
UnassignAudienceContactsWithBody(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UnassignAudienceContacts(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, body UnassignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// UnassignAudienceContact request
UnassignAudienceContact(ctx context.Context, audienceId AudienceID, contactId ContactID, params *UnassignAudienceContactParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListContactProperties request
ListContactProperties(ctx context.Context, params *ListContactPropertiesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateContactPropertyWithBody request with any body
CreateContactPropertyWithBody(ctx context.Context, params *CreateContactPropertyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateContactProperty(ctx context.Context, params *CreateContactPropertyParams, body CreateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetContactProperty request
GetContactProperty(ctx context.Context, propertyId ContactPropertyID, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateContactPropertyWithBody request with any body
UpdateContactPropertyWithBody(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateContactProperty(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, body UpdateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ArchiveContactProperty request
ArchiveContactProperty(ctx context.Context, propertyId ContactPropertyID, params *ArchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UnarchiveContactProperty request
UnarchiveContactProperty(ctx context.Context, propertyId ContactPropertyID, params *UnarchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListContacts request
ListContacts(ctx context.Context, params *ListContactsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateContactWithBody request with any body
CreateContactWithBody(ctx context.Context, params *CreateContactParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateContact(ctx context.Context, params *CreateContactParams, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateContactBatchWithBody request with any body
CreateContactBatchWithBody(ctx context.Context, params *CreateContactBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateContactBatch(ctx context.Context, params *CreateContactBatchParams, body CreateContactBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteContact request
DeleteContact(ctx context.Context, contactId ContactID, params *DeleteContactParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetContact request
GetContact(ctx context.Context, contactId ContactID, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateContactWithBody request with any body
UpdateContactWithBody(ctx context.Context, contactId ContactID, params *UpdateContactParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateContact(ctx context.Context, contactId ContactID, params *UpdateContactParams, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// 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)
// CancelEmailMessage request
CancelEmailMessage(ctx context.Context, messageId EmailID, params *CancelEmailMessageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateSMSMessageBatchWithBody request with any body
CreateSMSMessageBatchWithBody(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateSMSMessageBatch(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListSMSMessages request
ListSMSMessages(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateSMSMessageWithBody request with any body
CreateSMSMessageWithBody(ctx context.Context, params *CreateSMSMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateSMSMessage(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSMSMessage request
GetSMSMessage(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListSMSTemplates request
ListSMSTemplates(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSMSTemplate request
GetSMSTemplate(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListWhatsAppMessages request
ListWhatsAppMessages(ctx context.Context, params *ListWhatsAppMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// SendWhatsAppMessageWithBody request with any body
SendWhatsAppMessageWithBody(ctx context.Context, params *SendWhatsAppMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SendWhatsAppMessage(ctx context.Context, params *SendWhatsAppMessageParams, body SendWhatsAppMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetWhatsAppMessage request
GetWhatsAppMessage(ctx context.Context, messageId WhatsAppMessageID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListWhatsAppMessageEvents request
ListWhatsAppMessageEvents(ctx context.Context, messageId WhatsAppMessageID, params *ListWhatsAppMessageEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListWhatsAppTemplates request
ListWhatsAppTemplates(ctx context.Context, 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) ArchiveContactPropertyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) ArchiveContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *ArchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*ArchiveContactPropertyResponse, error)
ArchiveContactPropertyWithResponse request returning *ArchiveContactPropertyResponse
func (*ClientWithResponses) AssignAudienceContactsWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) AssignAudienceContactsWithBodyWithResponse(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssignAudienceContactsResponse, error)
AssignAudienceContactsWithBodyWithResponse request with arbitrary body returning *AssignAudienceContactsResponse
func (*ClientWithResponses) AssignAudienceContactsWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) AssignAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, body AssignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*AssignAudienceContactsResponse, error)
func (*ClientWithResponses) CancelEmailMessageWithResponse ¶ added in v0.4.1
func (c *ClientWithResponses) CancelEmailMessageWithResponse(ctx context.Context, messageId EmailID, params *CancelEmailMessageParams, reqEditors ...RequestEditorFn) (*CancelEmailMessageResponse, error)
CancelEmailMessageWithResponse request returning *CancelEmailMessageResponse
func (*ClientWithResponses) CreateAudienceWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateAudienceWithBodyWithResponse(ctx context.Context, params *CreateAudienceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAudienceResponse, error)
CreateAudienceWithBodyWithResponse request with arbitrary body returning *CreateAudienceResponse
func (*ClientWithResponses) CreateAudienceWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateAudienceWithResponse(ctx context.Context, params *CreateAudienceParams, body CreateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAudienceResponse, error)
func (*ClientWithResponses) CreateContactBatchWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateContactBatchWithBodyWithResponse(ctx context.Context, params *CreateContactBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactBatchResponse, error)
CreateContactBatchWithBodyWithResponse request with arbitrary body returning *CreateContactBatchResponse
func (*ClientWithResponses) CreateContactBatchWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateContactBatchWithResponse(ctx context.Context, params *CreateContactBatchParams, body CreateContactBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactBatchResponse, error)
func (*ClientWithResponses) CreateContactPropertyWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateContactPropertyWithBodyWithResponse(ctx context.Context, params *CreateContactPropertyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactPropertyResponse, error)
CreateContactPropertyWithBodyWithResponse request with arbitrary body returning *CreateContactPropertyResponse
func (*ClientWithResponses) CreateContactPropertyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateContactPropertyWithResponse(ctx context.Context, params *CreateContactPropertyParams, body CreateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactPropertyResponse, error)
func (*ClientWithResponses) CreateContactWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateContactWithBodyWithResponse(ctx context.Context, params *CreateContactParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactResponse, error)
CreateContactWithBodyWithResponse request with arbitrary body returning *CreateContactResponse
func (*ClientWithResponses) CreateContactWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) CreateContactWithResponse(ctx context.Context, params *CreateContactParams, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactResponse, error)
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) CreateSMSMessageBatchWithBodyWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
CreateSMSMessageBatchWithBodyWithResponse request with arbitrary body returning *CreateSMSMessageBatchResponse
func (*ClientWithResponses) CreateSMSMessageBatchWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageBatchWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
func (*ClientWithResponses) CreateSMSMessageWithBodyWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
CreateSMSMessageWithBodyWithResponse request with arbitrary body returning *CreateSMSMessageResponse
func (*ClientWithResponses) CreateSMSMessageWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) CreateSMSMessageWithResponse(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
func (*ClientWithResponses) DeleteAudienceWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) DeleteAudienceWithResponse(ctx context.Context, audienceId AudienceID, params *DeleteAudienceParams, reqEditors ...RequestEditorFn) (*DeleteAudienceResponse, error)
DeleteAudienceWithResponse request returning *DeleteAudienceResponse
func (*ClientWithResponses) DeleteContactWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) DeleteContactWithResponse(ctx context.Context, contactId ContactID, params *DeleteContactParams, reqEditors ...RequestEditorFn) (*DeleteContactResponse, error)
DeleteContactWithResponse request returning *DeleteContactResponse
func (*ClientWithResponses) GetAudienceWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) GetAudienceWithResponse(ctx context.Context, audienceId AudienceID, reqEditors ...RequestEditorFn) (*GetAudienceResponse, error)
GetAudienceWithResponse request returning *GetAudienceResponse
func (*ClientWithResponses) GetContactPropertyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) GetContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, reqEditors ...RequestEditorFn) (*GetContactPropertyResponse, error)
GetContactPropertyWithResponse request returning *GetContactPropertyResponse
func (*ClientWithResponses) GetContactWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) GetContactWithResponse(ctx context.Context, contactId ContactID, reqEditors ...RequestEditorFn) (*GetContactResponse, error)
GetContactWithResponse request returning *GetContactResponse
func (*ClientWithResponses) GetEmailMessageWithResponse ¶
func (c *ClientWithResponses) GetEmailMessageWithResponse(ctx context.Context, messageId EmailID, reqEditors ...RequestEditorFn) (*GetEmailMessageResponse, error)
GetEmailMessageWithResponse request returning *GetEmailMessageResponse
func (*ClientWithResponses) GetSMSMessageWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetSMSMessageWithResponse(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*GetSMSMessageResponse, error)
GetSMSMessageWithResponse request returning *GetSMSMessageResponse
func (*ClientWithResponses) GetSMSTemplateWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) GetSMSTemplateWithResponse(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*GetSMSTemplateResponse, error)
GetSMSTemplateWithResponse request returning *GetSMSTemplateResponse
func (*ClientWithResponses) GetWhatsAppMessageWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) GetWhatsAppMessageWithResponse(ctx context.Context, messageId WhatsAppMessageID, reqEditors ...RequestEditorFn) (*GetWhatsAppMessageResponse, error)
GetWhatsAppMessageWithResponse request returning *GetWhatsAppMessageResponse
func (*ClientWithResponses) ListAudienceContactsWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) ListAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, params *ListAudienceContactsParams, reqEditors ...RequestEditorFn) (*ListAudienceContactsResponse, error)
ListAudienceContactsWithResponse request returning *ListAudienceContactsResponse
func (*ClientWithResponses) ListAudiencesWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) ListAudiencesWithResponse(ctx context.Context, params *ListAudiencesParams, reqEditors ...RequestEditorFn) (*ListAudiencesResponse, error)
ListAudiencesWithResponse request returning *ListAudiencesResponse
func (*ClientWithResponses) ListContactPropertiesWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) ListContactPropertiesWithResponse(ctx context.Context, params *ListContactPropertiesParams, reqEditors ...RequestEditorFn) (*ListContactPropertiesResponse, error)
ListContactPropertiesWithResponse request returning *ListContactPropertiesResponse
func (*ClientWithResponses) ListContactsWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) ListContactsWithResponse(ctx context.Context, params *ListContactsParams, reqEditors ...RequestEditorFn) (*ListContactsResponse, error)
ListContactsWithResponse request returning *ListContactsResponse
func (*ClientWithResponses) ListEmailMessagesWithResponse ¶
func (c *ClientWithResponses) ListEmailMessagesWithResponse(ctx context.Context, params *ListEmailMessagesParams, reqEditors ...RequestEditorFn) (*ListEmailMessagesResponse, error)
ListEmailMessagesWithResponse request returning *ListEmailMessagesResponse
func (*ClientWithResponses) ListSMSMessagesWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) ListSMSMessagesWithResponse(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*ListSMSMessagesResponse, error)
ListSMSMessagesWithResponse request returning *ListSMSMessagesResponse
func (*ClientWithResponses) ListSMSTemplatesWithResponse ¶ added in v0.3.0
func (c *ClientWithResponses) ListSMSTemplatesWithResponse(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*ListSMSTemplatesResponse, error)
ListSMSTemplatesWithResponse request returning *ListSMSTemplatesResponse
func (*ClientWithResponses) ListWhatsAppMessageEventsWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) ListWhatsAppMessageEventsWithResponse(ctx context.Context, messageId WhatsAppMessageID, params *ListWhatsAppMessageEventsParams, reqEditors ...RequestEditorFn) (*ListWhatsAppMessageEventsResponse, error)
ListWhatsAppMessageEventsWithResponse request returning *ListWhatsAppMessageEventsResponse
func (*ClientWithResponses) ListWhatsAppMessagesWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) ListWhatsAppMessagesWithResponse(ctx context.Context, params *ListWhatsAppMessagesParams, reqEditors ...RequestEditorFn) (*ListWhatsAppMessagesResponse, error)
ListWhatsAppMessagesWithResponse request returning *ListWhatsAppMessagesResponse
func (*ClientWithResponses) ListWhatsAppTemplatesWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) ListWhatsAppTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWhatsAppTemplatesResponse, error)
ListWhatsAppTemplatesWithResponse request returning *ListWhatsAppTemplatesResponse
func (*ClientWithResponses) SendWhatsAppMessageWithBodyWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) SendWhatsAppMessageWithBodyWithResponse(ctx context.Context, params *SendWhatsAppMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendWhatsAppMessageResponse, error)
SendWhatsAppMessageWithBodyWithResponse request with arbitrary body returning *SendWhatsAppMessageResponse
func (*ClientWithResponses) SendWhatsAppMessageWithResponse ¶ added in v0.6.0
func (c *ClientWithResponses) SendWhatsAppMessageWithResponse(ctx context.Context, params *SendWhatsAppMessageParams, body SendWhatsAppMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendWhatsAppMessageResponse, error)
func (*ClientWithResponses) UnarchiveContactPropertyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UnarchiveContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *UnarchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*UnarchiveContactPropertyResponse, error)
UnarchiveContactPropertyWithResponse request returning *UnarchiveContactPropertyResponse
func (*ClientWithResponses) UnassignAudienceContactWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UnassignAudienceContactWithResponse(ctx context.Context, audienceId AudienceID, contactId ContactID, params *UnassignAudienceContactParams, reqEditors ...RequestEditorFn) (*UnassignAudienceContactResponse, error)
UnassignAudienceContactWithResponse request returning *UnassignAudienceContactResponse
func (*ClientWithResponses) UnassignAudienceContactsWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UnassignAudienceContactsWithBodyWithResponse(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnassignAudienceContactsResponse, error)
UnassignAudienceContactsWithBodyWithResponse request with arbitrary body returning *UnassignAudienceContactsResponse
func (*ClientWithResponses) UnassignAudienceContactsWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UnassignAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, body UnassignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*UnassignAudienceContactsResponse, error)
func (*ClientWithResponses) UpdateAudienceWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UpdateAudienceWithBodyWithResponse(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAudienceResponse, error)
UpdateAudienceWithBodyWithResponse request with arbitrary body returning *UpdateAudienceResponse
func (*ClientWithResponses) UpdateAudienceWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UpdateAudienceWithResponse(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, body UpdateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAudienceResponse, error)
func (*ClientWithResponses) UpdateContactPropertyWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UpdateContactPropertyWithBodyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactPropertyResponse, error)
UpdateContactPropertyWithBodyWithResponse request with arbitrary body returning *UpdateContactPropertyResponse
func (*ClientWithResponses) UpdateContactPropertyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UpdateContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, body UpdateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactPropertyResponse, error)
func (*ClientWithResponses) UpdateContactWithBodyWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UpdateContactWithBodyWithResponse(ctx context.Context, contactId ContactID, params *UpdateContactParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)
UpdateContactWithBodyWithResponse request with arbitrary body returning *UpdateContactResponse
func (*ClientWithResponses) UpdateContactWithResponse ¶ added in v0.4.0
func (c *ClientWithResponses) UpdateContactWithResponse(ctx context.Context, contactId ContactID, params *UpdateContactParams, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListAudiencesWithResponse request
ListAudiencesWithResponse(ctx context.Context, params *ListAudiencesParams, reqEditors ...RequestEditorFn) (*ListAudiencesResponse, error)
// CreateAudienceWithBodyWithResponse request with any body
CreateAudienceWithBodyWithResponse(ctx context.Context, params *CreateAudienceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAudienceResponse, error)
CreateAudienceWithResponse(ctx context.Context, params *CreateAudienceParams, body CreateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAudienceResponse, error)
// DeleteAudienceWithResponse request
DeleteAudienceWithResponse(ctx context.Context, audienceId AudienceID, params *DeleteAudienceParams, reqEditors ...RequestEditorFn) (*DeleteAudienceResponse, error)
// GetAudienceWithResponse request
GetAudienceWithResponse(ctx context.Context, audienceId AudienceID, reqEditors ...RequestEditorFn) (*GetAudienceResponse, error)
// UpdateAudienceWithBodyWithResponse request with any body
UpdateAudienceWithBodyWithResponse(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAudienceResponse, error)
UpdateAudienceWithResponse(ctx context.Context, audienceId AudienceID, params *UpdateAudienceParams, body UpdateAudienceJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAudienceResponse, error)
// ListAudienceContactsWithResponse request
ListAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, params *ListAudienceContactsParams, reqEditors ...RequestEditorFn) (*ListAudienceContactsResponse, error)
// AssignAudienceContactsWithBodyWithResponse request with any body
AssignAudienceContactsWithBodyWithResponse(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AssignAudienceContactsResponse, error)
AssignAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, params *AssignAudienceContactsParams, body AssignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*AssignAudienceContactsResponse, error)
// UnassignAudienceContactsWithBodyWithResponse request with any body
UnassignAudienceContactsWithBodyWithResponse(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnassignAudienceContactsResponse, error)
UnassignAudienceContactsWithResponse(ctx context.Context, audienceId AudienceID, params *UnassignAudienceContactsParams, body UnassignAudienceContactsJSONRequestBody, reqEditors ...RequestEditorFn) (*UnassignAudienceContactsResponse, error)
// UnassignAudienceContactWithResponse request
UnassignAudienceContactWithResponse(ctx context.Context, audienceId AudienceID, contactId ContactID, params *UnassignAudienceContactParams, reqEditors ...RequestEditorFn) (*UnassignAudienceContactResponse, error)
// ListContactPropertiesWithResponse request
ListContactPropertiesWithResponse(ctx context.Context, params *ListContactPropertiesParams, reqEditors ...RequestEditorFn) (*ListContactPropertiesResponse, error)
// CreateContactPropertyWithBodyWithResponse request with any body
CreateContactPropertyWithBodyWithResponse(ctx context.Context, params *CreateContactPropertyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactPropertyResponse, error)
CreateContactPropertyWithResponse(ctx context.Context, params *CreateContactPropertyParams, body CreateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactPropertyResponse, error)
// GetContactPropertyWithResponse request
GetContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, reqEditors ...RequestEditorFn) (*GetContactPropertyResponse, error)
// UpdateContactPropertyWithBodyWithResponse request with any body
UpdateContactPropertyWithBodyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactPropertyResponse, error)
UpdateContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *UpdateContactPropertyParams, body UpdateContactPropertyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactPropertyResponse, error)
// ArchiveContactPropertyWithResponse request
ArchiveContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *ArchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*ArchiveContactPropertyResponse, error)
// UnarchiveContactPropertyWithResponse request
UnarchiveContactPropertyWithResponse(ctx context.Context, propertyId ContactPropertyID, params *UnarchiveContactPropertyParams, reqEditors ...RequestEditorFn) (*UnarchiveContactPropertyResponse, error)
// ListContactsWithResponse request
ListContactsWithResponse(ctx context.Context, params *ListContactsParams, reqEditors ...RequestEditorFn) (*ListContactsResponse, error)
// CreateContactWithBodyWithResponse request with any body
CreateContactWithBodyWithResponse(ctx context.Context, params *CreateContactParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactResponse, error)
CreateContactWithResponse(ctx context.Context, params *CreateContactParams, body CreateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactResponse, error)
// CreateContactBatchWithBodyWithResponse request with any body
CreateContactBatchWithBodyWithResponse(ctx context.Context, params *CreateContactBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateContactBatchResponse, error)
CreateContactBatchWithResponse(ctx context.Context, params *CreateContactBatchParams, body CreateContactBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateContactBatchResponse, error)
// DeleteContactWithResponse request
DeleteContactWithResponse(ctx context.Context, contactId ContactID, params *DeleteContactParams, reqEditors ...RequestEditorFn) (*DeleteContactResponse, error)
// GetContactWithResponse request
GetContactWithResponse(ctx context.Context, contactId ContactID, reqEditors ...RequestEditorFn) (*GetContactResponse, error)
// UpdateContactWithBodyWithResponse request with any body
UpdateContactWithBodyWithResponse(ctx context.Context, contactId ContactID, params *UpdateContactParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)
UpdateContactWithResponse(ctx context.Context, contactId ContactID, params *UpdateContactParams, body UpdateContactJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateContactResponse, error)
// 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)
// CancelEmailMessageWithResponse request
CancelEmailMessageWithResponse(ctx context.Context, messageId EmailID, params *CancelEmailMessageParams, reqEditors ...RequestEditorFn) (*CancelEmailMessageResponse, error)
// CreateSMSMessageBatchWithBodyWithResponse request with any body
CreateSMSMessageBatchWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
CreateSMSMessageBatchWithResponse(ctx context.Context, params *CreateSMSMessageBatchParams, body CreateSMSMessageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageBatchResponse, error)
// ListSMSMessagesWithResponse request
ListSMSMessagesWithResponse(ctx context.Context, params *ListSMSMessagesParams, reqEditors ...RequestEditorFn) (*ListSMSMessagesResponse, error)
// CreateSMSMessageWithBodyWithResponse request with any body
CreateSMSMessageWithBodyWithResponse(ctx context.Context, params *CreateSMSMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
CreateSMSMessageWithResponse(ctx context.Context, params *CreateSMSMessageParams, body CreateSMSMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSMSMessageResponse, error)
// GetSMSMessageWithResponse request
GetSMSMessageWithResponse(ctx context.Context, messageId SMSMessageID, reqEditors ...RequestEditorFn) (*GetSMSMessageResponse, error)
// ListSMSTemplatesWithResponse request
ListSMSTemplatesWithResponse(ctx context.Context, params *ListSMSTemplatesParams, reqEditors ...RequestEditorFn) (*ListSMSTemplatesResponse, error)
// GetSMSTemplateWithResponse request
GetSMSTemplateWithResponse(ctx context.Context, templateRef string, reqEditors ...RequestEditorFn) (*GetSMSTemplateResponse, error)
// ListWhatsAppMessagesWithResponse request
ListWhatsAppMessagesWithResponse(ctx context.Context, params *ListWhatsAppMessagesParams, reqEditors ...RequestEditorFn) (*ListWhatsAppMessagesResponse, error)
// SendWhatsAppMessageWithBodyWithResponse request with any body
SendWhatsAppMessageWithBodyWithResponse(ctx context.Context, params *SendWhatsAppMessageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendWhatsAppMessageResponse, error)
SendWhatsAppMessageWithResponse(ctx context.Context, params *SendWhatsAppMessageParams, body SendWhatsAppMessageJSONRequestBody, reqEditors ...RequestEditorFn) (*SendWhatsAppMessageResponse, error)
// GetWhatsAppMessageWithResponse request
GetWhatsAppMessageWithResponse(ctx context.Context, messageId WhatsAppMessageID, reqEditors ...RequestEditorFn) (*GetWhatsAppMessageResponse, error)
// ListWhatsAppMessageEventsWithResponse request
ListWhatsAppMessageEventsWithResponse(ctx context.Context, messageId WhatsAppMessageID, params *ListWhatsAppMessageEventsParams, reqEditors ...RequestEditorFn) (*ListWhatsAppMessageEventsResponse, error)
// ListWhatsAppTemplatesWithResponse request
ListWhatsAppTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListWhatsAppTemplatesResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Contact ¶ added in v0.4.0
type Contact struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
// Data Custom property values for this contact, available as template variables in broadcasts. Each key is a property created via the contact properties API, and each value is a string, number, or boolean matching the property's declared type (strings up to 500 characters). Total size is capped at 2 KB serialized.
Data *map[string]interface{} `json:"data,omitempty"`
// Email The contact's email address, stored trimmed and lowercased. Unique within the workspace.
Email openapi_types.Email `json:"email"`
// ExternalId Your own identifier for this contact, such as a user ID in your system. Unique within the workspace when set.
ExternalId *string `json:"external_id,omitempty"`
// FirstName The contact's first name.
FirstName *string `json:"first_name,omitempty"`
Id ContactID `json:"id"`
// LastName The contact's last name.
LastName *string `json:"last_name,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Contact defines model for Contact.
type ContactCreateRequest ¶ added in v0.4.0
type ContactCreateRequest struct {
// Data Custom property values for this contact. Each key must be a property created via the contact properties API, and each value must be a string, number, or boolean matching the property's declared type (strings up to 500 characters); a null value is ignored. Total size is capped at 2 KB serialized.
Data *map[string]interface{} `json:"data,omitempty"`
// Email The contact's email address. Trimmed and lowercased before it is stored and checked for uniqueness. Unique within the workspace.
Email openapi_types.Email `json:"email"`
// ExternalId Your own identifier for this contact, such as a user ID in your system. Unique within the workspace when set.
ExternalId *string `json:"external_id,omitempty"`
// FirstName The contact's first name.
FirstName *string `json:"first_name,omitempty"`
// LastName The contact's last name.
LastName *string `json:"last_name,omitempty"`
}
ContactCreateRequest defines model for ContactCreateRequest.
type ContactList ¶ added in v0.4.0
type ContactList struct {
// Data Page of contact objects.
Data []Contact `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"`
}
ContactList defines model for ContactList.
type ContactProperty ¶ added in v0.4.0
type ContactProperty struct {
// Archived Whether the property is archived. An archived property is rejected in new contact writes and stops rendering in templates, but every value already stored on contacts is preserved. Reactivate it with unarchive.
Archived *bool `json:"archived,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
// FallbackValue Default used when a contact has no value for this property and the template does not supply an inline fallback. A string, number, or boolean matching the declared type (strings up to 500 characters), or null when no fallback is set.
FallbackValue interface{} `json:"fallback_value,omitempty"`
Id ContactPropertyID `json:"id"`
// Key The property key, used as the key in contact data and as the template variable name in broadcasts. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation.
Key string `json:"key"`
// Type The value type every contact must use for this property. Cannot be changed after creation.
Type ContactPropertyType `json:"type"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
ContactProperty defines model for ContactProperty.
type ContactPropertyCreateRequest ¶ added in v0.4.0
type ContactPropertyCreateRequest struct {
// FallbackValue Default used when a contact has no value for this property and the template does not supply an inline fallback. A string, number, or boolean matching the declared type (strings up to 500 characters), or null for no fallback.
FallbackValue interface{} `json:"fallback_value,omitempty"`
// Key The property key, used as the key in contact data and as the template variable name in broadcasts. Lowercase letters, digits, and underscores, starting with a letter. Cannot be changed after creation.
Key string `json:"key"`
// Type The value type every contact must use for this property. Cannot be changed after creation.
Type ContactPropertyCreateRequestType `json:"type"`
}
ContactPropertyCreateRequest defines model for ContactPropertyCreateRequest.
type ContactPropertyCreateRequestType ¶ added in v0.4.0
type ContactPropertyCreateRequestType string
ContactPropertyCreateRequestType The value type every contact must use for this property. Cannot be changed after creation.
const ( ContactPropertyCreateRequestTypeContactPropertyTypeBoolean ContactPropertyCreateRequestType = "boolean" ContactPropertyCreateRequestTypeContactPropertyTypeNumber ContactPropertyCreateRequestType = "number" ContactPropertyCreateRequestTypeContactPropertyTypeString ContactPropertyCreateRequestType = "string" )
Defines values for ContactPropertyCreateRequestType.
func (ContactPropertyCreateRequestType) Valid ¶ added in v0.4.0
func (e ContactPropertyCreateRequestType) Valid() bool
Valid indicates whether the value is a known member of the ContactPropertyCreateRequestType enum.
type ContactPropertyID ¶ added in v0.4.0
type ContactPropertyID = string
ContactPropertyID defines model for ContactPropertyID.
type ContactPropertyList ¶ added in v0.4.0
type ContactPropertyList struct {
// Data Page of contact property objects.
Data []ContactProperty `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"`
}
ContactPropertyList defines model for ContactPropertyList.
type ContactPropertyType ¶ added in v0.4.0
type ContactPropertyType string
ContactPropertyType The value type every contact must use for this property. Cannot be changed after creation.
const ( ContactPropertyTypeContactPropertyTypeBoolean ContactPropertyType = "boolean" ContactPropertyTypeContactPropertyTypeNumber ContactPropertyType = "number" ContactPropertyTypeContactPropertyTypeString ContactPropertyType = "string" )
Defines values for ContactPropertyType.
func (ContactPropertyType) Valid ¶ added in v0.4.0
func (e ContactPropertyType) Valid() bool
Valid indicates whether the value is a known member of the ContactPropertyType enum.
type ContactPropertyUpdateRequest ¶ added in v0.4.0
type ContactPropertyUpdateRequest struct {
// FallbackValue Default used when a contact has no value for this property and the template does not supply an inline fallback. A string, number, or boolean matching the declared type (strings up to 500 characters). Set to null to remove the fallback.
FallbackValue interface{} `json:"fallback_value,omitempty"`
}
ContactPropertyUpdateRequest defines model for ContactPropertyUpdateRequest.
type ContactUpdateRequest ¶ added in v0.4.0
type ContactUpdateRequest struct {
// Data Custom property values to change, merged into the contact's existing data. Keys you supply are set, keys set to null are removed, and keys you omit are left unchanged. Each key must be a property created via the contact properties API, and each value must be a string, number, or boolean matching the property's declared type (strings up to 500 characters). The merged result is capped at 2 KB serialized.
Data *map[string]interface{} `json:"data,omitempty"`
// Email New email address for the contact. Trimmed and lowercased before it is stored and checked for uniqueness. Must not be in use by another contact in the workspace.
Email *openapi_types.Email `json:"email,omitempty"`
// ExternalId Your own identifier for this contact. Unique within the workspace when set. Set to null to clear.
ExternalId *string `json:"external_id,omitempty"`
// FirstName The contact's first name. Set to null to clear.
FirstName *string `json:"first_name,omitempty"`
// LastName The contact's last name. Set to null to clear.
LastName *string `json:"last_name,omitempty"`
}
ContactUpdateRequest defines model for ContactUpdateRequest.
type ContactUpsertError ¶ added in v0.4.0
type ContactUpsertError struct {
// Message Human-readable explanation of why this entry failed.
Message string `json:"message"`
// Type Machine-readable error category for this entry, such as `validation_error` or `conflict_error`, in the same vocabulary as the top-level error `type`. New categories may be added over time, so treat unrecognized values as a generic failure.
Type string `json:"type"`
}
ContactUpsertError defines model for ContactUpsertError.
type ContactUpsertRequest ¶ added in v0.4.0
type ContactUpsertRequest struct {
// AudienceIds Audiences every contact in this request is added to. Contacts that are already members are left in place.
AudienceIds *[]AudienceID `json:"audience_ids,omitempty"`
// Contacts Contacts to create or update, matched by email address. Existing contacts are updated with the supplied fields; new ones are created.
Contacts []ContactCreateRequest `json:"contacts"`
// DataMode How a supplied `data` object is applied to an existing contact. `merge` (the default) merges the supplied keys onto the contact's stored custom values, and a key with a `null` value deletes that one key. `replace` overwrites the whole stored `data` map with the supplied one. In both modes a contact that omits `data` keeps its stored values unchanged, so an import that touches one attribute never wipes the others.
DataMode *ContactUpsertRequestDataMode `json:"data_mode,omitempty"`
}
ContactUpsertRequest defines model for ContactUpsertRequest.
type ContactUpsertRequestDataMode ¶ added in v0.4.0
type ContactUpsertRequestDataMode string
ContactUpsertRequestDataMode How a supplied `data` object is applied to an existing contact. `merge` (the default) merges the supplied keys onto the contact's stored custom values, and a key with a `null` value deletes that one key. `replace` overwrites the whole stored `data` map with the supplied one. In both modes a contact that omits `data` keeps its stored values unchanged, so an import that touches one attribute never wipes the others.
const ( Merge ContactUpsertRequestDataMode = "merge" Replace ContactUpsertRequestDataMode = "replace" )
Defines values for ContactUpsertRequestDataMode.
func (ContactUpsertRequestDataMode) Valid ¶ added in v0.4.0
func (e ContactUpsertRequestDataMode) Valid() bool
Valid indicates whether the value is a known member of the ContactUpsertRequestDataMode enum.
type ContactUpsertResult ¶ added in v0.4.0
type ContactUpsertResult struct {
// Data One entry per contact in the request, in submission order.
Data []ContactUpsertResultItem `json:"data"`
}
ContactUpsertResult defines model for ContactUpsertResult.
type ContactUpsertResultItem ¶ added in v0.4.0
type ContactUpsertResultItem struct {
ContactId *ContactID `json:"contact_id,omitempty"`
// Email Email address of the contact this entry refers to.
Email openapi_types.Email `json:"email"`
Error *ContactUpsertError `json:"error,omitempty"`
// Status What happened to this contact. A failed entry does not affect the other entries in the request.
Status ContactUpsertResultItemStatus `json:"status"`
}
ContactUpsertResultItem defines model for ContactUpsertResultItem.
type ContactUpsertResultItemStatus ¶ added in v0.4.0
type ContactUpsertResultItemStatus string
ContactUpsertResultItemStatus What happened to this contact. A failed entry does not affect the other entries in the request.
const ( ContactUpsertResultItemStatusCreated ContactUpsertResultItemStatus = "created" ContactUpsertResultItemStatusFailed ContactUpsertResultItemStatus = "failed" ContactUpsertResultItemStatusUpdated ContactUpsertResultItemStatus = "updated" )
Defines values for ContactUpsertResultItemStatus.
func (ContactUpsertResultItemStatus) Valid ¶ added in v0.4.0
func (e ContactUpsertResultItemStatus) Valid() bool
Valid indicates whether the value is a known member of the ContactUpsertResultItemStatus enum.
type CreateAudienceJSONRequestBody ¶ added in v0.4.0
type CreateAudienceJSONRequestBody = AudienceCreateRequest
CreateAudienceJSONRequestBody defines body for CreateAudience for application/json ContentType.
type CreateAudienceParams ¶ added in v0.4.0
type CreateAudienceParams 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"`
}
CreateAudienceParams defines parameters for CreateAudience.
type CreateAudienceResponse ¶ added in v0.4.0
type CreateAudienceResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Audience
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateAudienceResponse ¶ added in v0.4.0
func ParseCreateAudienceResponse(rsp *http.Response) (*CreateAudienceResponse, error)
ParseCreateAudienceResponse parses an HTTP response from a CreateAudienceWithResponse call
func (CreateAudienceResponse) ContentType ¶ added in v0.4.0
func (r CreateAudienceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateAudienceResponse) Status ¶ added in v0.4.0
func (r CreateAudienceResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAudienceResponse) StatusCode ¶ added in v0.4.0
func (r CreateAudienceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateContactBatchJSONRequestBody ¶ added in v0.4.0
type CreateContactBatchJSONRequestBody = ContactUpsertRequest
CreateContactBatchJSONRequestBody defines body for CreateContactBatch for application/json ContentType.
type CreateContactBatchParams ¶ added in v0.4.0
type CreateContactBatchParams 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"`
}
CreateContactBatchParams defines parameters for CreateContactBatch.
type CreateContactBatchResponse ¶ added in v0.4.0
type CreateContactBatchResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ContactUpsertResult
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateContactBatchResponse ¶ added in v0.4.0
func ParseCreateContactBatchResponse(rsp *http.Response) (*CreateContactBatchResponse, error)
ParseCreateContactBatchResponse parses an HTTP response from a CreateContactBatchWithResponse call
func (CreateContactBatchResponse) ContentType ¶ added in v0.4.0
func (r CreateContactBatchResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateContactBatchResponse) Status ¶ added in v0.4.0
func (r CreateContactBatchResponse) Status() string
Status returns HTTPResponse.Status
func (CreateContactBatchResponse) StatusCode ¶ added in v0.4.0
func (r CreateContactBatchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateContactJSONRequestBody ¶ added in v0.4.0
type CreateContactJSONRequestBody = ContactCreateRequest
CreateContactJSONRequestBody defines body for CreateContact for application/json ContentType.
type CreateContactParams ¶ added in v0.4.0
type CreateContactParams 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"`
}
CreateContactParams defines parameters for CreateContact.
type CreateContactPropertyJSONRequestBody ¶ added in v0.4.0
type CreateContactPropertyJSONRequestBody = ContactPropertyCreateRequest
CreateContactPropertyJSONRequestBody defines body for CreateContactProperty for application/json ContentType.
type CreateContactPropertyParams ¶ added in v0.4.0
type CreateContactPropertyParams 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"`
}
CreateContactPropertyParams defines parameters for CreateContactProperty.
type CreateContactPropertyResponse ¶ added in v0.4.0
type CreateContactPropertyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *ContactProperty
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON409 *Conflict
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateContactPropertyResponse ¶ added in v0.4.0
func ParseCreateContactPropertyResponse(rsp *http.Response) (*CreateContactPropertyResponse, error)
ParseCreateContactPropertyResponse parses an HTTP response from a CreateContactPropertyWithResponse call
func (CreateContactPropertyResponse) ContentType ¶ added in v0.4.0
func (r CreateContactPropertyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateContactPropertyResponse) Status ¶ added in v0.4.0
func (r CreateContactPropertyResponse) Status() string
Status returns HTTPResponse.Status
func (CreateContactPropertyResponse) StatusCode ¶ added in v0.4.0
func (r CreateContactPropertyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateContactResponse ¶ added in v0.4.0
type CreateContactResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Contact
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON409 *Conflict
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateContactResponse ¶ added in v0.4.0
func ParseCreateContactResponse(rsp *http.Response) (*CreateContactResponse, error)
ParseCreateContactResponse parses an HTTP response from a CreateContactWithResponse call
func (CreateContactResponse) ContentType ¶ added in v0.4.0
func (r CreateContactResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateContactResponse) Status ¶ added in v0.4.0
func (r CreateContactResponse) Status() string
Status returns HTTPResponse.Status
func (CreateContactResponse) StatusCode ¶ added in v0.4.0
func (r CreateContactResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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 CreateSMSMessageBatchJSONRequestBody ¶ added in v0.3.0
type CreateSMSMessageBatchJSONRequestBody = SMSMessageBatchRequest
CreateSMSMessageBatchJSONRequestBody defines body for CreateSMSMessageBatch for application/json ContentType.
type CreateSMSMessageBatchParams ¶ added in v0.3.0
type CreateSMSMessageBatchParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateSMSMessageBatchParams defines parameters for CreateSMSMessageBatch.
type CreateSMSMessageBatchResponse ¶ added in v0.3.0
type CreateSMSMessageBatchResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *SMSMessageBatchResponse
JSON400 *BadRequest
JSON401 *Unauthorized
JSON402 *PaymentRequired
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateSMSMessageBatchResponse ¶ added in v0.3.0
func ParseCreateSMSMessageBatchResponse(rsp *http.Response) (*CreateSMSMessageBatchResponse, error)
ParseCreateSMSMessageBatchResponse parses an HTTP response from a CreateSMSMessageBatchWithResponse call
func (CreateSMSMessageBatchResponse) ContentType ¶ added in v0.3.0
func (r CreateSMSMessageBatchResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateSMSMessageBatchResponse) Status ¶ added in v0.3.0
func (r CreateSMSMessageBatchResponse) Status() string
Status returns HTTPResponse.Status
func (CreateSMSMessageBatchResponse) StatusCode ¶ added in v0.3.0
func (r CreateSMSMessageBatchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateSMSMessageJSONRequestBody ¶ added in v0.3.0
type CreateSMSMessageJSONRequestBody = SMSMessageSendRequest
CreateSMSMessageJSONRequestBody defines body for CreateSMSMessage for application/json ContentType.
type CreateSMSMessageParams ¶ added in v0.3.0
type CreateSMSMessageParams struct {
// IdempotencyKey Client-supplied deduplication key. When present, the server replays the original response for any duplicate request with the same key within the idempotency TTL window (3 hours by default).
// Two distinct 409 errors signal misuse:
// - `request_in_progress` (E01004) — the same key is currently being
// processed by a concurrent request. Wait briefly and retry; the lock
// expires within 30 seconds.
// - `idempotency_key_reuse` (E01005) — the same key has already completed
// against a different request body or method. Generate a new key.
//
// Recommended key format is `<event-type>/<entity-id>` (e.g. `welcome-user/usr_abc123`).
IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}
CreateSMSMessageParams defines parameters for CreateSMSMessage.
type CreateSMSMessageResponse ¶ added in v0.3.0
type CreateSMSMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *SMSMessage
JSON400 *BadRequest
JSON401 *Unauthorized
JSON402 *PaymentRequired
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseCreateSMSMessageResponse ¶ added in v0.3.0
func ParseCreateSMSMessageResponse(rsp *http.Response) (*CreateSMSMessageResponse, error)
ParseCreateSMSMessageResponse parses an HTTP response from a CreateSMSMessageWithResponse call
func (CreateSMSMessageResponse) ContentType ¶ added in v0.3.0
func (r CreateSMSMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateSMSMessageResponse) Status ¶ added in v0.3.0
func (r CreateSMSMessageResponse) Status() string
Status returns HTTPResponse.Status
func (CreateSMSMessageResponse) StatusCode ¶ added in v0.3.0
func (r CreateSMSMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CurrencyCode ¶ added in v0.3.0
type CurrencyCode = string
CurrencyCode ISO 4217 three-letter currency code.
type DeleteAudienceParams ¶ added in v0.4.0
type DeleteAudienceParams 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"`
}
DeleteAudienceParams defines parameters for DeleteAudience.
type DeleteAudienceResponse ¶ added in v0.4.0
type DeleteAudienceResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON409 *Conflict
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseDeleteAudienceResponse ¶ added in v0.4.0
func ParseDeleteAudienceResponse(rsp *http.Response) (*DeleteAudienceResponse, error)
ParseDeleteAudienceResponse parses an HTTP response from a DeleteAudienceWithResponse call
func (DeleteAudienceResponse) ContentType ¶ added in v0.4.0
func (r DeleteAudienceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteAudienceResponse) Status ¶ added in v0.4.0
func (r DeleteAudienceResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAudienceResponse) StatusCode ¶ added in v0.4.0
func (r DeleteAudienceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteContactParams ¶ added in v0.4.0
type DeleteContactParams 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"`
}
DeleteContactParams defines parameters for DeleteContact.
type DeleteContactResponse ¶ added in v0.4.0
type DeleteContactResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseDeleteContactResponse ¶ added in v0.4.0
func ParseDeleteContactResponse(rsp *http.Response) (*DeleteContactResponse, error)
ParseDeleteContactResponse parses an HTTP response from a DeleteContactWithResponse call
func (DeleteContactResponse) ContentType ¶ added in v0.4.0
func (r DeleteContactResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteContactResponse) Status ¶ added in v0.4.0
func (r DeleteContactResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteContactResponse) StatusCode ¶ added in v0.4.0
func (r DeleteContactResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DocsSearchResponse ¶ added in v0.2.1
type DocsSearchResponse struct {
// Locale The documentation locale the results were drawn from.
Locale *string `json:"locale,omitempty"`
// Query The search query that produced these results.
Query *string `json:"query,omitempty"`
// Results Matching documentation sections, ordered by descending relevance.
Results *[]DocsSearchResult `json:"results,omitempty"`
}
DocsSearchResponse defines model for DocsSearchResponse.
type DocsSearchResult ¶ added in v0.2.1
type DocsSearchResult struct {
// DocUrl Relative path to the page, without the section anchor. Results from the same page share it, so it can be used to group them.
DocUrl *string `json:"doc_url,omitempty"`
// Highlights The passages of the section that match the query, longer than the snippet. Returned only when contents is highlights.
Highlights *[]string `json:"highlights,omitempty"`
// MarkdownUrl Absolute URL that returns the page's full content as Markdown. Fetch it to read the whole page.
MarkdownUrl *string `json:"markdown_url,omitempty"`
// Score Relevance score. Higher is more relevant; results are ordered by descending score.
Score *float32 `json:"score,omitempty"`
// Section Heading of the matching section within the page.
Section *string `json:"section,omitempty"`
// Snippet Short excerpt of the matching content, with the query terms in context. Always returned.
Snippet *string `json:"snippet,omitempty"`
// Title Title of the documentation page this result belongs to.
Title *string `json:"title,omitempty"`
// TokenEstimate Approximate token count of the full page returned by markdown_url, to budget reading it. Results from the same page share it.
TokenEstimate *int `json:"token_estimate,omitempty"`
// Url Relative path to the matching section, including the heading anchor.
Url *string `json:"url,omitempty"`
}
DocsSearchResult defines model for DocsSearchResult.
type EmailAddress ¶
type EmailAddress struct {
// Email Email address.
Email openapi_types.Email `json:"email"`
// Name Display name shown alongside the address in mail clients.
Name *string `json:"name,omitempty"`
}
EmailAddress An email address with an optional display name.
type EmailAddressInput ¶
type EmailAddressInput struct {
// contains filtered or unexported fields
}
EmailAddressInput A sender or recipient address. Accepts a plain email string (`jane@example.com`), an RFC 5322 mailbox string with an embedded display name (`Jane Doe <jane@example.com>`), or an object carrying the address and an optional display name. All forms can be mixed freely within one request; responses always return the object form.
func (EmailAddressInput) AsEmailAddress ¶
func (t EmailAddressInput) AsEmailAddress() (EmailAddress, error)
AsEmailAddress returns the union data inside the EmailAddressInput as a EmailAddress
func (EmailAddressInput) AsEmailAddressInput0 ¶
func (t EmailAddressInput) AsEmailAddressInput0() (EmailAddressInput0, error)
AsEmailAddressInput0 returns the union data inside the EmailAddressInput as a EmailAddressInput0
func (*EmailAddressInput) FromEmailAddress ¶
func (t *EmailAddressInput) FromEmailAddress(v EmailAddress) error
FromEmailAddress overwrites any union data inside the EmailAddressInput as the provided EmailAddress
func (*EmailAddressInput) FromEmailAddressInput0 ¶
func (t *EmailAddressInput) FromEmailAddressInput0(v EmailAddressInput0) error
FromEmailAddressInput0 overwrites any union data inside the EmailAddressInput as the provided EmailAddressInput0
func (EmailAddressInput) MarshalJSON ¶
func (t EmailAddressInput) MarshalJSON() ([]byte, error)
func (*EmailAddressInput) MergeEmailAddress ¶
func (t *EmailAddressInput) MergeEmailAddress(v EmailAddress) error
MergeEmailAddress performs a merge with any union data inside the EmailAddressInput, using the provided EmailAddress
func (*EmailAddressInput) MergeEmailAddressInput0 ¶
func (t *EmailAddressInput) MergeEmailAddressInput0(v EmailAddressInput0) error
MergeEmailAddressInput0 performs a merge with any union data inside the EmailAddressInput, using the provided EmailAddressInput0
func (*EmailAddressInput) UnmarshalJSON ¶
func (t *EmailAddressInput) UnmarshalJSON(b []byte) error
type EmailAddressInput0 ¶
type EmailAddressInput0 = string
EmailAddressInput0 Email address, optionally in RFC 5322 mailbox form with an embedded display name.
type EmailAttachment ¶
type EmailAttachment struct {
// Content Base64-encoded attachment bytes. Required. Counts toward the 20 MB estimated generated message-size cap after encoding and MIME wrapping.
Content []byte `json:"content"`
// ContentId RFC 2392 Content-ID. When set, the attachment is rendered inline and can be referenced from the HTML body as `<img src="cid:{content_id}"/>`. When omitted, the attachment is rendered as a regular file attachment.
ContentId *string `json:"content_id,omitempty"`
// ContentType MIME type. Inferred from `filename` extension when omitted. Used to enforce the blocklist of disallowed executable / script types.
ContentType *string `json:"content_type,omitempty"`
// Filename Filename shown to the recipient. Required.
Filename string `json:"filename"`
// Path Preview feature — provide a URL and Bird fetches the attachment for you. Currently unavailable. Use `content` instead. The schema currently requires `content`, so a request with only `path` is rejected with 422 for missing `content`; a request supplying both `content` and `path` is rejected with 422 `unsupported_feature` until this preview ships. When generally available: HTTPS-only, single redirect followed and re-validated, private IP ranges blocked, request timeout enforced, fetched content counts toward the 20 MB estimated generated message-size cap after encoding and MIME wrapping.
Path *string `json:"path,omitempty"`
}
EmailAttachment File attached to an email send. The attachment bytes are passed as base64-encoded `content` directly in the request body (required). The `path` field (provide a URL and Bird fetches the attachment for you) is a preview feature and currently unavailable. Requests are rejected with 422 if `content` is missing — `path` alone does not satisfy the schema. When `path` becomes generally available, the schema will be relaxed so that exactly one of `content` or `path` is required. Inline images for `<img src="cid:..."/>` references in the HTML body use the `content_id` field together with `content`. Bird enforces a **20 MB estimated generated message size** cap. The estimate is the HTML and text body plus all attachments and inline images measured after base64 encoding. This is not a raw file-size cap. As a rule of thumb, keep total raw attachment content at or below **15 MB** so the generated message has enough room after encoding and MIME wrapping. Recipient-side delivery reality: downstream limits vary by product and tenant/server policy. Gmail personal and Outlook.com document 25 MB attachment limits. Exchange Online defaults to 35 MB send / 36 MB receive, but admins can configure limits; on-prem Exchange Server organizational defaults are 10 MB. Sends close to Bird's 20 MB generated-message cap may be accepted by Bird but bounce at the recipient's mail server. Batch sends can include attachments on individual message objects. Each message still has the 20 MB estimated generated-size cap, and the serialized JSON request body for the whole batch has a hard 20 MB cap. Certain executable / script content types are rejected at validation time.
type EmailAttachmentID ¶ added in v0.2.0
type EmailAttachmentID = string
EmailAttachmentID defines model for EmailAttachmentID.
type EmailAttachmentRef ¶
type EmailAttachmentRef struct {
// ContentId The Content-ID set at send time, when the attachment was inline.
ContentId *string `json:"content_id,omitempty"`
// ContentType Resolved MIME type at send time.
ContentType *string `json:"content_type,omitempty"`
// Filename Filename as shown to the recipient.
Filename string `json:"filename"`
Id *EmailAttachmentID `json:"id,omitempty"`
// Inline True when the attachment was sent inline via a `content_id` reference in the HTML body, false for regular file attachments.
Inline *bool `json:"inline,omitempty"`
// Size Decoded size in bytes.
Size int `json:"size"`
}
EmailAttachmentRef Attachment metadata returned on API reads. The original content is not echoed back inline — only the metadata needed for display and audit. To download the raw attachment bytes (while content storage is enabled and within the retention window), use `GET /v1/email/messages/{message_id}/attachments/{attachment_id}`, which returns the file with its own content type and a Content-Disposition filename.
type EmailBounceType ¶
type EmailBounceType string
EmailBounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
const ( EmailBounceTypeAdmin EmailBounceType = "admin" EmailBounceTypeBlock EmailBounceType = "block" EmailBounceTypeHard EmailBounceType = "hard" EmailBounceTypeSoft EmailBounceType = "soft" EmailBounceTypeUndetermined EmailBounceType = "undetermined" )
Defines values for EmailBounceType.
func (EmailBounceType) Valid ¶
func (e EmailBounceType) Valid() bool
Valid indicates whether the value is a known member of the EmailBounceType enum.
type EmailEvent ¶
type EmailEvent struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage. Lets you distinguish, for example, a DNS failure from a spam block when both would be `bounce_type: soft` or `bounce_type: block`. Present on `email.bounced`, `email.out_of_band_bounce`, and `email.deferred`.
BounceClass *int `json:"bounce_class,omitempty"`
// BounceCode SMTP status code returned by the receiving mail server. Present on `email.bounced` and `email.deferred` events.
BounceCode *string `json:"bounce_code,omitempty"`
// BounceDescription Human-readable bounce reason. Present on `email.bounced` and `email.deferred` events.
BounceDescription *string `json:"bounce_description,omitempty"`
// BounceType Bounce classification. Present on `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType *EmailEventBounceType `json:"bounce_type,omitempty"`
// Country ISO 3166-1 alpha-2 country code derived from the client IP. Present on `email.opened` and `email.clicked` events when available.
Country *string `json:"country,omitempty"`
// Id Event ID.
Id *string `json:"id,omitempty"`
// IpAddress Client IP address (IPv4 or IPv6). Present on `email.opened` and `email.clicked` events when available.
IpAddress *string `json:"ip_address,omitempty"`
// IsPrefetched True when the open was auto-fetched by an inbox privacy feature (Apple Mail Privacy Protection, Gmail image proxy) rather than a real user action. Useful for accurate open-rate calculation. Present on `email.opened` only.
IsPrefetched *bool `json:"is_prefetched,omitempty"`
// OccurredAt When this event occurred.
OccurredAt time.Time `json:"occurred_at"`
RecipientId RecipientID `json:"recipient_id"`
// RejectionReason Specific cause of rejection. Present on `email.rejected` events only. See `EmailRecipient.rejection_reason` for the meaning of each value.
RejectionReason *EmailEventRejectionReason `json:"rejection_reason,omitempty"`
// SendingIp The IP address Bird used to send this message. Useful when investigating deliverability issues that correlate with specific IPs. Present on `email.delivered`, `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events.
SendingIp *string `json:"sending_ip,omitempty"`
// Type Type of an event in a message's per-recipient delivery timeline. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
Type EmailEventType `json:"type"`
// Url The clicked URL. Present on `email.clicked` events.
Url *string `json:"url,omitempty"`
// UserAgent Client user-agent string. Present on `email.opened` and `email.clicked` events when available.
UserAgent *string `json:"user_agent,omitempty"`
}
EmailEvent defines model for EmailEvent.
type EmailEventBounceType ¶
type EmailEventBounceType string
EmailEventBounceType Bounce classification. Present on `email.bounced`, `email.out_of_band_bounce`, and `email.deferred` events. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
const ( EmailEventBounceTypeAdmin EmailEventBounceType = "admin" EmailEventBounceTypeBlock EmailEventBounceType = "block" EmailEventBounceTypeHard EmailEventBounceType = "hard" EmailEventBounceTypeLessThannil EmailEventBounceType = "<nil>" EmailEventBounceTypeSoft EmailEventBounceType = "soft" EmailEventBounceTypeUndetermined EmailEventBounceType = "undetermined" )
Defines values for EmailEventBounceType.
func (EmailEventBounceType) Valid ¶
func (e EmailEventBounceType) Valid() bool
Valid indicates whether the value is a known member of the EmailEventBounceType enum.
type EmailEventList ¶
type EmailEventList struct {
// Data Page of timeline events for this email send, in chronological order.
Data []EmailEvent `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
EmailEventList defines model for EmailEventList.
type EmailEventRejectionReason ¶
type EmailEventRejectionReason string
EmailEventRejectionReason Specific cause of rejection. Present on `email.rejected` events only. See `EmailRecipient.rejection_reason` for the meaning of each value.
const ( EmailEventRejectionReasonDomainUnverified EmailEventRejectionReason = "domain_unverified" EmailEventRejectionReasonGenerationFailure EmailEventRejectionReason = "generation_failure" EmailEventRejectionReasonLessThannil EmailEventRejectionReason = "<nil>" EmailEventRejectionReasonPolicyRejection EmailEventRejectionReason = "policy_rejection" EmailEventRejectionReasonQuotaExceeded EmailEventRejectionReason = "quota_exceeded" EmailEventRejectionReasonRecipientNotAllowed EmailEventRejectionReason = "recipient_not_allowed" EmailEventRejectionReasonRecipientSuppressed EmailEventRejectionReason = "recipient_suppressed" EmailEventRejectionReasonTransmissionFailed EmailEventRejectionReason = "transmission_failed" )
Defines values for EmailEventRejectionReason.
func (EmailEventRejectionReason) Valid ¶
func (e EmailEventRejectionReason) Valid() bool
Valid indicates whether the value is a known member of the EmailEventRejectionReason enum.
type EmailEventType ¶ added in v0.2.0
type EmailEventType = string
EmailEventType Type of an event in a message's per-recipient delivery timeline. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
type EmailInboundRouteID ¶ added in v0.4.1
type EmailInboundRouteID = string
EmailInboundRouteID defines model for EmailInboundRouteID.
type EmailLabelsUpdate ¶ added in v0.4.1
type EmailLabelsUpdate struct {
// Add Labels to apply.
Add *[]string `json:"add,omitempty"`
// Remove Labels to take off.
Remove *[]string `json:"remove,omitempty"`
}
EmailLabelsUpdate Label changes to apply. Labels in `add` are applied and labels in `remove` are taken off; other labels are left untouched. Adding a label that is already present, or removing one that is not, has no effect.
type EmailMailboxComposeRequest ¶ added in v0.4.1
type EmailMailboxComposeRequest struct {
// Attachments File attachments. The send is rejected when the estimated generated message size exceeds 20 MB (bodies plus all attachments after base64 encoding). Attachment metadata endures on the message's `attachment_manifest`; the bytes are downloadable for 30 days.
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 — controls suppression policy. `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Default: transactional.
Category *EmailMailboxComposeRequestCategory `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"`
// Html HTML body. At least one of html or text must be provided.
Html *string `json:"html,omitempty"`
// Metadata Arbitrary JSON object stored on the send and echoed in webhook payloads. Cap: 2 KB serialized.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// ReplyTo Reply-To addresses. When omitted, the mailbox's `default_reply_to` applies (replies then come back to the mailbox itself).
ReplyTo *[]EmailAddressInput `json:"reply_to,omitempty"`
// Subject Message subject line.
Subject string `json:"subject"`
// Tags Structured `{name, value}` labels for filtering and analytics on the sent-message log. Cap: 20 tags per send.
Tags *[]Tag `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"`
}
EmailMailboxComposeRequest A new message sent from a mailbox, starting a new conversation. Mirrors the plain send request minus `from` — the mailbox is the sender identity — and minus `scheduled_at` (mailbox sends are immediate). Bird mints the RFC 5322 Message-ID so replies thread back to this conversation. At least one of `html` or `text` must be provided.
type EmailMailboxComposeRequestCategory ¶ added in v0.4.1
type EmailMailboxComposeRequestCategory string
EmailMailboxComposeRequestCategory Content classification — controls suppression policy. `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Default: transactional.
const ( EmailMailboxComposeRequestCategoryMarketing EmailMailboxComposeRequestCategory = "marketing" EmailMailboxComposeRequestCategoryTransactional EmailMailboxComposeRequestCategory = "transactional" )
Defines values for EmailMailboxComposeRequestCategory.
func (EmailMailboxComposeRequestCategory) Valid ¶ added in v0.4.1
func (e EmailMailboxComposeRequestCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailMailboxComposeRequestCategory enum.
type EmailMessage ¶
type EmailMessage struct {
// AcceptedCount Number of recipients currently in the `accepted` state — Bird has the send and is preparing to deliver.
AcceptedCount *int `json:"accepted_count,omitempty"`
// Attachments Attachment metadata for the send. Empty when no attachments were included. Raw content is not echoed; use the future content-retrieval endpoint when storage is enabled.
Attachments *[]EmailAttachmentRef `json:"attachments,omitempty"`
// Bcc BCC recipients.
Bcc *[]EmailAddress `json:"bcc,omitempty"`
// BouncedCount Number of recipients that resulted in a permanent delivery failure.
BouncedCount *int `json:"bounced_count,omitempty"`
// Category Content classification. Controls suppression policy — `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions.
Category EmailMessageCategory `json:"category"`
// Cc CC recipients.
Cc *[]EmailAddress `json:"cc,omitempty"`
// ClickCount Total click events across all recipients.
ClickCount *int `json:"click_count,omitempty"`
// ComplainedCount Number of recipients that reported spam.
ComplainedCount *int `json:"complained_count,omitempty"`
// CreatedAt When the send request was accepted.
CreatedAt *time.Time `json:"created_at,omitempty"`
// DeferredCount Number of recipients in transient delivery deferral; the provider is retrying.
DeferredCount *int `json:"deferred_count,omitempty"`
// DeliveredAt When all recipients reached a terminal delivered state, or null if not yet fully delivered.
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
// DeliveredCount Number of recipients whose messages were accepted by the remote MTA.
DeliveredCount *int `json:"delivered_count,omitempty"`
// DeliveryLatencyMs Time between the message being processed and the receiving mail server accepting it, in milliseconds, for the fastest delivered recipient. Null until the first recipient is delivered.
DeliveryLatencyMs *int `json:"delivery_latency_ms,omitempty"`
// From An email address with an optional display name.
From EmailAddress `json:"from"`
Id EmailID `json:"id"`
// InReplyToMessageId The message this one is a reply to, if any.
InReplyToMessageId *EmailID `json:"in_reply_to_message_id,omitempty"`
// Metadata Arbitrary JSON metadata stored on the message object and echoed in webhook payloads. See EmailMessageSendRequest for the tags vs metadata distinction.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// OpenCount Total open events across all recipients.
OpenCount *int `json:"open_count,omitempty"`
// ProcessedCount Number of recipients for whom Bird has processed the message and queued it for delivery.
ProcessedCount *int `json:"processed_count,omitempty"`
// ProcessingLatencyMs Time between Bird accepting the send and the message being processed for delivery, in milliseconds, for the fastest recipient. Null until the first recipient reaches `processed`.
ProcessingLatencyMs *int `json:"processing_latency_ms,omitempty"`
// RejectedCount Number of recipients rejected before delivery. See the per-recipient `rejection_reason` field on `GET /v1/email/messages/{message_id}/recipients` for the specific cause (suppression match, transmission failure, generation failure, or policy refusal).
RejectedCount *int `json:"rejected_count,omitempty"`
// ReplyTo Reply-To addresses, if set on the send. Empty/null when no Reply-To was provided.
ReplyTo *[]EmailAddress `json:"reply_to,omitempty"`
// ScheduledAt When this message is scheduled to send, for a send created with a future send time. Null for an immediate send. Stays set after the scheduled send fires.
ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
// Status Aggregate delivery status derived from recipient states. `scheduled` means the message is queued to send at a future time and has not been dispatched yet. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server. `canceled` means a scheduled message was canceled before it was sent.
Status *EmailMessageStatus `json:"status,omitempty"`
// Subject Message subject line.
Subject string `json:"subject"`
// Tags Structured `{name, value}` filter labels applied to this send. See EmailMessageSendRequest for the tags vs metadata distinction.
Tags *[]Tag `json:"tags,omitempty"`
// ThreadId Thread this message belongs to. Null until threading is enabled.
ThreadId *string `json:"thread_id,omitempty"`
// To Primary recipients. Length is the recipient count; use the broadcasts endpoint for audience-targeted sends. Each entry's `name` is present when a display name was provided on the send.
To []EmailAddress `json:"to"`
// TotalLatencyMs End-to-end accept → delivered time for the fastest delivered recipient, in milliseconds. Null until the first recipient is delivered.
TotalLatencyMs *int `json:"total_latency_ms,omitempty"`
// TrackClicks Whether click tracking is enabled for this send.
TrackClicks bool `json:"track_clicks"`
// TrackOpens Whether open tracking is enabled for this send.
TrackOpens bool `json:"track_opens"`
}
EmailMessage defines model for EmailMessage.
type EmailMessageBatchItem ¶
type EmailMessageBatchItem struct {
// Category Resolved category for this batch item.
Category EmailMessageBatchItemCategory `json:"category"`
Id EmailID `json:"id"`
// Status Initial status of this message in the batch.
Status *EmailMessageBatchItemStatus `json:"status,omitempty"`
}
EmailMessageBatchItem defines model for EmailMessageBatchItem.
type EmailMessageBatchItemCategory ¶
type EmailMessageBatchItemCategory string
EmailMessageBatchItemCategory Resolved category for this batch item.
const ( EmailMessageBatchItemCategoryMarketing EmailMessageBatchItemCategory = "marketing" EmailMessageBatchItemCategoryTransactional EmailMessageBatchItemCategory = "transactional" )
Defines values for EmailMessageBatchItemCategory.
func (EmailMessageBatchItemCategory) Valid ¶
func (e EmailMessageBatchItemCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageBatchItemCategory enum.
type EmailMessageBatchItemStatus ¶
type EmailMessageBatchItemStatus string
EmailMessageBatchItemStatus Initial status of this message in the batch.
const (
EmailMessageBatchItemStatusAccepted EmailMessageBatchItemStatus = "accepted"
)
Defines values for EmailMessageBatchItemStatus.
func (EmailMessageBatchItemStatus) Valid ¶
func (e EmailMessageBatchItemStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageBatchItemStatus enum.
type EmailMessageBatchRequest ¶
type EmailMessageBatchRequest = []EmailMessageSendRequest
EmailMessageBatchRequest Batch of email message send requests. All items are validated before any are queued. Attachments are allowed on individual messages. Each message must stay within the 20 MB estimated generated message-size cap. The serialized JSON request body for the batch has a hard 20 MB cap.
type EmailMessageBatchResponse ¶
type EmailMessageBatchResponse struct {
// Data One entry per message in the batch, in submission order.
Data []EmailMessageBatchItem `json:"data"`
}
EmailMessageBatchResponse defines model for EmailMessageBatchResponse.
type EmailMessageCategory ¶
type EmailMessageCategory string
EmailMessageCategory Content classification. Controls suppression policy — `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions.
const ( EmailMessageCategoryMarketing EmailMessageCategory = "marketing" EmailMessageCategoryTransactional EmailMessageCategory = "transactional" )
Defines values for EmailMessageCategory.
func (EmailMessageCategory) Valid ¶
func (e EmailMessageCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageCategory enum.
type EmailMessageContent ¶
type EmailMessageContent struct {
// Html The HTML body of the message, if it was stored.
Html *string `json:"html,omitempty"`
// Text The plain-text body of the message, if it was stored.
Text *string `json:"text,omitempty"`
}
EmailMessageContent The stored body content of a sent email message.
type EmailMessageList ¶
type EmailMessageList struct {
// Data Page of message objects.
Data []EmailMessage `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
EmailMessageList defines model for EmailMessageList.
type EmailMessageSendRequest ¶
type EmailMessageSendRequest struct {
// Attachments File attachments. Bird rejects sends whose estimated generated message size exceeds 20 MB. The estimate is the HTML and text body plus all attachments and inline images measured after base64 encoding. Keep total raw attachment content at or below 15 MB for reliable headroom. In batch sends, this per-message cap still applies and the serialized JSON request body for the whole batch has a hard 20 MB cap. See the EmailAttachment schema for the full field contract.
Attachments *[]EmailAttachment `json:"attachments,omitempty"`
// Bcc BCC recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
Bcc *[]EmailAddressInput `json:"bcc,omitempty"`
// Category Content classification — independent of which endpoint you use. Controls suppression policy: `marketing` blocks on all suppression reasons (use for marketing content); `transactional` allows delivery through complaint and unsubscribe suppressions (use for receipts, password resets, and similar operational messages). Default: marketing.
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 (for example `References`, `In-Reply-To`, or your own `X-*` headers). Reserved headers are rejected with a `422`: set the message's addressing and subject through the dedicated fields (`from`, `to`, `cc`, `bcc`, `reply_to`, `subject`) rather than here, and headers the platform generates for you — `Content-Type`, `Content-Transfer-Encoding`, `DKIM-Signature`, `Received`, and `Return-Path` — cannot be overridden. `List-Unsubscribe` and `List-Unsubscribe-Post` are honored as-is on `transactional` sends; on `marketing` sends the platform sets a compliant unsubscribe header for you, so supplying them there is rejected with a `422`. Header values may not contain carriage-return or line-feed characters.
Headers *map[string]string `json:"headers,omitempty"`
// Html HTML body. At least one of html or text must be provided.
Html *string `json:"html,omitempty"`
InReplyToMessageId *EmailID `json:"in_reply_to_message_id,omitempty"`
// IpPoolId ID of the IP pool to send from (`ipp_` prefix), or `ipp_shared` to route through the shared pool explicitly. Omit to use your organization's default pool. An unknown pool, or a pool with no dedicated IPs available to send from, is rejected with a `422`.
IpPoolId *string `json:"ip_pool_id,omitempty"`
// Metadata Arbitrary JSON object **stored, returned on API reads, and echoed in webhook payloads**. Path-queryable in analytics (e.g. filter on `metadata.order_id`) but not surfaced as a first-class dashboard filter dimension. Cap: 2 KB serialized. Use metadata for per-send context like internal IDs, foreign keys, and structured payloads you want round-tripped through events. For low-cardinality filterable labels, use `tags` instead.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Parameters Template variables used to personalize inline content. Tokens in the subject and body (e.g. `{{ first_name }}`) are replaced with these values at send time. Shared across all recipients of this send. A token with no matching key renders empty. Cap: 16 KB serialized. When sending a stored `template`, put the values in `template.parameters` instead.
Parameters *map[string]interface{} `json:"parameters,omitempty"`
// ReplyTo Reply-To addresses, each a plain email string, an RFC 5322 mailbox string, or an object with an optional display name. RFC 5322 allows multiple. Every recipient reply hits all listed addresses, so 1-2 is typical; the 25 cap exists to prevent runaway header sizes that some MTAs reject.
ReplyTo *[]EmailAddressInput `json:"reply_to,omitempty"`
// ScheduledAt Schedule the message to send at a future time instead of immediately. Must be at least 30 seconds and at most 30 days ahead — outside that range the request is rejected with `422`. The message returns with status `accepted` and shows as `scheduled` on reads until it sends; cancel it before then with the message cancel endpoint. Scheduled sends count against your plan's monthly scheduled-email allowance; exceeding it is rejected with a `422`.
ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
// Subject Message subject line. Required for inline sends; omit it when sending a `template` (the template supplies the subject).
Subject *string `json:"subject,omitempty"`
// Tags Structured `{name, value}` labels for **filtering and analytics**. Tags become first-class query dimensions: filter the list endpoint by tag name, slice analytics rollups by tag, and surface in webhook payloads. Cap: 20 tags per send. Use tags for low-cardinality dimensions (`category`, `experiment_variant`, `template_id`). For arbitrary structured context that you do not need as a filter dimension, use `metadata` instead.
Tags *[]Tag `json:"tags,omitempty"`
// Template Send a stored template instead of inline content. When set, omit `subject`/`html`/`text` — the template supplies them; personalize with `template.parameters`.
Template *EmailTemplateSend `json:"template,omitempty"`
// Text Plain-text body. At least one of html or text must be provided.
Text *string `json:"text,omitempty"`
// To Primary recipients. Each entry is a plain email string, an RFC 5322 mailbox string (`Jane <jane@example.com>`), or an object with an optional display name.
To []EmailAddressInput `json:"to"`
// TopicId Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422 unsupported_feature`. When generally available, a non-empty `topic_id` gates delivery on the recipient's opt-in state for that topic — if the recipient is opt_out, the send is silently suppressed and an `email.suppressed` event fires with `reason: topic_opt_out`.
TopicId *string `json:"topic_id,omitempty"`
// TrackClicks Whether to track click events for this message.
TrackClicks *bool `json:"track_clicks,omitempty"`
// TrackOpens Whether to track open events for this message.
TrackOpens *bool `json:"track_opens,omitempty"`
}
EmailMessageSendRequest defines model for EmailMessageSendRequest.
type EmailMessageSendRequestCategory ¶
type EmailMessageSendRequestCategory string
EmailMessageSendRequestCategory Content classification — independent of which endpoint you use. Controls suppression policy: `marketing` blocks on all suppression reasons (use for marketing content); `transactional` allows delivery through complaint and unsubscribe suppressions (use for receipts, password resets, and similar operational messages). Default: marketing.
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 of an email, derived from its recipients' states. `scheduled` means the message is queued to send at a future time and has not been dispatched yet; `canceled` means a scheduled message was canceled before it was sent.
const ( EmailMessageStatusAccepted EmailMessageStatus = "accepted" EmailMessageStatusBounced EmailMessageStatus = "bounced" EmailMessageStatusCanceled EmailMessageStatus = "canceled" EmailMessageStatusComplained EmailMessageStatus = "complained" EmailMessageStatusDeferred EmailMessageStatus = "deferred" EmailMessageStatusDelivered EmailMessageStatus = "delivered" EmailMessageStatusPartialFailure EmailMessageStatus = "partial_failure" EmailMessageStatusProcessed EmailMessageStatus = "processed" EmailMessageStatusRejected EmailMessageStatus = "rejected" EmailMessageStatusScheduled EmailMessageStatus = "scheduled" )
Defines values for EmailMessageStatus.
func (EmailMessageStatus) Valid ¶
func (e EmailMessageStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailMessageStatus enum.
type EmailRecipient ¶
type EmailRecipient struct {
// BounceCode SMTP reply code returned by the receiving mail server for `bounced` and `deferred` rows, or null when none was provided.
BounceCode *string `json:"bounce_code,omitempty"`
// BounceDescription Human-readable reason the receiving mail server gave for the bounce or deferral, or null when none was provided.
BounceDescription *string `json:"bounce_description,omitempty"`
// BounceType Bounce classification for `bounced` and `deferred` rows, or null when the recipient has not bounced or the receiving server's response has not been classified. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType *EmailRecipientBounceType `json:"bounce_type,omitempty"`
// ClickCount Number of click events for this recipient.
ClickCount *int `json:"click_count,omitempty"`
// DeliveredAt When the recipient's mail server accepted the message, or null if not yet delivered.
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
// DeliveryLatencyMs Time between Bird processing the message and the receiving mail server accepting it, in milliseconds. Null until delivered.
DeliveryLatencyMs *int `json:"delivery_latency_ms,omitempty"`
Id RecipientID `json:"id"`
// Name Display name provided for this recipient on the send, or null if none was given.
Name *string `json:"name,omitempty"`
// OpenCount Number of open events for this recipient.
OpenCount *int `json:"open_count,omitempty"`
// ParentId ID of the parent message (em_ prefix) or broadcast (eb_ prefix) this recipient belongs to.
ParentId string `json:"parent_id"`
// ProcessedAt When Bird processed the message and queued it for delivery to the recipient's mail server, or null if not yet processed.
ProcessedAt *time.Time `json:"processed_at,omitempty"`
// ProcessingLatencyMs Time between Bird accepting the send and processing the message for delivery, in milliseconds. Null until processed.
ProcessingLatencyMs *int `json:"processing_latency_ms,omitempty"`
// Recipient Recipient email address.
Recipient openapi_types.Email `json:"recipient"`
// RejectionReason Present on `status: rejected` rows. Specifies why the recipient was rejected:
// - `recipient_suppressed`: the recipient is on the workspace suppression list. Bird
// did not attempt delivery.
// - `transmission_failed`: the message could not be transmitted for delivery. - `generation_failure`: the message could not be built for delivery (template or
// content issue).
// - `policy_rejection`: the message was refused by sending policy. - `domain_unverified`: the sending domain was not verified. - `quota_exceeded`: the organization's send quota was reached. - `recipient_not_allowed`: a recipient was not permitted for this send (for shared
// onboarding-domain sends, recipients must be verified workspace members).
RejectionReason *EmailRecipientRejectionReason `json:"rejection_reason,omitempty"`
// Role Envelope position of a recipient on an outbound email event.
Role RecipientRole `json:"role"`
// Status Delivery status for this recipient. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server.
Status *EmailRecipientStatus `json:"status,omitempty"`
// TotalLatencyMs End-to-end accept → delivered time for this recipient, in milliseconds. Null until delivered.
TotalLatencyMs *int `json:"total_latency_ms,omitempty"`
}
EmailRecipient defines model for EmailRecipient.
type EmailRecipientBounceType ¶ added in v0.2.1
type EmailRecipientBounceType string
EmailRecipientBounceType Bounce classification for `bounced` and `deferred` rows, or null when the recipient has not bounced or the receiving server's response has not been classified. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
const ( EmailRecipientBounceTypeAdmin EmailRecipientBounceType = "admin" EmailRecipientBounceTypeBlock EmailRecipientBounceType = "block" EmailRecipientBounceTypeHard EmailRecipientBounceType = "hard" EmailRecipientBounceTypeLessThannil EmailRecipientBounceType = "<nil>" EmailRecipientBounceTypeSoft EmailRecipientBounceType = "soft" EmailRecipientBounceTypeUndetermined EmailRecipientBounceType = "undetermined" )
Defines values for EmailRecipientBounceType.
func (EmailRecipientBounceType) Valid ¶ added in v0.2.1
func (e EmailRecipientBounceType) Valid() bool
Valid indicates whether the value is a known member of the EmailRecipientBounceType enum.
type EmailRecipientList ¶
type EmailRecipientList struct {
// Data Page of recipient objects for this email send.
Data []EmailRecipient `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
EmailRecipientList defines model for EmailRecipientList.
type EmailRecipientRejectionReason ¶
type EmailRecipientRejectionReason string
EmailRecipientRejectionReason Present on `status: rejected` rows. Specifies why the recipient was rejected:
- `recipient_suppressed`: the recipient is on the workspace suppression list. Bird did not attempt delivery.
- `transmission_failed`: the message could not be transmitted for delivery. - `generation_failure`: the message could not be built for delivery (template or content issue).
- `policy_rejection`: the message was refused by sending policy. - `domain_unverified`: the sending domain was not verified. - `quota_exceeded`: the organization's send quota was reached. - `recipient_not_allowed`: a recipient was not permitted for this send (for shared onboarding-domain sends, recipients must be verified workspace members).
const ( EmailRecipientRejectionReasonDomainUnverified EmailRecipientRejectionReason = "domain_unverified" EmailRecipientRejectionReasonGenerationFailure EmailRecipientRejectionReason = "generation_failure" EmailRecipientRejectionReasonLessThannil EmailRecipientRejectionReason = "<nil>" EmailRecipientRejectionReasonPolicyRejection EmailRecipientRejectionReason = "policy_rejection" EmailRecipientRejectionReasonQuotaExceeded EmailRecipientRejectionReason = "quota_exceeded" EmailRecipientRejectionReasonRecipientNotAllowed EmailRecipientRejectionReason = "recipient_not_allowed" EmailRecipientRejectionReasonRecipientSuppressed EmailRecipientRejectionReason = "recipient_suppressed" EmailRecipientRejectionReasonTransmissionFailed EmailRecipientRejectionReason = "transmission_failed" )
Defines values for EmailRecipientRejectionReason.
func (EmailRecipientRejectionReason) Valid ¶
func (e EmailRecipientRejectionReason) Valid() bool
Valid indicates whether the value is a known member of the EmailRecipientRejectionReason enum.
type EmailRecipientStatus ¶
type EmailRecipientStatus string
EmailRecipientStatus Delivery status for this recipient. `accepted` means Bird has the send and is preparing to deliver. `processed` means Bird has processed the message and queued it for delivery to the recipient's mail server.
const ( EmailRecipientStatusAccepted EmailRecipientStatus = "accepted" EmailRecipientStatusBounced EmailRecipientStatus = "bounced" EmailRecipientStatusComplained EmailRecipientStatus = "complained" EmailRecipientStatusDeferred EmailRecipientStatus = "deferred" EmailRecipientStatusDelivered EmailRecipientStatus = "delivered" EmailRecipientStatusProcessed EmailRecipientStatus = "processed" EmailRecipientStatusRejected EmailRecipientStatus = "rejected" )
Defines values for EmailRecipientStatus.
func (EmailRecipientStatus) Valid ¶
func (e EmailRecipientStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailRecipientStatus enum.
type EmailRejectionReason ¶
type EmailRejectionReason string
EmailRejectionReason Why an email was rejected before delivery. `recipient_suppressed` means the recipient is on the workspace suppression list, so Bird did not attempt delivery. `transmission_failed` means the message could not be transmitted for delivery. `generation_failure` means the message could not be built for delivery (a template or content issue). `policy_rejection` means the message was refused by sending policy. `domain_unverified` means the sending domain was not verified. `quota_exceeded` means the organization's send quota was reached. `recipient_not_allowed` means a recipient was not permitted for this send (for shared onboarding-domain sends, recipients must be verified workspace members).
const ( EmailRejectionReasonDomainUnverified EmailRejectionReason = "domain_unverified" EmailRejectionReasonGenerationFailure EmailRejectionReason = "generation_failure" EmailRejectionReasonPolicyRejection EmailRejectionReason = "policy_rejection" EmailRejectionReasonQuotaExceeded EmailRejectionReason = "quota_exceeded" EmailRejectionReasonRecipientNotAllowed EmailRejectionReason = "recipient_not_allowed" EmailRejectionReasonRecipientSuppressed EmailRejectionReason = "recipient_suppressed" EmailRejectionReasonTransmissionFailed EmailRejectionReason = "transmission_failed" )
Defines values for EmailRejectionReason.
func (EmailRejectionReason) Valid ¶
func (e EmailRejectionReason) Valid() bool
Valid indicates whether the value is a known member of the EmailRejectionReason enum.
type EmailSmtpConfig ¶ added in v0.4.0
type EmailSmtpConfig struct {
ApiKeyId APIKeyID `json:"api_key_id"`
// Category Content classification applied to messages submitted over SMTP with this key. Controls suppression policy: `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions.
Category EmailSmtpConfigCategory `json:"category"`
CreatedAt *time.Time `json:"created_at,omitempty"`
// IpPoolId ID of the IP pool that SMTP sends with this key use, or `ipp_shared` for the shared pool. `null` when this key uses your organization's default pool.
IpPoolId *string `json:"ip_pool_id,omitempty"`
// Tags Structured `{name, value}` labels applied to every message submitted over SMTP with this key — the same tags used by the email sending API. See EmailMessageSendRequest for how tags are used for filtering and analytics.
Tags []Tag `json:"tags"`
// TrackClicks Whether click events are tracked for messages submitted over SMTP with this key.
TrackClicks bool `json:"track_clicks"`
// TrackOpens Whether open events are tracked for messages submitted over SMTP with this key.
TrackOpens bool `json:"track_opens"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
EmailSmtpConfig defines model for EmailSmtpConfig.
type EmailSmtpConfigCategory ¶ added in v0.4.0
type EmailSmtpConfigCategory string
EmailSmtpConfigCategory Content classification applied to messages submitted over SMTP with this key. Controls suppression policy: `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions.
const ( EmailSmtpConfigCategoryMarketing EmailSmtpConfigCategory = "marketing" EmailSmtpConfigCategoryTransactional EmailSmtpConfigCategory = "transactional" )
Defines values for EmailSmtpConfigCategory.
func (EmailSmtpConfigCategory) Valid ¶ added in v0.4.0
func (e EmailSmtpConfigCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailSmtpConfigCategory enum.
type EmailSmtpConfigList ¶ added in v0.4.0
type EmailSmtpConfigList struct {
Data []EmailSmtpConfig `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"`
}
EmailSmtpConfigList defines model for EmailSmtpConfigList.
type EmailSmtpConfigUpdate ¶ added in v0.4.0
type EmailSmtpConfigUpdate struct {
// Category Content classification — independent of which endpoint messages are submitted through. Controls suppression policy: `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Omit to leave unchanged.
Category *EmailSmtpConfigUpdateCategory `json:"category,omitempty"`
// IpPoolId ID of the IP pool to send from (`ipp_` prefix), or `ipp_shared` to route through the shared pool explicitly. Send `null` to reset to your organization's default pool, or omit to leave unchanged. 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"`
// Tags Structured `{name, value}` labels applied to every message submitted over SMTP with this key. Send an empty array to clear all tags, or omit to leave unchanged.
Tags *[]Tag `json:"tags,omitempty"`
// TrackClicks Whether to track click events for messages submitted over SMTP with this key. Omit to leave unchanged.
TrackClicks *bool `json:"track_clicks,omitempty"`
// TrackOpens Whether to track open events for messages submitted over SMTP with this key. Omit to leave unchanged.
TrackOpens *bool `json:"track_opens,omitempty"`
}
EmailSmtpConfigUpdate Desired changes to the SMTP config for the key. A field you omit is left unchanged; if no config exists yet for this key, omitted fields take their documented defaults instead.
type EmailSmtpConfigUpdateCategory ¶ added in v0.4.0
type EmailSmtpConfigUpdateCategory string
EmailSmtpConfigUpdateCategory Content classification — independent of which endpoint messages are submitted through. Controls suppression policy: `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Omit to leave unchanged.
const ( EmailSmtpConfigUpdateCategoryMarketing EmailSmtpConfigUpdateCategory = "marketing" EmailSmtpConfigUpdateCategoryTransactional EmailSmtpConfigUpdateCategory = "transactional" )
Defines values for EmailSmtpConfigUpdateCategory.
func (EmailSmtpConfigUpdateCategory) Valid ¶ added in v0.4.0
func (e EmailSmtpConfigUpdateCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailSmtpConfigUpdateCategory enum.
type EmailTemplateID ¶ added in v0.3.0
type EmailTemplateID = string
EmailTemplateID defines model for EmailTemplateID.
type EmailTemplateSend ¶ added in v0.3.0
type EmailTemplateSend struct {
Id *EmailTemplateID `json:"id,omitempty"`
// Name The template to send, by its name handle (for example `welcome-email`).
Name *TemplateName `json:"name,omitempty"`
// Parameters Values for the template's variables, keyed by variable name. A token with no matching value renders empty. Cap: 16 KB serialized.
Parameters *map[string]interface{} `json:"parameters,omitempty"`
// contains filtered or unexported fields
}
EmailTemplateSend A send-by-template reference. Identify the template by its `id` or its `name` (supply exactly one), and pass its variable values in `parameters`.
func (EmailTemplateSend) AsEmailTemplateSend0 ¶ added in v0.3.0
func (t EmailTemplateSend) AsEmailTemplateSend0() (EmailTemplateSend0, error)
AsEmailTemplateSend0 returns the union data inside the EmailTemplateSend as a EmailTemplateSend0
func (EmailTemplateSend) AsEmailTemplateSend1 ¶ added in v0.3.0
func (t EmailTemplateSend) AsEmailTemplateSend1() (EmailTemplateSend1, error)
AsEmailTemplateSend1 returns the union data inside the EmailTemplateSend as a EmailTemplateSend1
func (*EmailTemplateSend) FromEmailTemplateSend0 ¶ added in v0.3.0
func (t *EmailTemplateSend) FromEmailTemplateSend0(v EmailTemplateSend0) error
FromEmailTemplateSend0 overwrites any union data inside the EmailTemplateSend as the provided EmailTemplateSend0
func (*EmailTemplateSend) FromEmailTemplateSend1 ¶ added in v0.3.0
func (t *EmailTemplateSend) FromEmailTemplateSend1(v EmailTemplateSend1) error
FromEmailTemplateSend1 overwrites any union data inside the EmailTemplateSend as the provided EmailTemplateSend1
func (EmailTemplateSend) MarshalJSON ¶ added in v0.3.0
func (t EmailTemplateSend) MarshalJSON() ([]byte, error)
func (*EmailTemplateSend) MergeEmailTemplateSend0 ¶ added in v0.3.0
func (t *EmailTemplateSend) MergeEmailTemplateSend0(v EmailTemplateSend0) error
MergeEmailTemplateSend0 performs a merge with any union data inside the EmailTemplateSend, using the provided EmailTemplateSend0
func (*EmailTemplateSend) MergeEmailTemplateSend1 ¶ added in v0.3.0
func (t *EmailTemplateSend) MergeEmailTemplateSend1(v EmailTemplateSend1) error
MergeEmailTemplateSend1 performs a merge with any union data inside the EmailTemplateSend, using the provided EmailTemplateSend1
func (*EmailTemplateSend) UnmarshalJSON ¶ added in v0.3.0
func (t *EmailTemplateSend) UnmarshalJSON(b []byte) error
type EmailTemplateSend0 ¶ added in v0.3.0
type EmailTemplateSend0 = interface{}
EmailTemplateSend0 defines model for .
type EmailTemplateSend1 ¶ added in v0.3.0
type EmailTemplateSend1 = interface{}
EmailTemplateSend1 defines model for .
type EmailThread ¶ added in v0.4.1
type EmailThread struct {
// Channel Channel this conversation lives on. Always `email`.
Channel *string `json:"channel,omitempty"`
// ContactId Contact linked to this conversation, or null when none is linked.
ContactId *ContactID `json:"contact_id"`
// CreatedAt When the thread was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
Id ThreadID `json:"id"`
// Labels Labels applied to this conversation. A thread carries at most 20 labels.
Labels []string `json:"labels"`
// LastDirection Direction of the most recent message — `inbound` for a received message, `outbound` for a sent one.
LastDirection *EmailThreadLastDirection `json:"last_direction,omitempty"`
// LastMessageAt When the most recent retained message in this conversation was received or sent.
LastMessageAt *time.Time `json:"last_message_at,omitempty"`
MailboxId MailboxID `json:"mailbox_id"`
// MessageCount Number of retained messages in this conversation, both directions.
MessageCount *int `json:"message_count,omitempty"`
// Participants Addresses that appear on the retained messages in this conversation, including the mailbox's own address.
Participants *[]openapi_types.Email `json:"participants,omitempty"`
// Subject Subject of the conversation, taken from its first message. Null when that message had no subject.
Subject *string `json:"subject,omitempty"`
// UnreadCount Number of retained received messages in the inbox that are still unread.
UnreadCount *int `json:"unread_count,omitempty"`
// UpdatedAt When the thread last changed.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
EmailThread A conversation in a mailbox. Threads group related messages both directions — mail the mailbox received and replies it sent — and carry the conversation-level read state, labels, and participant list. Message counts reflect the messages currently retained under the mailbox's retention period.
type EmailThreadLastDirection ¶ added in v0.4.1
type EmailThreadLastDirection string
EmailThreadLastDirection Direction of the most recent message — `inbound` for a received message, `outbound` for a sent one.
const ( EmailThreadLastDirectionInbound EmailThreadLastDirection = "inbound" EmailThreadLastDirectionOutbound EmailThreadLastDirection = "outbound" )
Defines values for EmailThreadLastDirection.
func (EmailThreadLastDirection) Valid ¶ added in v0.4.1
func (e EmailThreadLastDirection) Valid() bool
Valid indicates whether the value is a known member of the EmailThreadLastDirection enum.
type EmailThreadList ¶ added in v0.4.1
type EmailThreadList struct {
Data []EmailThread `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"`
}
EmailThreadList defines model for EmailThreadList.
type EmailThreadMessage ¶ added in v0.4.1
type EmailThreadMessage struct {
// AttachmentCount Number of attachments on the message.
AttachmentCount *int `json:"attachment_count,omitempty"`
// AttachmentManifest Attachment metadata (filename, content type, size). Remains readable for the mailbox's retention period even after the attachment bytes themselves have expired.
AttachmentManifest *[]EmailThreadMessageAttachment `json:"attachment_manifest,omitempty"`
// Cc Recipient addresses on the Cc line. Empty when the message had none.
Cc *[]openapi_types.Email `json:"cc,omitempty"`
// Channel Channel this message was carried on. Always `email`.
Channel *string `json:"channel,omitempty"`
// ContactId Contact linked to this message, or null when none is linked.
ContactId *ContactID `json:"contact_id"`
// DeliveredTo Address the message was actually delivered to, when it differs from the mailbox address (for example mail routed in from another address). Null for sent messages and for mail addressed directly to the mailbox.
DeliveredTo *openapi_types.Email `json:"delivered_to,omitempty"`
// Direction Direction of the message — `inbound` for a received message, `outbound` for a sent one.
Direction *EmailThreadMessageDirection `json:"direction,omitempty"`
// Disposition Where the message landed: `inbox` for accepted mail, `blocked` (receive policy or rules), or `unauthenticated` (failed sender authentication). Null for sent messages. Trash state is carried separately in `trashed_at`.
Disposition *EmailThreadMessageDisposition `json:"disposition"`
// DkimPass Whether DKIM passed for the sender of a received message. Null for sent messages and when no verdict was computable. Durable for the mailbox's retention period.
DkimPass *bool `json:"dkim_pass,omitempty"`
// DmarcPass Whether DMARC passed for the sender of a received message. Null for sent messages and when no verdict was computable. Durable for the mailbox's retention period.
DmarcPass *bool `json:"dmarc_pass,omitempty"`
// ExtractedText Plain-text content of the message with quoted history stripped — readable for the mailbox's full retention period, both directions. Always present when fetching a single message; on list endpoints it is included only when the request sets `include=extracted_text`. Null when no text could be extracted.
ExtractedText *string `json:"extracted_text,omitempty"`
// From Sender address.
From *openapi_types.Email `json:"from,omitempty"`
// Id Message ID. Received messages carry a `rem_` ID, sent messages an `em_` ID — the same IDs used by the received-message and sent-message logs.
Id *string `json:"id,omitempty"`
// Labels Labels applied to this message. A message carries at most 20 labels.
Labels []string `json:"labels"`
// OccurredAt When the message was received or accepted for sending.
OccurredAt *time.Time `json:"occurred_at,omitempty"`
// Preview Short plain-text preview of the message body.
Preview *string `json:"preview,omitempty"`
// Rank Relevance rank of this result. Present only on search results, higher is more relevant.
Rank *float32 `json:"rank,omitempty"`
// Read Whether the message has been marked read. Null for sent messages.
Read *bool `json:"read"`
// Recipients Terminal per-recipient delivery outcomes of a sent message, folded in as they become known — part of the message's durable memory. Null for received messages and before any recipient reaches a terminal state. Per-recipient event detail lives on the sent-message log (`source`) for 30 days.
Recipients *[]EmailThreadMessageRecipient `json:"recipients,omitempty"`
// ReferenceIds RFC 5322 References header entries used to thread the conversation.
ReferenceIds *[]string `json:"reference_ids,omitempty"`
// Source Link to the message's entry in the received-message or sent-message log, which carries delivery analytics such as per-recipient events. Log entries expire 30 days after the message occurred.
Source EmailThreadMessageSource `json:"source"`
// SpfPass Whether SPF passed for the sender of a received message. Null for sent messages and when no verdict was computable. Part of the message's durable memory — readable for the mailbox's full retention period, so the verdict survives after the 30-day inbound log has expired.
SpfPass *bool `json:"spf_pass,omitempty"`
// Status Folded delivery status of a sent message: `accepted`, `sent` (provider handoff), `delivered` (all attempted recipients delivered), or `failed` (terminal failure). Null for received messages.
Status *string `json:"status,omitempty"`
// Subject Message subject. Null when the message had no subject.
Subject *string `json:"subject,omitempty"`
ThreadId ThreadID `json:"thread_id"`
// To Recipient addresses on the To line.
To *[]openapi_types.Email `json:"to,omitempty"`
// TrashedAt When the message was moved to the trash, or null when it is not trashed. Trashed messages are purged 30 days after trashing; restore it with `PATCH {"trashed": false}` before then.
TrashedAt *time.Time `json:"trashed_at,omitempty"`
}
EmailThreadMessage A message in a mailbox conversation, either direction. Message metadata and extracted text remain readable for the mailbox's retention period; the original rendered source (HTML body, raw MIME, attachment bytes) is available through the body, raw, and attachment endpoints for 30 days after the message occurred.
type EmailThreadMessageAttachment ¶ added in v0.4.1
type EmailThreadMessageAttachment struct {
// ContentType MIME content type, or null when it could not be determined.
ContentType *string `json:"content_type,omitempty"`
// Filename Original filename, or null when the attachment had none.
Filename *string `json:"filename,omitempty"`
// Id Attachment ID, used to download the attachment bytes.
Id *string `json:"id,omitempty"`
// Size Attachment size in bytes.
Size *int `json:"size,omitempty"`
}
EmailThreadMessageAttachment Attachment metadata on a conversation message. The metadata remains readable for the mailbox's retention period; the attachment bytes are downloadable for 30 days after the message occurred.
type EmailThreadMessageAttachmentList ¶ added in v0.4.1
type EmailThreadMessageAttachmentList struct {
Data []EmailThreadMessageAttachment `json:"data"`
}
EmailThreadMessageAttachmentList The attachments on a conversation message.
type EmailThreadMessageBody ¶ added in v0.4.1
type EmailThreadMessageBody struct {
// Html The HTML body of the message, or null when the message had no HTML part.
Html *string `json:"html"`
// Text The plain-text body of the message, or null when the message had no text part.
Text *string `json:"text"`
}
EmailThreadMessageBody The original rendered body of a conversation message. Available for 30 days after the message occurred; after that the endpoint returns `410 Gone` while the message's extracted text remains readable on the message itself.
type EmailThreadMessageDirection ¶ added in v0.4.1
type EmailThreadMessageDirection string
EmailThreadMessageDirection Direction of the message — `inbound` for a received message, `outbound` for a sent one.
const ( EmailThreadMessageDirectionInbound EmailThreadMessageDirection = "inbound" EmailThreadMessageDirectionOutbound EmailThreadMessageDirection = "outbound" )
Defines values for EmailThreadMessageDirection.
func (EmailThreadMessageDirection) Valid ¶ added in v0.4.1
func (e EmailThreadMessageDirection) Valid() bool
Valid indicates whether the value is a known member of the EmailThreadMessageDirection enum.
type EmailThreadMessageDisposition ¶ added in v0.4.1
type EmailThreadMessageDisposition string
EmailThreadMessageDisposition Where the message landed: `inbox` for accepted mail, `blocked` (receive policy or rules), or `unauthenticated` (failed sender authentication). Null for sent messages. Trash state is carried separately in `trashed_at`.
const ( EmailThreadMessageDispositionBlocked EmailThreadMessageDisposition = "blocked" EmailThreadMessageDispositionInbox EmailThreadMessageDisposition = "inbox" EmailThreadMessageDispositionLessThannil EmailThreadMessageDisposition = "<nil>" EmailThreadMessageDispositionUnauthenticated EmailThreadMessageDisposition = "unauthenticated" )
Defines values for EmailThreadMessageDisposition.
func (EmailThreadMessageDisposition) Valid ¶ added in v0.4.1
func (e EmailThreadMessageDisposition) Valid() bool
Valid indicates whether the value is a known member of the EmailThreadMessageDisposition enum.
type EmailThreadMessageForwardRequest ¶ added in v0.4.1
type EmailThreadMessageForwardRequest struct {
// Category Content classification — controls suppression policy. `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Default: transactional.
Category *EmailThreadMessageForwardRequestCategory `json:"category,omitempty"`
// Cc Cc recipient addresses.
Cc *[]openapi_types.Email `json:"cc,omitempty"`
// Metadata Arbitrary JSON object stored on the send and echoed in webhook payloads. Cap: 2 KB serialized.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Tags Structured `{name, value}` labels for filtering and analytics on the sent-message log. Cap: 20 tags per send.
Tags *[]Tag `json:"tags,omitempty"`
// To Recipient addresses to forward the message to.
To []openapi_types.Email `json:"to"`
}
EmailThreadMessageForwardRequest Forwards a conversation message to new recipients. The original body and attachments are sent as they were received or sent; the subject gains a `Fwd:` prefix. Forwarding requires the message's original rendered source, which is available for 30 days after the message occurred.
type EmailThreadMessageForwardRequestCategory ¶ added in v0.4.1
type EmailThreadMessageForwardRequestCategory string
EmailThreadMessageForwardRequestCategory Content classification — controls suppression policy. `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Default: transactional.
const ( EmailThreadMessageForwardRequestCategoryMarketing EmailThreadMessageForwardRequestCategory = "marketing" EmailThreadMessageForwardRequestCategoryTransactional EmailThreadMessageForwardRequestCategory = "transactional" )
Defines values for EmailThreadMessageForwardRequestCategory.
func (EmailThreadMessageForwardRequestCategory) Valid ¶ added in v0.4.1
func (e EmailThreadMessageForwardRequestCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailThreadMessageForwardRequestCategory enum.
type EmailThreadMessageList ¶ added in v0.4.1
type EmailThreadMessageList struct {
Data []EmailThreadMessage `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"`
}
EmailThreadMessageList defines model for EmailThreadMessageList.
type EmailThreadMessageRecipient ¶ added in v0.4.1
type EmailThreadMessageRecipient struct {
// Address Recipient address.
Address *openapi_types.Email `json:"address,omitempty"`
// Status Terminal outcome: `delivered`, or `failed` (bounce or provider rejection).
Status *EmailThreadMessageRecipientStatus `json:"status,omitempty"`
}
EmailThreadMessageRecipient One recipient's terminal delivery outcome on a sent conversation message, folded into the message's durable memory when the outcome becomes known.
type EmailThreadMessageRecipientStatus ¶ added in v0.4.1
type EmailThreadMessageRecipientStatus string
EmailThreadMessageRecipientStatus Terminal outcome: `delivered`, or `failed` (bounce or provider rejection).
const ( EmailThreadMessageRecipientStatusDelivered EmailThreadMessageRecipientStatus = "delivered" EmailThreadMessageRecipientStatusFailed EmailThreadMessageRecipientStatus = "failed" )
Defines values for EmailThreadMessageRecipientStatus.
func (EmailThreadMessageRecipientStatus) Valid ¶ added in v0.4.1
func (e EmailThreadMessageRecipientStatus) Valid() bool
Valid indicates whether the value is a known member of the EmailThreadMessageRecipientStatus enum.
type EmailThreadMessageReplyRequest ¶ added in v0.4.1
type EmailThreadMessageReplyRequest struct {
// Category Content classification — controls suppression policy. `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Default: transactional.
Category *EmailThreadMessageReplyRequestCategory `json:"category,omitempty"`
// Html HTML body of the reply. At least one of html or text must be provided.
Html *string `json:"html,omitempty"`
// Metadata Arbitrary JSON object stored on the send and echoed in webhook payloads. Cap: 2 KB serialized.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// ReplyAll Also send the reply to the original To and Cc recipients, minus the mailbox's own address.
ReplyAll *bool `json:"reply_all,omitempty"`
// Tags Structured `{name, value}` labels for filtering and analytics on the sent-message log. Cap: 20 tags per send.
Tags *[]Tag `json:"tags,omitempty"`
// Text Plain-text body of the reply. At least one of html or text must be provided.
Text *string `json:"text,omitempty"`
}
EmailThreadMessageReplyRequest A reply to a conversation message. Recipients are derived from the message being replied to: its Reply-To address when present, otherwise its From address. Set `reply_all` to also include the original To and Cc recipients (minus the mailbox's own address). The subject and threading headers are set automatically. At least one of `html` or `text` must be provided.
type EmailThreadMessageReplyRequestCategory ¶ added in v0.4.1
type EmailThreadMessageReplyRequestCategory string
EmailThreadMessageReplyRequestCategory Content classification — controls suppression policy. `marketing` blocks on all suppression reasons; `transactional` allows delivery through complaint and unsubscribe suppressions. Default: transactional.
const ( EmailThreadMessageReplyRequestCategoryMarketing EmailThreadMessageReplyRequestCategory = "marketing" EmailThreadMessageReplyRequestCategoryTransactional EmailThreadMessageReplyRequestCategory = "transactional" )
Defines values for EmailThreadMessageReplyRequestCategory.
func (EmailThreadMessageReplyRequestCategory) Valid ¶ added in v0.4.1
func (e EmailThreadMessageReplyRequestCategory) Valid() bool
Valid indicates whether the value is a known member of the EmailThreadMessageReplyRequestCategory enum.
type EmailThreadMessageSource ¶ added in v0.4.1
type EmailThreadMessageSource struct {
// AvailableUntil When the log entry (and the message's original rendered source) expires.
AvailableUntil *time.Time `json:"available_until,omitempty"`
// Resource API path of the log entry for this message.
Resource *string `json:"resource,omitempty"`
}
EmailThreadMessageSource Link to the message's entry in the received-message or sent-message log, which carries delivery analytics such as per-recipient events. Log entries expire 30 days after the message occurred.
type EmailThreadMessageUpdateRequest ¶ added in v0.4.1
type EmailThreadMessageUpdateRequest struct {
// ContactId Contact to link this message to, or null to unlink the current contact.
ContactId *ContactID `json:"contact_id,omitempty"`
// Labels Label changes to apply. Labels in `add` are applied and labels in `remove` are taken off; other labels are left untouched. Adding a label that is already present, or removing one that is not, has no effect.
Labels *EmailLabelsUpdate `json:"labels,omitempty"`
// Read Mark the message read (`true`) or unread (`false`). Only valid on received messages.
Read *bool `json:"read,omitempty"`
// Trashed Set to `false` to restore a trashed message within its 30-day trash window (clears `trashed_at` and restores the original retention). To trash a message use `DELETE`; `true` is rejected.
Trashed *bool `json:"trashed,omitempty"`
}
EmailThreadMessageUpdateRequest Changes to apply to a conversation message. Omitted fields are left unchanged.
type EmailThreadUpdateRequest ¶ added in v0.4.1
type EmailThreadUpdateRequest struct {
// ContactId Contact to link this conversation to, or null to unlink the current contact.
ContactId *ContactID `json:"contact_id,omitempty"`
// Labels Label changes to apply. Labels in `add` are applied and labels in `remove` are taken off; other labels are left untouched. Adding a label that is already present, or removing one that is not, has no effect.
Labels *EmailLabelsUpdate `json:"labels,omitempty"`
}
EmailThreadUpdateRequest Changes to apply to a thread. Omitted fields are left unchanged.
type ErrorBody ¶
type ErrorBody struct {
// Code Opaque, stable, unique error identifier. Never reused.
Code string `json:"code"`
// Details Per-field validation errors. Present only on validation_error responses.
Details *[]ErrorDetail `json:"details,omitempty"`
// DocUrl Stable link to the docs page for this error code.
DocUrl string `json:"doc_url"`
// Message Human-readable description. Not stable; clients must not parse it.
Message string `json:"message"`
// Name Human-readable slug for log readability. Paired with code, never replaces it.
Name string `json:"name"`
// Next Operations that resolve this error, in the order to try them. Present for errors with a well-defined recovery, such as unmet preconditions and conflicts.
Next *[]ErrorNextAction `json:"next,omitempty"`
// Param Identifies the offending field. Omitted when not applicable.
Param *string `json:"param,omitempty"`
// Remediation A human-readable next step to resolve this error. Present when a recovery is known.
Remediation *string `json:"remediation,omitempty"`
// RequestId Request correlation ID. Also returned as the X-Request-Id response header.
RequestId string `json:"request_id"`
// Type Broad category for coarse client branching.
Type ErrorBodyType `json:"type"`
// UnmetGates The verification requirements blocking this action, each with the flow that resolves it. Present only when an action is blocked pending verification.
UnmetGates *[]UnmetGate `json:"unmet_gates,omitempty"`
// VendorCode Verbatim error code returned by a downstream system (for example, an SMTP response code from a recipient's mail server, or a payment-provider decline code). Present only when Bird is surfacing a code from an external system that the caller may want to act on directly.
VendorCode *string `json:"vendor_code,omitempty"`
}
ErrorBody defines model for ErrorBody.
type ErrorBodyType ¶
type ErrorBodyType string
ErrorBodyType Broad category for coarse client branching.
const ( ErrorBodyTypeAuthError ErrorBodyType = "auth_error" ErrorBodyTypeBadRequestError ErrorBodyType = "bad_request_error" ErrorBodyTypeBillingError ErrorBodyType = "billing_error" ErrorBodyTypeConflictError ErrorBodyType = "conflict_error" ErrorBodyTypeGoneError ErrorBodyType = "gone_error" ErrorBodyTypeInternalError ErrorBodyType = "internal_error" ErrorBodyTypeMisdirectedError ErrorBodyType = "misdirected_error" ErrorBodyTypeNotFoundError ErrorBodyType = "not_found_error" ErrorBodyTypeNotImplementedError ErrorBodyType = "not_implemented_error" ErrorBodyTypePayloadTooLargeError ErrorBodyType = "payload_too_large_error" ErrorBodyTypePermissionError ErrorBodyType = "permission_error" ErrorBodyTypePreconditionError ErrorBodyType = "precondition_error" ErrorBodyTypeRateLimitError ErrorBodyType = "rate_limit_error" ErrorBodyTypeTooEarlyError ErrorBodyType = "too_early_error" ErrorBodyTypeValidationError ErrorBodyType = "validation_error" )
Defines values for ErrorBodyType.
func (ErrorBodyType) Valid ¶
func (e ErrorBodyType) Valid() bool
Valid indicates whether the value is a known member of the ErrorBodyType enum.
type ErrorDetail ¶
type ErrorDetail struct {
// Message What is wrong with this field.
Message string `json:"message"`
// Param Dotted field path (e.g. "to[0].email", "subject", ".").
Param string `json:"param"`
}
ErrorDetail defines model for ErrorDetail.
type ErrorNextAction ¶ added in v0.2.2
type ErrorNextAction struct {
// Description A short, human-readable label for the recovery step, suitable for display.
Description *string `json:"description,omitempty"`
// Operation The operationId of a follow-up operation that resolves this error. Call it, then retry the original request.
Operation string `json:"operation"`
}
ErrorNextAction defines model for ErrorNextAction.
type EventDomainFailed ¶
type EventDomainFailed struct {
// Data Event payload. The fields for this event are not yet finalized.
Data map[string]interface{} `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventDomainFailedType `json:"type"`
}
EventDomainFailed A sending domain failed DNS verification. Payload schema not yet finalized.
type EventDomainFailedType ¶
type EventDomainFailedType string
EventDomainFailedType Event type.
const (
DomainFailed EventDomainFailedType = "domain.failed"
)
Defines values for EventDomainFailedType.
func (EventDomainFailedType) Valid ¶
func (e EventDomainFailedType) Valid() bool
Valid indicates whether the value is a known member of the EventDomainFailedType enum.
type EventDomainVerified ¶
type EventDomainVerified struct {
// Data Event payload. The fields for this event are not yet finalized.
Data map[string]interface{} `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventDomainVerifiedType `json:"type"`
}
EventDomainVerified A sending domain completed DNS verification successfully. Payload schema not yet finalized.
type EventDomainVerifiedType ¶
type EventDomainVerifiedType string
EventDomainVerifiedType Event type.
const (
DomainVerified EventDomainVerifiedType = "domain.verified"
)
Defines values for EventDomainVerifiedType.
func (EventDomainVerifiedType) Valid ¶
func (e EventDomainVerifiedType) Valid() bool
Valid indicates whether the value is a known member of the EventDomainVerifiedType enum.
type EventEmailAccepted ¶
type EventEmailAccepted struct {
// Data Payload of the email.accepted event.
Data EventEmailAcceptedData `json:"data"`
// Timestamp Time Bird accepted the send.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailAcceptedType `json:"type"`
}
EventEmailAccepted Bird accepted the email send and is preparing to deliver. Fires once per requested recipient at acceptance time.
type EventEmailAcceptedData ¶
type EventEmailAcceptedData = EventEmailBase
EventEmailAcceptedData Identity fields shared by every email lifecycle event payload.
type EventEmailAcceptedType ¶
type EventEmailAcceptedType string
EventEmailAcceptedType Event type.
const (
EmailAccepted EventEmailAcceptedType = "email.accepted"
)
Defines values for EventEmailAcceptedType.
func (EventEmailAcceptedType) Valid ¶
func (e EventEmailAcceptedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailAcceptedType enum.
type EventEmailBase ¶
type EventEmailBase struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailBase Identity fields shared by every email lifecycle event payload.
type EventEmailBounced ¶
type EventEmailBounced struct {
// Data Payload of the email.bounced event.
Data EventEmailBouncedData `json:"data"`
// Timestamp Time the bounce was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailBouncedType `json:"type"`
}
EventEmailBounced An outbound email permanently failed at the recipient's mail server. Fires once per recipient.
type EventEmailBouncedData ¶
type EventEmailBouncedData struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified. Lets you distinguish, for example, a DNS failure from a spam block when both would be `bounce_type: soft` or `bounce_type: block`.
BounceClass *int `json:"bounce_class"`
// BounceCode SMTP reply code returned by the receiving mail server, or null when none was provided.
BounceCode *string `json:"bounce_code"`
// BounceDescription Human-readable reason the receiving mail server gave for the bounce, or null when none was provided.
BounceDescription *string `json:"bounce_description"`
// BounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType EmailBounceType `json:"bounce_type"`
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// SendingIp The IP address used to send this message, or null when it is not known.
SendingIp *string `json:"sending_ip"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailBouncedData defines model for EventEmailBouncedData.
type EventEmailBouncedType ¶
type EventEmailBouncedType string
EventEmailBouncedType Event type.
const (
EmailBounced EventEmailBouncedType = "email.bounced"
)
Defines values for EventEmailBouncedType.
func (EventEmailBouncedType) Valid ¶
func (e EventEmailBouncedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailBouncedType enum.
type EventEmailCanceled ¶ added in v0.2.2
type EventEmailCanceled struct {
// Data Payload of the email.canceled event.
Data EventEmailCanceledData `json:"data"`
// Timestamp Time the scheduled send was canceled.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailCanceledType `json:"type"`
}
EventEmailCanceled A scheduled send was canceled before it fired. Fires once per message, not per recipient.
type EventEmailCanceledData ¶ added in v0.2.2
type EventEmailCanceledData = EventEmailMessageBase
EventEmailCanceledData Identity fields shared by the message-level email lifecycle events (scheduled, canceled), which are not tied to a single recipient.
type EventEmailCanceledType ¶ added in v0.2.2
type EventEmailCanceledType string
EventEmailCanceledType Event type.
const (
EmailCanceled EventEmailCanceledType = "email.canceled"
)
Defines values for EventEmailCanceledType.
func (EventEmailCanceledType) Valid ¶ added in v0.2.2
func (e EventEmailCanceledType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailCanceledType enum.
type EventEmailClicked ¶
type EventEmailClicked struct {
// Data Payload of the email.clicked event.
Data EventEmailClickedData `json:"data"`
// Timestamp Time the click was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailClickedType `json:"type"`
}
EventEmailClicked The recipient clicked a tracked link in the email. May fire more than once per recipient.
type EventEmailClickedData ¶
type EventEmailClickedData struct {
EmailId EmailID `json:"email_id"`
// IpAddress IP address of the client that clicked the link, or null when it is not known.
IpAddress *string `json:"ip_address"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
// Url The URL the recipient clicked.
Url string `json:"url"`
// UserAgent User-agent string of the client that clicked the link, or null when it is not known.
UserAgent *string `json:"user_agent"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailClickedData defines model for EventEmailClickedData.
type EventEmailClickedType ¶
type EventEmailClickedType string
EventEmailClickedType Event type.
const (
EmailClicked EventEmailClickedType = "email.clicked"
)
Defines values for EventEmailClickedType.
func (EventEmailClickedType) Valid ¶
func (e EventEmailClickedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailClickedType enum.
type EventEmailComplained ¶
type EventEmailComplained struct {
// Data Payload of the email.complained event.
Data EventEmailComplainedData `json:"data"`
// Timestamp Time the complaint was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailComplainedType `json:"type"`
}
EventEmailComplained The recipient marked the email as spam through their mailbox provider's feedback loop. Fires once per recipient.
type EventEmailComplainedData ¶
type EventEmailComplainedData struct {
EmailId EmailID `json:"email_id"`
// FeedbackType The kind of feedback the mailbox provider reported (such as `abuse` or `fraud`), or null when the provider did not specify one.
FeedbackType *string `json:"feedback_type"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailComplainedData defines model for EventEmailComplainedData.
type EventEmailComplainedType ¶
type EventEmailComplainedType string
EventEmailComplainedType Event type.
const (
EmailComplained EventEmailComplainedType = "email.complained"
)
Defines values for EventEmailComplainedType.
func (EventEmailComplainedType) Valid ¶
func (e EventEmailComplainedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailComplainedType enum.
type EventEmailDeferred ¶
type EventEmailDeferred struct {
// Data Payload of the email.deferred event.
Data EventEmailDeferredData `json:"data"`
// Timestamp Time the deferral was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailDeferredType `json:"type"`
}
EventEmailDeferred The recipient's mail server temporarily refused the email; delivery will be retried. May fire more than once per recipient.
type EventEmailDeferredData ¶
type EventEmailDeferredData struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified. Distinguishes, for example, a greylisting deferral from a full mailbox.
BounceClass *int `json:"bounce_class"`
// BounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType EmailBounceType `json:"bounce_type"`
// DeferReason Human-readable reason the receiving mail server gave for the deferral, or null when none was provided.
DeferReason *string `json:"defer_reason"`
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// SendingIp The IP address used to send this message, or null when it is not known.
SendingIp *string `json:"sending_ip"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailDeferredData defines model for EventEmailDeferredData.
type EventEmailDeferredType ¶
type EventEmailDeferredType string
EventEmailDeferredType Event type.
const (
EmailDeferred EventEmailDeferredType = "email.deferred"
)
Defines values for EventEmailDeferredType.
func (EventEmailDeferredType) Valid ¶
func (e EventEmailDeferredType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailDeferredType enum.
type EventEmailDelivered ¶
type EventEmailDelivered struct {
// Data Payload of the email.delivered event.
Data EventEmailDeliveredData `json:"data"`
// Timestamp Time the recipient's mail server accepted the message.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailDeliveredType `json:"type"`
}
EventEmailDelivered An outbound email reached the recipient's mail server and was accepted.
type EventEmailDeliveredData ¶
type EventEmailDeliveredData = EventEmailBase
EventEmailDeliveredData Identity fields shared by every email lifecycle event payload.
type EventEmailDeliveredType ¶
type EventEmailDeliveredType string
EventEmailDeliveredType Event type.
const (
EmailDelivered EventEmailDeliveredType = "email.delivered"
)
Defines values for EventEmailDeliveredType.
func (EventEmailDeliveredType) Valid ¶
func (e EventEmailDeliveredType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailDeliveredType enum.
type EventEmailListUnsubscribed ¶
type EventEmailListUnsubscribed struct {
// Data Payload of the email.list_unsubscribed event.
Data EventEmailListUnsubscribedData `json:"data"`
// Timestamp Time the unsubscribe was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailListUnsubscribedType `json:"type"`
}
EventEmailListUnsubscribed Recipient unsubscribed via the RFC 8058 one-click List-Unsubscribe mechanism. Fires once per recipient.
type EventEmailListUnsubscribedData ¶
type EventEmailListUnsubscribedData = EventEmailBase
EventEmailListUnsubscribedData Identity fields shared by every email lifecycle event payload.
type EventEmailListUnsubscribedType ¶
type EventEmailListUnsubscribedType string
EventEmailListUnsubscribedType Event type.
const (
EmailListUnsubscribed EventEmailListUnsubscribedType = "email.list_unsubscribed"
)
Defines values for EventEmailListUnsubscribedType.
func (EventEmailListUnsubscribedType) Valid ¶
func (e EventEmailListUnsubscribedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailListUnsubscribedType enum.
type EventEmailMailboxMessageDelivered ¶ added in v0.4.1
type EventEmailMailboxMessageDelivered struct {
// Data Payload of the email_mailbox.message_delivered event.
Data EventEmailMailboxMessageDeliveredData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxMessageDeliveredType `json:"type"`
}
EventEmailMailboxMessageDelivered A mailbox send folded to delivered — every recipient reached a terminal delivered outcome. Status events are per-message folds, not per-recipient telemetry: one event per message, distinct in cardinality from the shipped per-recipient email.delivered (one event per recipient), which the same send also fires. Pick one family per automation and dedupe by message_id.
type EventEmailMailboxMessageDeliveredData ¶ added in v0.4.1
type EventEmailMailboxMessageDeliveredData struct {
MailboxId MailboxID `json:"mailbox_id"`
MessageId EmailID `json:"message_id"`
ThreadId ThreadID `json:"thread_id"`
}
EventEmailMailboxMessageDeliveredData Payload of the email_mailbox.message_delivered event.
type EventEmailMailboxMessageDeliveredType ¶ added in v0.4.1
type EventEmailMailboxMessageDeliveredType string
EventEmailMailboxMessageDeliveredType Event type.
const (
EmailMailboxMessageDelivered EventEmailMailboxMessageDeliveredType = "email_mailbox.message_delivered"
)
Defines values for EventEmailMailboxMessageDeliveredType.
func (EventEmailMailboxMessageDeliveredType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxMessageDeliveredType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxMessageDeliveredType enum.
type EventEmailMailboxMessageFailed ¶ added in v0.4.1
type EventEmailMailboxMessageFailed struct {
// Data Payload of the email_mailbox.message_failed event.
Data EventEmailMailboxMessageFailedData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxMessageFailedType `json:"type"`
}
EventEmailMailboxMessageFailed A mailbox send folded to a terminal failure. Status events are per-message folds, not per-recipient telemetry: one event per message, distinct in cardinality from the shipped per-recipient email.* lifecycle events, which the same send also fires. Pick one family per automation and dedupe by message_id.
type EventEmailMailboxMessageFailedData ¶ added in v0.4.1
type EventEmailMailboxMessageFailedData struct {
MailboxId MailboxID `json:"mailbox_id"`
MessageId EmailID `json:"message_id"`
// Reason Why the send folded to failed.
Reason string `json:"reason"`
ThreadId ThreadID `json:"thread_id"`
}
EventEmailMailboxMessageFailedData Payload of the email_mailbox.message_failed event.
type EventEmailMailboxMessageFailedType ¶ added in v0.4.1
type EventEmailMailboxMessageFailedType string
EventEmailMailboxMessageFailedType Event type.
const (
EmailMailboxMessageFailed EventEmailMailboxMessageFailedType = "email_mailbox.message_failed"
)
Defines values for EventEmailMailboxMessageFailedType.
func (EventEmailMailboxMessageFailedType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxMessageFailedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxMessageFailedType enum.
type EventEmailMailboxMessageReceived ¶ added in v0.4.1
type EventEmailMailboxMessageReceived struct {
// Data Payload shared by the email_mailbox.message_received event family. Carries identifiers, threading, disposition, authentication results, and the extracted text — enough for an agent to act without a fetch. Fetch original source (while within its 30-day window) via the thread-member endpoints.
Data EventEmailMailboxMessageReceivedData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxMessageReceivedType `json:"type"`
}
EventEmailMailboxMessageReceived An email was received into a mailbox, threaded, and stored with disposition inbox. The payload carries identifiers, threading, authentication results, and the extracted text — enough for an agent to act without a fetch. Dual-fire rule: mailbox-owned inbound with disposition inbox ALSO fires the unchanged email.received event; the streams are unordered relative to each other, so pick one family per automation and dedupe by message_id.
type EventEmailMailboxMessageReceivedBlocked ¶ added in v0.4.1
type EventEmailMailboxMessageReceivedBlocked struct {
// Data Payload shared by the email_mailbox.message_received event family. Carries identifiers, threading, disposition, authentication results, and the extracted text — enough for an agent to act without a fetch. Fetch original source (while within its 30-day window) via the thread-member endpoints.
Data EventEmailMailboxMessageReceivedData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxMessageReceivedBlockedType `json:"type"`
}
EventEmailMailboxMessageReceivedBlocked An email was received into a mailbox and stored with disposition blocked — it failed the mailbox receive policy or a block rule. Opt-in. Non-inbox dispositions fire only this mailbox variant, never email.received — existing email.received automations never start processing blocked mail because a mailbox was attached. The payload carries identifiers, threading, authentication results, and the extracted text.
type EventEmailMailboxMessageReceivedBlockedType ¶ added in v0.4.1
type EventEmailMailboxMessageReceivedBlockedType string
EventEmailMailboxMessageReceivedBlockedType Event type.
const (
EmailMailboxMessageReceivedBlocked EventEmailMailboxMessageReceivedBlockedType = "email_mailbox.message_received_blocked"
)
Defines values for EventEmailMailboxMessageReceivedBlockedType.
func (EventEmailMailboxMessageReceivedBlockedType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxMessageReceivedBlockedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxMessageReceivedBlockedType enum.
type EventEmailMailboxMessageReceivedData ¶ added in v0.4.1
type EventEmailMailboxMessageReceivedData struct {
// AttachmentCount Number of attachments on the message. Metadata is durable; bytes are fetchable while within the 30-day original-source window.
AttachmentCount int `json:"attachment_count"`
// Disposition Where the message landed after receive policy, rules, and scanning were applied.
Disposition EventEmailMailboxMessageReceivedDataDisposition `json:"disposition"`
// DkimPass Whether DKIM passed for the sender, or null when no verdict was computable.
DkimPass *bool `json:"dkim_pass,omitempty"`
// DmarcPass Whether DMARC passed for the sender, or null when no verdict was computable.
DmarcPass *bool `json:"dmarc_pass,omitempty"`
// ExtractedText Plain-text body with quoted history stripped, capped at 64 KB (see truncated_text). Null when extraction produced nothing. This copy is what the mailbox durably retains.
ExtractedText *string `json:"extracted_text,omitempty"`
// From Envelope-from address.
From openapi_types.Email `json:"from"`
MailboxId MailboxID `json:"mailbox_id"`
MessageId InboundEmailMessageID `json:"message_id"`
// RouteId ID (ein_…) of the explicit inbound route that matched, or null when the message was delivered by the virtual exact-address route.
RouteId *string `json:"route_id,omitempty"`
// SpfPass Whether SPF passed for the sender, or null when no verdict was computable.
SpfPass *bool `json:"spf_pass,omitempty"`
// Subject Subject line as received, or null when the message had no subject.
Subject *string `json:"subject"`
ThreadId ThreadID `json:"thread_id"`
// To Recipient addresses the message was sent to.
To []openapi_types.Email `json:"to"`
// TruncatedText True when extracted_text was truncated to the 64 KB cap; fetch the full text via the thread-member endpoint.
TruncatedText *bool `json:"truncated_text,omitempty"`
}
EventEmailMailboxMessageReceivedData Payload shared by the email_mailbox.message_received event family. Carries identifiers, threading, disposition, authentication results, and the extracted text — enough for an agent to act without a fetch. Fetch original source (while within its 30-day window) via the thread-member endpoints.
type EventEmailMailboxMessageReceivedDataDisposition ¶ added in v0.4.1
type EventEmailMailboxMessageReceivedDataDisposition string
EventEmailMailboxMessageReceivedDataDisposition Where the message landed after receive policy, rules, and scanning were applied.
const ( EventEmailMailboxMessageReceivedDataDispositionBlocked EventEmailMailboxMessageReceivedDataDisposition = "blocked" EventEmailMailboxMessageReceivedDataDispositionInbox EventEmailMailboxMessageReceivedDataDisposition = "inbox" EventEmailMailboxMessageReceivedDataDispositionUnauthenticated EventEmailMailboxMessageReceivedDataDisposition = "unauthenticated" )
Defines values for EventEmailMailboxMessageReceivedDataDisposition.
func (EventEmailMailboxMessageReceivedDataDisposition) Valid ¶ added in v0.4.1
func (e EventEmailMailboxMessageReceivedDataDisposition) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxMessageReceivedDataDisposition enum.
type EventEmailMailboxMessageReceivedType ¶ added in v0.4.1
type EventEmailMailboxMessageReceivedType string
EventEmailMailboxMessageReceivedType Event type.
const (
EmailMailboxMessageReceived EventEmailMailboxMessageReceivedType = "email_mailbox.message_received"
)
Defines values for EventEmailMailboxMessageReceivedType.
func (EventEmailMailboxMessageReceivedType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxMessageReceivedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxMessageReceivedType enum.
type EventEmailMailboxMessageReceivedUnauthenticated ¶ added in v0.4.1
type EventEmailMailboxMessageReceivedUnauthenticated struct {
// Data Payload shared by the email_mailbox.message_received event family. Carries identifiers, threading, disposition, authentication results, and the extracted text — enough for an agent to act without a fetch. Fetch original source (while within its 30-day window) via the thread-member endpoints.
Data EventEmailMailboxMessageReceivedData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxMessageReceivedUnauthenticatedType `json:"type"`
}
EventEmailMailboxMessageReceivedUnauthenticated An email was received into a mailbox and stored with disposition unauthenticated — sender authentication could not be verified. Opt-in. Non-inbox dispositions fire only this mailbox variant, never email.received — existing email.received automations never start processing unauthenticated mail because a mailbox was attached. The payload carries identifiers, threading, authentication results, and the extracted text.
type EventEmailMailboxMessageReceivedUnauthenticatedType ¶ added in v0.4.1
type EventEmailMailboxMessageReceivedUnauthenticatedType string
EventEmailMailboxMessageReceivedUnauthenticatedType Event type.
const (
EmailMailboxMessageReceivedUnauthenticated EventEmailMailboxMessageReceivedUnauthenticatedType = "email_mailbox.message_received_unauthenticated"
)
Defines values for EventEmailMailboxMessageReceivedUnauthenticatedType.
func (EventEmailMailboxMessageReceivedUnauthenticatedType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxMessageReceivedUnauthenticatedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxMessageReceivedUnauthenticatedType enum.
type EventEmailMailboxMessageSent ¶ added in v0.4.1
type EventEmailMailboxMessageSent struct {
// Data Payload of the email_mailbox.message_sent event.
Data EventEmailMailboxMessageSentData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxMessageSentType `json:"type"`
}
EventEmailMailboxMessageSent A mailbox send reached provider handoff — the per-message status folded to sent. Status events are per-message folds, not per-recipient telemetry; the same send also fires the shipped per-recipient email.* lifecycle events. Pick one family per automation and dedupe by message_id.
type EventEmailMailboxMessageSentData ¶ added in v0.4.1
type EventEmailMailboxMessageSentData struct {
MailboxId MailboxID `json:"mailbox_id"`
MessageId EmailID `json:"message_id"`
ThreadId ThreadID `json:"thread_id"`
}
EventEmailMailboxMessageSentData Payload of the email_mailbox.message_sent event.
type EventEmailMailboxMessageSentType ¶ added in v0.4.1
type EventEmailMailboxMessageSentType string
EventEmailMailboxMessageSentType Event type.
const (
EmailMailboxMessageSent EventEmailMailboxMessageSentType = "email_mailbox.message_sent"
)
Defines values for EventEmailMailboxMessageSentType.
func (EventEmailMailboxMessageSentType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxMessageSentType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxMessageSentType enum.
type EventEmailMailboxSuspended ¶ added in v0.4.1
type EventEmailMailboxSuspended struct {
// Data Payload of the email_mailbox.suspended event.
Data EventEmailMailboxSuspendedData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxSuspendedType `json:"type"`
}
EventEmailMailboxSuspended Platform abuse controls suspended a mailbox. Sends are rejected and inbound is quarantined until it is reinstated.
type EventEmailMailboxSuspendedData ¶ added in v0.4.1
type EventEmailMailboxSuspendedData struct {
MailboxId MailboxID `json:"mailbox_id"`
// Reason Why the mailbox was suspended.
Reason string `json:"reason"`
}
EventEmailMailboxSuspendedData Payload of the email_mailbox.suspended event.
type EventEmailMailboxSuspendedType ¶ added in v0.4.1
type EventEmailMailboxSuspendedType string
EventEmailMailboxSuspendedType Event type.
const (
EmailMailboxSuspended EventEmailMailboxSuspendedType = "email_mailbox.suspended"
)
Defines values for EventEmailMailboxSuspendedType.
func (EventEmailMailboxSuspendedType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxSuspendedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxSuspendedType enum.
type EventEmailMailboxThreadCreated ¶ added in v0.4.1
type EventEmailMailboxThreadCreated struct {
// Data Payload of the email_mailbox.thread_created event.
Data EventEmailMailboxThreadCreatedData `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailMailboxThreadCreatedType `json:"type"`
}
EventEmailMailboxThreadCreated A new thread was created in a mailbox, from either direction.
type EventEmailMailboxThreadCreatedData ¶ added in v0.4.1
type EventEmailMailboxThreadCreatedData struct {
// InitiatedBy Which direction created the thread.
InitiatedBy EventEmailMailboxThreadCreatedDataInitiatedBy `json:"initiated_by"`
MailboxId MailboxID `json:"mailbox_id"`
// Subject Subject of the first message in the thread, or null when it had none.
Subject *string `json:"subject"`
ThreadId ThreadID `json:"thread_id"`
}
EventEmailMailboxThreadCreatedData Payload of the email_mailbox.thread_created event.
type EventEmailMailboxThreadCreatedDataInitiatedBy ¶ added in v0.4.1
type EventEmailMailboxThreadCreatedDataInitiatedBy string
EventEmailMailboxThreadCreatedDataInitiatedBy Which direction created the thread.
const ( EventEmailMailboxThreadCreatedDataInitiatedByInbound EventEmailMailboxThreadCreatedDataInitiatedBy = "inbound" EventEmailMailboxThreadCreatedDataInitiatedByOutbound EventEmailMailboxThreadCreatedDataInitiatedBy = "outbound" )
Defines values for EventEmailMailboxThreadCreatedDataInitiatedBy.
func (EventEmailMailboxThreadCreatedDataInitiatedBy) Valid ¶ added in v0.4.1
func (e EventEmailMailboxThreadCreatedDataInitiatedBy) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxThreadCreatedDataInitiatedBy enum.
type EventEmailMailboxThreadCreatedType ¶ added in v0.4.1
type EventEmailMailboxThreadCreatedType string
EventEmailMailboxThreadCreatedType Event type.
const (
EmailMailboxThreadCreated EventEmailMailboxThreadCreatedType = "email_mailbox.thread_created"
)
Defines values for EventEmailMailboxThreadCreatedType.
func (EventEmailMailboxThreadCreatedType) Valid ¶ added in v0.4.1
func (e EventEmailMailboxThreadCreatedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailMailboxThreadCreatedType enum.
type EventEmailMessageBase ¶ added in v0.2.2
type EventEmailMessageBase struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on the event so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Tags Tags provided on the send request, echoed on the event so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailMessageBase Identity fields shared by the message-level email lifecycle events (scheduled, canceled), which are not tied to a single recipient.
type EventEmailOpened ¶
type EventEmailOpened struct {
// Data Payload of the email.opened event.
Data EventEmailOpenedData `json:"data"`
// Timestamp Time the open was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailOpenedType `json:"type"`
}
EventEmailOpened The recipient opened the email (the tracking pixel was loaded). May fire more than once per recipient.
type EventEmailOpenedData ¶
type EventEmailOpenedData struct {
EmailId EmailID `json:"email_id"`
// IpAddress IP address of the client that opened the email, or null when it is not known.
IpAddress *string `json:"ip_address"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
// UserAgent User-agent string of the client that opened the email, or null when it is not known.
UserAgent *string `json:"user_agent"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailOpenedData defines model for EventEmailOpenedData.
type EventEmailOpenedType ¶
type EventEmailOpenedType string
EventEmailOpenedType Event type.
const (
EmailOpened EventEmailOpenedType = "email.opened"
)
Defines values for EventEmailOpenedType.
func (EventEmailOpenedType) Valid ¶
func (e EventEmailOpenedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailOpenedType enum.
type EventEmailOutOfBandBounce ¶
type EventEmailOutOfBandBounce struct {
// Data Payload of the email.out_of_band_bounce event.
Data EventEmailOutOfBandBounceData `json:"data"`
// Timestamp Time the bounce notification was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailOutOfBandBounceType `json:"type"`
}
EventEmailOutOfBandBounce A bounce notification arrived after the message had already been accepted for delivery. Fires once per recipient.
type EventEmailOutOfBandBounceData ¶
type EventEmailOutOfBandBounceData struct {
// BounceClass Numeric bounce classification for fine-grained deliverability triage, or null when the receiving server's response could not be classified.
BounceClass *int `json:"bounce_class"`
// BounceCode SMTP reply code returned by the receiving mail server, or null when none was provided.
BounceCode *string `json:"bounce_code"`
// BounceDescription Human-readable reason the receiving mail server gave for the bounce, or null when none was provided.
BounceDescription *string `json:"bounce_description"`
// BounceType Bounce classification. `hard` is a permanent failure (invalid address or non-existent domain). `soft` is a transient failure (mailbox full, server temporarily unavailable). `block` indicates the receiving mail server blocked the sending IP for reputation reasons. `admin` indicates an administrative refusal (relaying denied, blocklisted domain). `undetermined` is used when the receiving server's response is ambiguous.
BounceType EmailBounceType `json:"bounce_type"`
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// SendingIp The IP address used to send this message, or null when it is not known.
SendingIp *string `json:"sending_ip"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailOutOfBandBounceData defines model for EventEmailOutOfBandBounceData.
type EventEmailOutOfBandBounceType ¶
type EventEmailOutOfBandBounceType string
EventEmailOutOfBandBounceType Event type.
const (
EmailOutOfBandBounce EventEmailOutOfBandBounceType = "email.out_of_band_bounce"
)
Defines values for EventEmailOutOfBandBounceType.
func (EventEmailOutOfBandBounceType) Valid ¶
func (e EventEmailOutOfBandBounceType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailOutOfBandBounceType enum.
type EventEmailProcessed ¶
type EventEmailProcessed struct {
// Data Payload of the email.processed event.
Data EventEmailProcessedData `json:"data"`
// Timestamp Time Bird processed the message and queued it for SMTP delivery.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailProcessedType `json:"type"`
}
EventEmailProcessed Bird processed the message and queued it for delivery to the recipient's mail server. Fires once per recipient when the message enters the SMTP delivery queue.
type EventEmailProcessedData ¶
type EventEmailProcessedData = EventEmailBase
EventEmailProcessedData Identity fields shared by every email lifecycle event payload.
type EventEmailProcessedType ¶
type EventEmailProcessedType string
EventEmailProcessedType Event type.
const (
EmailProcessed EventEmailProcessedType = "email.processed"
)
Defines values for EventEmailProcessedType.
func (EventEmailProcessedType) Valid ¶
func (e EventEmailProcessedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailProcessedType enum.
type EventEmailReceived ¶
type EventEmailReceived struct {
// Data Payload of the email.received event.
Data EventEmailReceivedData `json:"data"`
// Timestamp When Bird received the message.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailReceivedType `json:"type"`
}
EventEmailReceived Bird received and parsed an inbound email. The payload carries the message's identifiers, sender and recipients, subject, threading reference, and authentication results — enough to route and triage without a fetch. Fetch the body, full headers, and attachments with GET /v1/email/inbound-messages/{id}.
type EventEmailReceivedData ¶
type EventEmailReceivedData struct {
// DkimPass Whether DKIM passed for the sender, or null when the result did not carry a DKIM verdict.
DkimPass *bool `json:"dkim_pass,omitempty"`
// DmarcPass Whether DMARC passed for the sender, or null when the result did not carry a DMARC verdict.
DmarcPass *bool `json:"dmarc_pass,omitempty"`
// From Envelope-from address.
From openapi_types.Email `json:"from"`
// InReplyTo In-Reply-To header — the Message-ID this message replies to, or null when it is not a reply.
InReplyTo *string `json:"in_reply_to,omitempty"`
InboundMessageId InboundEmailMessageID `json:"inbound_message_id"`
// MessageId RFC 5322 Message-ID header from the sender, or null when the sender did not include one.
MessageId *string `json:"message_id"`
// SpamScore Spam score for the message. Always null at present; reserved for a future content-scoring capability.
SpamScore *float32 `json:"spam_score,omitempty"`
// SpfPass Whether SPF passed for the sender, or null when the result did not carry an SPF verdict.
SpfPass *bool `json:"spf_pass,omitempty"`
// Subject Subject line as received, or null when the message had no subject.
Subject *string `json:"subject"`
// To Recipient addresses the message was sent to.
To []openapi_types.Email `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailReceivedData Payload of the email.received event.
type EventEmailReceivedType ¶
type EventEmailReceivedType string
EventEmailReceivedType Event type.
const (
EmailReceived EventEmailReceivedType = "email.received"
)
Defines values for EventEmailReceivedType.
func (EventEmailReceivedType) Valid ¶
func (e EventEmailReceivedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailReceivedType enum.
type EventEmailRejected ¶
type EventEmailRejected struct {
// Data Payload of the email.rejected event.
Data EventEmailRejectedData `json:"data"`
// Timestamp Time the rejection was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailRejectedType `json:"type"`
}
EventEmailRejected Bird rejected the email before sending it (suppression list hit, transmission failure, or a content/policy guard). Fires once per recipient.
type EventEmailRejectedData ¶
type EventEmailRejectedData struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on every event for the send so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// Recipient Recipient address as it appeared on the envelope.
Recipient openapi_types.Email `json:"recipient"`
RecipientId RecipientID `json:"recipient_id"`
// RecipientRole Envelope position of a recipient on an outbound email event.
RecipientRole RecipientRole `json:"recipient_role"`
// RejectionReason Why an email was rejected before delivery.
// `recipient_suppressed` means the recipient is on the workspace suppression list, so Bird did not attempt delivery. `transmission_failed` means the message could not be transmitted for delivery. `generation_failure` means the message could not be built for delivery (a template or content issue). `policy_rejection` means the message was refused by sending policy. `domain_unverified` means the sending domain was not verified. `quota_exceeded` means the organization's send quota was reached. `recipient_not_allowed` means a recipient was not permitted for this send (for shared onboarding-domain sends, recipients must be verified workspace members).
RejectionReason EmailRejectionReason `json:"rejection_reason"`
// Tags Tags provided on the send request, echoed on every event for the send so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailRejectedData defines model for EventEmailRejectedData.
type EventEmailRejectedType ¶
type EventEmailRejectedType string
EventEmailRejectedType Event type.
const (
EmailRejected EventEmailRejectedType = "email.rejected"
)
Defines values for EventEmailRejectedType.
func (EventEmailRejectedType) Valid ¶
func (e EventEmailRejectedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailRejectedType enum.
type EventEmailScheduled ¶ added in v0.2.2
type EventEmailScheduled struct {
// Data Payload of the email.scheduled event.
Data EventEmailScheduledData `json:"data"`
// Timestamp Time the send was scheduled.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailScheduledType `json:"type"`
}
EventEmailScheduled Bird accepted a send scheduled for a future time. Fires once per message when the schedule is created, not per recipient.
type EventEmailScheduledData ¶ added in v0.2.2
type EventEmailScheduledData struct {
EmailId EmailID `json:"email_id"`
// Metadata The metadata object provided on the send request, echoed on the event so you can correlate events with your own records. Null when the send carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
// ScheduledAt When the message is scheduled to send.
ScheduledAt time.Time `json:"scheduled_at"`
// Tags Tags provided on the send request, echoed on the event so you can route and correlate without an extra lookup. Null when the send carried no tags.
Tags *[]Tag `json:"tags"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventEmailScheduledData defines model for EventEmailScheduledData.
type EventEmailScheduledType ¶ added in v0.2.2
type EventEmailScheduledType string
EventEmailScheduledType Event type.
const (
EmailScheduled EventEmailScheduledType = "email.scheduled"
)
Defines values for EventEmailScheduledType.
func (EventEmailScheduledType) Valid ¶ added in v0.2.2
func (e EventEmailScheduledType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailScheduledType enum.
type EventEmailSuppressionCreated ¶
type EventEmailSuppressionCreated struct {
// Data Event payload. The fields for this event are not yet finalized.
Data map[string]interface{} `json:"data"`
// Timestamp When the event occurred.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailSuppressionCreatedType `json:"type"`
}
EventEmailSuppressionCreated An email address was added to the workspace's suppression list (manually, via complaint, or via hard bounce). Payload schema not yet finalized.
type EventEmailSuppressionCreatedType ¶
type EventEmailSuppressionCreatedType string
EventEmailSuppressionCreatedType Event type.
const (
EmailSuppressionCreated EventEmailSuppressionCreatedType = "email_suppression.created"
)
Defines values for EventEmailSuppressionCreatedType.
func (EventEmailSuppressionCreatedType) Valid ¶
func (e EventEmailSuppressionCreatedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailSuppressionCreatedType enum.
type EventEmailUnsubscribed ¶
type EventEmailUnsubscribed struct {
// Data Payload of the email.unsubscribed event.
Data EventEmailUnsubscribedData `json:"data"`
// Timestamp Time the unsubscribe was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventEmailUnsubscribedType `json:"type"`
}
EventEmailUnsubscribed Recipient unsubscribed by clicking a tracked unsubscribe link in the email. Fires once per recipient.
type EventEmailUnsubscribedData ¶
type EventEmailUnsubscribedData = EventEmailBase
EventEmailUnsubscribedData Identity fields shared by every email lifecycle event payload.
type EventEmailUnsubscribedType ¶
type EventEmailUnsubscribedType string
EventEmailUnsubscribedType Event type.
const (
EmailUnsubscribed EventEmailUnsubscribedType = "email.unsubscribed"
)
Defines values for EventEmailUnsubscribedType.
func (EventEmailUnsubscribedType) Valid ¶
func (e EventEmailUnsubscribedType) Valid() bool
Valid indicates whether the value is a known member of the EventEmailUnsubscribedType enum.
type EventSMSAccepted ¶ added in v0.2.0
type EventSMSAccepted struct {
// Data Payload of the sms.accepted event.
Data EventSMSAcceptedData `json:"data"`
// Timestamp Time Bird accepted the request.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSAcceptedType `json:"type"`
}
EventSMSAccepted Bird accepted the SMS send request and queued it for processing.
type EventSMSAcceptedData ¶ added in v0.2.0
type EventSMSAcceptedData = EventSMSBase
EventSMSAcceptedData Identity fields shared by every SMS lifecycle event payload.
type EventSMSAcceptedType ¶ added in v0.2.0
type EventSMSAcceptedType string
EventSMSAcceptedType Event type.
const (
SmsAccepted EventSMSAcceptedType = "sms.accepted"
)
Defines values for EventSMSAcceptedType.
func (EventSMSAcceptedType) Valid ¶ added in v0.2.0
func (e EventSMSAcceptedType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSAcceptedType enum.
type EventSMSBase ¶ added in v0.2.0
type EventSMSBase struct {
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSBase Identity fields shared by every SMS lifecycle event payload.
type EventSMSDelivered ¶ added in v0.2.0
type EventSMSDelivered struct {
// Data Payload of the sms.delivered event.
Data EventSMSDeliveredData `json:"data"`
// Timestamp Time the carrier confirmed delivery.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSDeliveredType `json:"type"`
}
EventSMSDelivered The carrier confirmed delivery of the message to the recipient handset.
type EventSMSDeliveredData ¶ added in v0.2.0
type EventSMSDeliveredData struct {
// Carrier Carrier that delivered the message, or null when not known.
Carrier *string `json:"carrier"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// MccMnc Mobile country code and mobile network code of the carrier, or null when not known.
MccMnc *string `json:"mcc_mnc"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSDeliveredData defines model for EventSMSDeliveredData.
type EventSMSDeliveredType ¶ added in v0.2.0
type EventSMSDeliveredType string
EventSMSDeliveredType Event type.
const (
SmsDelivered EventSMSDeliveredType = "sms.delivered"
)
Defines values for EventSMSDeliveredType.
func (EventSMSDeliveredType) Valid ¶ added in v0.2.0
func (e EventSMSDeliveredType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSDeliveredType enum.
type EventSMSExpired ¶ added in v0.2.0
type EventSMSExpired struct {
// Data Payload of the sms.expired event.
Data EventSMSExpiredData `json:"data"`
// Timestamp Time the message expired.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSExpiredType `json:"type"`
}
EventSMSExpired The message's validity period elapsed before it could be delivered.
type EventSMSExpiredData ¶ added in v0.2.0
type EventSMSExpiredData = EventSMSBase
EventSMSExpiredData Identity fields shared by every SMS lifecycle event payload.
type EventSMSExpiredType ¶ added in v0.2.0
type EventSMSExpiredType string
EventSMSExpiredType Event type.
const (
SmsExpired EventSMSExpiredType = "sms.expired"
)
Defines values for EventSMSExpiredType.
func (EventSMSExpiredType) Valid ¶ added in v0.2.0
func (e EventSMSExpiredType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSExpiredType enum.
type EventSMSFailed ¶ added in v0.2.0
type EventSMSFailed struct {
// Data Payload of the sms.failed event.
Data EventSMSFailedData `json:"data"`
// Timestamp Time the failure was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSFailedType `json:"type"`
}
EventSMSFailed The message terminally failed and will not be delivered.
type EventSMSFailedData ¶ added in v0.2.0
type EventSMSFailedData struct {
// Error Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
Error *SMSError `json:"error,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSFailedData defines model for EventSMSFailedData.
type EventSMSFailedType ¶ added in v0.2.0
type EventSMSFailedType string
EventSMSFailedType Event type.
const (
SmsFailed EventSMSFailedType = "sms.failed"
)
Defines values for EventSMSFailedType.
func (EventSMSFailedType) Valid ¶ added in v0.2.0
func (e EventSMSFailedType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSFailedType enum.
type EventSMSRejected ¶ added in v0.2.0
type EventSMSRejected struct {
// Data Payload of the sms.rejected event.
Data EventSMSRejectedData `json:"data"`
// Timestamp Time the rejection was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSRejectedType `json:"type"`
}
EventSMSRejected Bird rejected the message before sending it to the carrier (invalid destination, suppression, or a content/policy guard).
type EventSMSRejectedData ¶ added in v0.2.0
type EventSMSRejectedData struct {
// Error Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
Error *SMSError `json:"error,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSRejectedData defines model for EventSMSRejectedData.
type EventSMSRejectedType ¶ added in v0.2.0
type EventSMSRejectedType string
EventSMSRejectedType Event type.
const (
SmsRejected EventSMSRejectedType = "sms.rejected"
)
Defines values for EventSMSRejectedType.
func (EventSMSRejectedType) Valid ¶ added in v0.2.0
func (e EventSMSRejectedType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSRejectedType enum.
type EventSMSSent ¶ added in v0.2.0
type EventSMSSent struct {
// Data Payload of the sms.sent event.
Data EventSMSSentData `json:"data"`
// Timestamp Time the message was handed to the carrier.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSSentType `json:"type"`
}
EventSMSSent Bird handed the message to the carrier for delivery.
type EventSMSSentData ¶ added in v0.2.0
type EventSMSSentData struct {
// Carrier Carrier that handled the message, or null when not known.
Carrier *string `json:"carrier"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// MccMnc Mobile country code and mobile network code of the carrier, or null when not known.
MccMnc *string `json:"mcc_mnc"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSSentData defines model for EventSMSSentData.
type EventSMSSentType ¶ added in v0.2.0
type EventSMSSentType string
EventSMSSentType Event type.
const (
SmsSent EventSMSSentType = "sms.sent"
)
Defines values for EventSMSSentType.
func (EventSMSSentType) Valid ¶ added in v0.2.0
func (e EventSMSSentType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSSentType enum.
type EventSMSUndelivered ¶ added in v0.2.0
type EventSMSUndelivered struct {
// Data Payload of the sms.undelivered event.
Data EventSMSUndeliveredData `json:"data"`
// Timestamp Time the non-delivery was recorded.
Timestamp time.Time `json:"timestamp"`
// Type Event type.
Type EventSMSUndeliveredType `json:"type"`
}
EventSMSUndelivered The carrier reported a non-permanent failure to deliver the message.
type EventSMSUndeliveredData ¶ added in v0.2.0
type EventSMSUndeliveredData struct {
// Error Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
Error *SMSError `json:"error,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
// Metadata The metadata object provided on the send request, echoed on every event for the message so you can correlate events with your own records. Null when the message carried no metadata.
Metadata *map[string]interface{} `json:"metadata"`
SmsId SMSMessageID `json:"sms_id"`
// Tags Tags provided on the send request, echoed on every event for the message so you can route and correlate without an extra lookup. Null when the message carried no tags.
Tags *[]Tag `json:"tags"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
WorkspaceId WorkspaceID `json:"workspace_id"`
}
EventSMSUndeliveredData defines model for EventSMSUndeliveredData.
type EventSMSUndeliveredType ¶ added in v0.2.0
type EventSMSUndeliveredType string
EventSMSUndeliveredType Event type.
const (
SmsUndelivered EventSMSUndeliveredType = "sms.undelivered"
)
Defines values for EventSMSUndeliveredType.
func (EventSMSUndeliveredType) Valid ¶ added in v0.2.0
func (e EventSMSUndeliveredType) Valid() bool
Valid indicates whether the value is a known member of the EventSMSUndeliveredType enum.
type GetAudienceResponse ¶ added in v0.4.0
type GetAudienceResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Audience
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetAudienceResponse ¶ added in v0.4.0
func ParseGetAudienceResponse(rsp *http.Response) (*GetAudienceResponse, error)
ParseGetAudienceResponse parses an HTTP response from a GetAudienceWithResponse call
func (GetAudienceResponse) ContentType ¶ added in v0.4.0
func (r GetAudienceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAudienceResponse) Status ¶ added in v0.4.0
func (r GetAudienceResponse) Status() string
Status returns HTTPResponse.Status
func (GetAudienceResponse) StatusCode ¶ added in v0.4.0
func (r GetAudienceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetContactPropertyResponse ¶ added in v0.4.0
type GetContactPropertyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ContactProperty
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetContactPropertyResponse ¶ added in v0.4.0
func ParseGetContactPropertyResponse(rsp *http.Response) (*GetContactPropertyResponse, error)
ParseGetContactPropertyResponse parses an HTTP response from a GetContactPropertyWithResponse call
func (GetContactPropertyResponse) ContentType ¶ added in v0.4.0
func (r GetContactPropertyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetContactPropertyResponse) Status ¶ added in v0.4.0
func (r GetContactPropertyResponse) Status() string
Status returns HTTPResponse.Status
func (GetContactPropertyResponse) StatusCode ¶ added in v0.4.0
func (r GetContactPropertyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetContactResponse ¶ added in v0.4.0
type GetContactResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Contact
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetContactResponse ¶ added in v0.4.0
func ParseGetContactResponse(rsp *http.Response) (*GetContactResponse, error)
ParseGetContactResponse parses an HTTP response from a GetContactWithResponse call
func (GetContactResponse) ContentType ¶ added in v0.4.0
func (r GetContactResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetContactResponse) Status ¶ added in v0.4.0
func (r GetContactResponse) Status() string
Status returns HTTPResponse.Status
func (GetContactResponse) StatusCode ¶ added in v0.4.0
func (r GetContactResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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 GetSMSMessageResponse ¶ added in v0.3.0
type GetSMSMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSMessage
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
JSON503 *ServiceUnavailable
}
func ParseGetSMSMessageResponse ¶ added in v0.3.0
func ParseGetSMSMessageResponse(rsp *http.Response) (*GetSMSMessageResponse, error)
ParseGetSMSMessageResponse parses an HTTP response from a GetSMSMessageWithResponse call
func (GetSMSMessageResponse) ContentType ¶ added in v0.3.0
func (r GetSMSMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSMSMessageResponse) Status ¶ added in v0.3.0
func (r GetSMSMessageResponse) Status() string
Status returns HTTPResponse.Status
func (GetSMSMessageResponse) StatusCode ¶ added in v0.3.0
func (r GetSMSMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSMSTemplateResponse ¶ added in v0.3.0
type GetSMSTemplateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSTemplate
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseGetSMSTemplateResponse ¶ added in v0.3.0
func ParseGetSMSTemplateResponse(rsp *http.Response) (*GetSMSTemplateResponse, error)
ParseGetSMSTemplateResponse parses an HTTP response from a GetSMSTemplateWithResponse call
func (GetSMSTemplateResponse) ContentType ¶ added in v0.3.0
func (r GetSMSTemplateResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSMSTemplateResponse) Status ¶ added in v0.3.0
func (r GetSMSTemplateResponse) Status() string
Status returns HTTPResponse.Status
func (GetSMSTemplateResponse) StatusCode ¶ added in v0.3.0
func (r GetSMSTemplateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetWhatsAppMessageResponse ¶ added in v0.6.0
type GetWhatsAppMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *WhatsAppMessage
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
JSON503 *ServiceUnavailable
}
func ParseGetWhatsAppMessageResponse ¶ added in v0.6.0
func ParseGetWhatsAppMessageResponse(rsp *http.Response) (*GetWhatsAppMessageResponse, error)
ParseGetWhatsAppMessageResponse parses an HTTP response from a GetWhatsAppMessageWithResponse call
func (GetWhatsAppMessageResponse) ContentType ¶ added in v0.6.0
func (r GetWhatsAppMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetWhatsAppMessageResponse) Status ¶ added in v0.6.0
func (r GetWhatsAppMessageResponse) Status() string
Status returns HTTPResponse.Status
func (GetWhatsAppMessageResponse) StatusCode ¶ added in v0.6.0
func (r GetWhatsAppMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InboundAddress ¶ added in v0.3.0
type InboundAddress struct {
// Address The address to forward your mailbox to. Minted by Bird when the inbound address is created.
Address *openapi_types.Email `json:"address,omitempty"`
// CreatedAt When the inbound address was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
Id InboundAddressID `json:"id"`
// Label Your own label for this address, typically the source mailbox it maps to. Null when unset.
Label *string `json:"label"`
// UpdatedAt When the inbound address was last updated.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
InboundAddress A Bird-minted email address that receives mail on your behalf. Forward a real mailbox (for example, a support inbox) to this address and Bird parses every message it receives into a received email.
type InboundAddressCreate ¶ added in v0.3.0
type InboundAddressCreate struct {
// Label Your own label for this address, typically the source mailbox it maps to.
Label *string `json:"label,omitempty"`
}
InboundAddressCreate Parameters for minting a new inbound address.
type InboundAddressID ¶ added in v0.3.0
type InboundAddressID = string
InboundAddressID defines model for InboundAddressID.
type InboundAddressList ¶ added in v0.3.0
type InboundAddressList struct {
Data []InboundAddress `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
InboundAddressList defines model for InboundAddressList.
type InboundAddressUpdate ¶ added in v0.3.0
type InboundAddressUpdate struct {
// Label Your own label for this address. Pass null to clear it.
Label *string `json:"label,omitempty"`
}
InboundAddressUpdate Fields to update on an inbound address.
type InboundAttachment ¶ added in v0.3.0
type InboundAttachment struct {
// ContentType MIME type parsed from the attachment part, or null when absent.
ContentType *string `json:"content_type"`
// Filename Filename from the attachment's Content-Disposition, or null when the sender did not name the part.
Filename *string `json:"filename"`
Id InboundAttachmentID `json:"id"`
// Size Size of the attachment in bytes.
Size int `json:"size"`
}
InboundAttachment Metadata for a file attached to a received email. The raw bytes are fetched separately with `GET /v1/email/inbound-messages/{id}/attachments/{attachment_id}`.
type InboundAttachmentID ¶ added in v0.3.0
type InboundAttachmentID = string
InboundAttachmentID defines model for InboundAttachmentID.
type InboundAttachmentList ¶ added in v0.3.0
type InboundAttachmentList struct {
// Data Metadata for every attachment on the message. Empty when the message had no attachments.
Data []InboundAttachment `json:"data"`
}
InboundAttachmentList The attachments on a received email. Not paginated — a message carries a small, bounded set of attachments, all returned at once.
type InboundEmailMessage ¶ added in v0.3.0
type InboundEmailMessage struct {
// Attachments Metadata for each attachment found on the message. Empty when the message had no attachments.
Attachments []InboundAttachment `json:"attachments"`
// Cc Recipients on the message's Cc header.
Cc []EmailAddress `json:"cc"`
// DkimPass Whether DKIM passed for the sender, parsed from the message's authentication results. Null when the result did not carry a DKIM verdict.
DkimPass *bool `json:"dkim_pass"`
// DmarcPass Whether DMARC passed for the sender, parsed from the message's authentication results. Null when the result did not carry a DMARC verdict.
DmarcPass *bool `json:"dmarc_pass"`
// From An email address with an optional display name.
From EmailAddress `json:"from"`
Id InboundEmailMessageID `json:"id"`
// InReplyTo In-Reply-To header — the Message-ID this message replies to, or null when it is not a reply.
InReplyTo *string `json:"in_reply_to"`
// MessageId RFC 5322 Message-ID header from the sender, or null when the sender did not include one.
MessageId *string `json:"message_id"`
// ReceivedAt When Bird received the message.
ReceivedAt *time.Time `json:"received_at,omitempty"`
// References References header — the chain of Message-IDs in this conversation, oldest first. Absent when the message had no References header.
References *[]string `json:"references,omitempty"`
// SpamScore Spam score for the message. Always null at present; reserved for a future content-scoring capability.
SpamScore *float32 `json:"spam_score"`
// SpfPass Whether SPF passed for the sender, parsed from the message's authentication results. Null when the result did not carry an SPF verdict.
SpfPass *bool `json:"spf_pass"`
// Subject Subject line as received, or null when the message had no subject.
Subject *string `json:"subject"`
// ThreadId Conversation this message belongs to. Always null until threading is available.
ThreadId *string `json:"thread_id"`
// To Recipients on the message's To header.
To []EmailAddress `json:"to"`
}
InboundEmailMessage An email Bird received on your behalf, parsed from the original message. Fetch the body with `/body`, the original MIME with `/raw`, and attachment bytes with `/attachments/{attachment_id}`.
type InboundEmailMessageBody ¶ added in v0.3.0
type InboundEmailMessageBody struct {
// Html The HTML body of the message, or null when the message had no HTML part.
Html *string `json:"html"`
// Text The plain-text body of the message, or null when the message had no text part.
Text *string `json:"text"`
}
InboundEmailMessageBody The parsed body of a received email.
type InboundEmailMessageID ¶ added in v0.2.0
type InboundEmailMessageID = string
InboundEmailMessageID defines model for InboundEmailMessageID.
type InboundEmailMessageList ¶ added in v0.3.0
type InboundEmailMessageList struct {
Data []InboundEmailMessage `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
InboundEmailMessageList defines model for InboundEmailMessageList.
type InboundRoute ¶ added in v0.4.1
type InboundRoute struct {
// Action What happens to matching mail.
Action InboundRouteAction `json:"action"`
// CreatedAt When the route was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Domain The domain the route applies to.
Domain *string `json:"domain,omitempty"`
// Enabled Whether the route is evaluated. Disabled routes are kept but skipped.
Enabled bool `json:"enabled"`
Id EmailInboundRouteID `json:"id"`
// MatchType How the route matches recipients. `address` matches one local part; `catch_all` matches every recipient on the domain that nothing else matched.
MatchType InboundRouteMatchType `json:"match_type"`
// MatchValue The local part an `address` route matches. Null for `catch_all` routes.
MatchValue *string `json:"match_value"`
// Priority Evaluation order — lowest number wins. Explicit routes accept 11–1000 (default 100); the mailbox's own address always matches at priority 10.
Priority int `json:"priority"`
// TargetMailboxId The mailbox that receives matching mail. Null for `drop` routes.
TargetMailboxId *MailboxID `json:"target_mailbox_id"`
// UpdatedAt When the route was last updated.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
InboundRoute A routing rule that directs inbound mail on one of your domains into a mailbox, or drops it. Routes are evaluated in priority order — lowest number first. Each mailbox's own address is always matched at priority 10 and explicit routes accept 11–1000, so exact-address delivery always takes precedence.
type InboundRouteAction ¶ added in v0.4.1
type InboundRouteAction string
InboundRouteAction What happens to matching mail.
const ( InboundRouteActionDeliverToMailbox InboundRouteAction = "deliver_to_mailbox" InboundRouteActionDrop InboundRouteAction = "drop" )
Defines values for InboundRouteAction.
func (InboundRouteAction) Valid ¶ added in v0.4.1
func (e InboundRouteAction) Valid() bool
Valid indicates whether the value is a known member of the InboundRouteAction enum.
type InboundRouteCreate ¶ added in v0.4.1
type InboundRouteCreate struct {
// Action What happens to matching mail. `deliver_to_mailbox` requires `target_mailbox_id`.
Action InboundRouteCreateAction `json:"action"`
// Domain The domain the route applies to — your agent domain or one of your inbound-enabled custom domains.
Domain string `json:"domain"`
// Enabled Whether the route is evaluated.
Enabled *bool `json:"enabled,omitempty"`
// MatchType How the route matches recipients. `address` matches one local part and requires `match_value`; `catch_all` matches every recipient on the domain that nothing else matched.
MatchType InboundRouteCreateMatchType `json:"match_type"`
// MatchValue The local part an `address` route matches. Required for `address` routes; stored lowercase.
MatchValue *string `json:"match_value,omitempty"`
// Priority Evaluation order — lowest number wins. Explicit routes accept 11–1000; the mailbox's own address always matches at priority 10, so a route can never pre-empt exact-address delivery.
Priority *int `json:"priority,omitempty"`
TargetMailboxId *MailboxID `json:"target_mailbox_id,omitempty"`
}
InboundRouteCreate Parameters for creating an inbound route.
type InboundRouteCreateAction ¶ added in v0.4.1
type InboundRouteCreateAction string
InboundRouteCreateAction What happens to matching mail. `deliver_to_mailbox` requires `target_mailbox_id`.
const ( InboundRouteCreateActionDeliverToMailbox InboundRouteCreateAction = "deliver_to_mailbox" InboundRouteCreateActionDrop InboundRouteCreateAction = "drop" )
Defines values for InboundRouteCreateAction.
func (InboundRouteCreateAction) Valid ¶ added in v0.4.1
func (e InboundRouteCreateAction) Valid() bool
Valid indicates whether the value is a known member of the InboundRouteCreateAction enum.
type InboundRouteCreateMatchType ¶ added in v0.4.1
type InboundRouteCreateMatchType string
InboundRouteCreateMatchType How the route matches recipients. `address` matches one local part and requires `match_value`; `catch_all` matches every recipient on the domain that nothing else matched.
const ( InboundRouteCreateMatchTypeAddress InboundRouteCreateMatchType = "address" InboundRouteCreateMatchTypeCatchAll InboundRouteCreateMatchType = "catch_all" )
Defines values for InboundRouteCreateMatchType.
func (InboundRouteCreateMatchType) Valid ¶ added in v0.4.1
func (e InboundRouteCreateMatchType) Valid() bool
Valid indicates whether the value is a known member of the InboundRouteCreateMatchType enum.
type InboundRouteList ¶ added in v0.4.1
type InboundRouteList struct {
Data []InboundRoute `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"`
}
InboundRouteList defines model for InboundRouteList.
type InboundRouteMatchType ¶ added in v0.4.1
type InboundRouteMatchType string
InboundRouteMatchType How the route matches recipients. `address` matches one local part; `catch_all` matches every recipient on the domain that nothing else matched.
const ( InboundRouteMatchTypeAddress InboundRouteMatchType = "address" InboundRouteMatchTypeCatchAll InboundRouteMatchType = "catch_all" )
Defines values for InboundRouteMatchType.
func (InboundRouteMatchType) Valid ¶ added in v0.4.1
func (e InboundRouteMatchType) Valid() bool
Valid indicates whether the value is a known member of the InboundRouteMatchType enum.
type InboundRouteUpdate ¶ added in v0.4.1
type InboundRouteUpdate struct {
// Action What happens to matching mail. `deliver_to_mailbox` requires `target_mailbox_id`.
Action *InboundRouteUpdateAction `json:"action,omitempty"`
// Enabled Whether the route is evaluated.
Enabled *bool `json:"enabled,omitempty"`
// MatchType How the route matches recipients.
MatchType *InboundRouteUpdateMatchType `json:"match_type,omitempty"`
// MatchValue The local part an `address` route matches. Null for `catch_all` routes.
MatchValue *string `json:"match_value,omitempty"`
// Priority Evaluation order — lowest number wins. Explicit routes accept 11–1000; the mailbox's own address always matches at priority 10.
Priority *int `json:"priority,omitempty"`
// TargetMailboxId The mailbox that receives matching mail. Null for `drop` routes.
TargetMailboxId *MailboxID `json:"target_mailbox_id,omitempty"`
}
InboundRouteUpdate Fields to update on an inbound route. Omitted fields are unchanged. The domain is immutable.
type InboundRouteUpdateAction ¶ added in v0.4.1
type InboundRouteUpdateAction string
InboundRouteUpdateAction What happens to matching mail. `deliver_to_mailbox` requires `target_mailbox_id`.
const ( InboundRouteUpdateActionDeliverToMailbox InboundRouteUpdateAction = "deliver_to_mailbox" InboundRouteUpdateActionDrop InboundRouteUpdateAction = "drop" )
Defines values for InboundRouteUpdateAction.
func (InboundRouteUpdateAction) Valid ¶ added in v0.4.1
func (e InboundRouteUpdateAction) Valid() bool
Valid indicates whether the value is a known member of the InboundRouteUpdateAction enum.
type InboundRouteUpdateMatchType ¶ added in v0.4.1
type InboundRouteUpdateMatchType string
InboundRouteUpdateMatchType How the route matches recipients.
const ( InboundRouteUpdateMatchTypeAddress InboundRouteUpdateMatchType = "address" InboundRouteUpdateMatchTypeCatchAll InboundRouteUpdateMatchType = "catch_all" )
Defines values for InboundRouteUpdateMatchType.
func (InboundRouteUpdateMatchType) Valid ¶ added in v0.4.1
func (e InboundRouteUpdateMatchType) Valid() bool
Valid indicates whether the value is a known member of the InboundRouteUpdateMatchType enum.
type ListAudienceContactsParams ¶ added in v0.4.0
type ListAudienceContactsParams 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"`
}
ListAudienceContactsParams defines parameters for ListAudienceContacts.
type ListAudienceContactsResponse ¶ added in v0.4.0
type ListAudienceContactsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AudienceMemberList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListAudienceContactsResponse ¶ added in v0.4.0
func ParseListAudienceContactsResponse(rsp *http.Response) (*ListAudienceContactsResponse, error)
ParseListAudienceContactsResponse parses an HTTP response from a ListAudienceContactsWithResponse call
func (ListAudienceContactsResponse) ContentType ¶ added in v0.4.0
func (r ListAudienceContactsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAudienceContactsResponse) Status ¶ added in v0.4.0
func (r ListAudienceContactsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAudienceContactsResponse) StatusCode ¶ added in v0.4.0
func (r ListAudienceContactsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAudiencesParams ¶ added in v0.4.0
type ListAudiencesParams struct {
// Search Case-insensitive substring match against the audience's name.
Search *string `form:"search,omitempty" json:"search,omitempty"`
// Limit Maximum number of items to return per page.
Limit *PaginationLimit `form:"limit,omitempty" json:"limit,omitempty"`
// StartingAfter Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
StartingAfter *StartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`
// EndingBefore Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
EndingBefore *EndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`
}
ListAudiencesParams defines parameters for ListAudiences.
type ListAudiencesResponse ¶ added in v0.4.0
type ListAudiencesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AudienceList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListAudiencesResponse ¶ added in v0.4.0
func ParseListAudiencesResponse(rsp *http.Response) (*ListAudiencesResponse, error)
ParseListAudiencesResponse parses an HTTP response from a ListAudiencesWithResponse call
func (ListAudiencesResponse) ContentType ¶ added in v0.4.0
func (r ListAudiencesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAudiencesResponse) Status ¶ added in v0.4.0
func (r ListAudiencesResponse) Status() string
Status returns HTTPResponse.Status
func (ListAudiencesResponse) StatusCode ¶ added in v0.4.0
func (r ListAudiencesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListContactPropertiesParams ¶ added in v0.4.0
type ListContactPropertiesParams 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"`
}
ListContactPropertiesParams defines parameters for ListContactProperties.
type ListContactPropertiesResponse ¶ added in v0.4.0
type ListContactPropertiesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ContactPropertyList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListContactPropertiesResponse ¶ added in v0.4.0
func ParseListContactPropertiesResponse(rsp *http.Response) (*ListContactPropertiesResponse, error)
ParseListContactPropertiesResponse parses an HTTP response from a ListContactPropertiesWithResponse call
func (ListContactPropertiesResponse) ContentType ¶ added in v0.4.0
func (r ListContactPropertiesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListContactPropertiesResponse) Status ¶ added in v0.4.0
func (r ListContactPropertiesResponse) Status() string
Status returns HTTPResponse.Status
func (ListContactPropertiesResponse) StatusCode ¶ added in v0.4.0
func (r ListContactPropertiesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListContactsParams ¶ added in v0.4.0
type ListContactsParams struct {
// Email Return the contact with exactly this email address (case-insensitive). Email is unique within a workspace, so this matches at most one contact.
Email *string `form:"email,omitempty" json:"email,omitempty"`
// ExternalId Return the contact with exactly this external_id (your own identifier for the contact). Unique within a workspace, so this matches at most one contact.
ExternalId *string `form:"external_id,omitempty" json:"external_id,omitempty"`
// Search Case-insensitive substring match against the contact's email address.
Search *string `form:"search,omitempty" json:"search,omitempty"`
// Limit Maximum number of items to return per page.
Limit *PaginationLimit `form:"limit,omitempty" json:"limit,omitempty"`
// StartingAfter Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
StartingAfter *StartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`
// EndingBefore Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
EndingBefore *EndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`
}
ListContactsParams defines parameters for ListContacts.
type ListContactsResponse ¶ added in v0.4.0
type ListContactsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ContactList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListContactsResponse ¶ added in v0.4.0
func ParseListContactsResponse(rsp *http.Response) (*ListContactsResponse, error)
ParseListContactsResponse parses an HTTP response from a ListContactsWithResponse call
func (ListContactsResponse) ContentType ¶ added in v0.4.0
func (r ListContactsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListContactsResponse) Status ¶ added in v0.4.0
func (r ListContactsResponse) Status() string
Status returns HTTPResponse.Status
func (ListContactsResponse) StatusCode ¶ added in v0.4.0
func (r ListContactsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListEmailMessagesParams ¶
type ListEmailMessagesParams struct {
// Limit Maximum number of items to return per page.
Limit *PaginationLimit `form:"limit,omitempty" json:"limit,omitempty"`
// StartingAfter Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
StartingAfter *StartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`
// EndingBefore Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
EndingBefore *EndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`
// CreatedAfter Return only resources created strictly after this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedAfter *CreatedAfter `form:"created_after,omitempty" json:"created_after,omitempty"`
// CreatedBefore Return only resources created strictly before this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedBefore *CreatedBefore `form:"created_before,omitempty" json:"created_before,omitempty"`
// Status Filter by aggregate delivery status.
Status *ListEmailMessagesParamsStatus `form:"status,omitempty" json:"status,omitempty"`
// Tag Filter by tag. Accepts `name` to match any send carrying that tag name, or `name:value` to match a specific tag pair (e.g. `category:welcome`). Repeat the parameter to AND-combine several tag filters.
Tag *[]string `form:"tag,omitempty" json:"tag,omitempty"`
// Category Filter by category.
Category *ListEmailMessagesParamsCategory `form:"category,omitempty" json:"category,omitempty"`
// To Filter by recipient address. Exact match against any `to`/`cc`/`bcc` recipient on the message; normalised to lowercase before comparison.
To *openapi_types.Email `form:"to,omitempty" json:"to,omitempty"`
// From Filter by sender address. Exact match against the message `from` field; normalised to lowercase before comparison.
From *openapi_types.Email `form:"from,omitempty" json:"from,omitempty"`
}
ListEmailMessagesParams defines parameters for ListEmailMessages.
type ListEmailMessagesParamsCategory ¶
type ListEmailMessagesParamsCategory string
ListEmailMessagesParamsCategory defines parameters for ListEmailMessages.
const ( ListEmailMessagesParamsCategoryMarketing ListEmailMessagesParamsCategory = "marketing" ListEmailMessagesParamsCategoryTransactional ListEmailMessagesParamsCategory = "transactional" )
Defines values for ListEmailMessagesParamsCategory.
func (ListEmailMessagesParamsCategory) Valid ¶
func (e ListEmailMessagesParamsCategory) Valid() bool
Valid indicates whether the value is a known member of the ListEmailMessagesParamsCategory enum.
type ListEmailMessagesParamsStatus ¶
type ListEmailMessagesParamsStatus string
ListEmailMessagesParamsStatus defines parameters for ListEmailMessages.
const ( Accepted ListEmailMessagesParamsStatus = "accepted" Bounced ListEmailMessagesParamsStatus = "bounced" Canceled ListEmailMessagesParamsStatus = "canceled" Complained ListEmailMessagesParamsStatus = "complained" Deferred ListEmailMessagesParamsStatus = "deferred" Delivered ListEmailMessagesParamsStatus = "delivered" PartialFailure ListEmailMessagesParamsStatus = "partial_failure" Processed ListEmailMessagesParamsStatus = "processed" Rejected ListEmailMessagesParamsStatus = "rejected" Scheduled ListEmailMessagesParamsStatus = "scheduled" )
Defines values for ListEmailMessagesParamsStatus.
func (ListEmailMessagesParamsStatus) Valid ¶
func (e ListEmailMessagesParamsStatus) Valid() bool
Valid indicates whether the value is a known member of the ListEmailMessagesParamsStatus enum.
type ListEmailMessagesResponse ¶
type ListEmailMessagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EmailMessageList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListEmailMessagesResponse ¶
func ParseListEmailMessagesResponse(rsp *http.Response) (*ListEmailMessagesResponse, error)
ParseListEmailMessagesResponse parses an HTTP response from a ListEmailMessagesWithResponse call
func (ListEmailMessagesResponse) ContentType ¶
func (r ListEmailMessagesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListEmailMessagesResponse) Status ¶
func (r ListEmailMessagesResponse) Status() string
Status returns HTTPResponse.Status
func (ListEmailMessagesResponse) StatusCode ¶
func (r ListEmailMessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListSMSMessagesParams ¶ added in v0.3.0
type ListSMSMessagesParams struct {
// Limit Maximum number of items to return per page.
Limit *PaginationLimit `form:"limit,omitempty" json:"limit,omitempty"`
// StartingAfter Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.
StartingAfter *StartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`
// EndingBefore Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.
EndingBefore *EndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`
// CreatedAfter Return only resources created strictly after this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedAfter *CreatedAfter `form:"created_after,omitempty" json:"created_after,omitempty"`
// CreatedBefore Return only resources created strictly before this timestamp. RFC 3339 / ISO 8601 with timezone.
CreatedBefore *CreatedBefore `form:"created_before,omitempty" json:"created_before,omitempty"`
// Direction Filter by direction. Omit for both.
Direction *ListSMSMessagesParamsDirection `form:"direction,omitempty" json:"direction,omitempty"`
// Status Filter by status; repeat the parameter to match any of several. One of scheduled, accepted, sent, delivered, undelivered, failed, rejected, canceled, expired, or received.
Status *[]string `form:"status,omitempty" json:"status,omitempty"`
// ErrorCode Filter to messages whose failure reason matches one of the supplied values; repeat the parameter to match any of several. One of invalid_destination, unreachable, blocked_by_carrier, blocked_by_recipient, landline_unreachable, content_rejected, sender_unregistered, recipient_opted_out, provider_unavailable, or unknown.
ErrorCode *[]string `form:"error_code,omitempty" json:"error_code,omitempty"`
// Category Filter by category.
Category *ListSMSMessagesParamsCategory `form:"category,omitempty" json:"category,omitempty"`
// To Filter by recipient phone number (E.164 exact match).
To *string `form:"to,omitempty" json:"to,omitempty"`
// From Filter by sender (E.164, alphanumeric, or short code — exact match).
From *string `form:"from,omitempty" json:"from,omitempty"`
// Tag Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair. Repeat the parameter to AND-combine several tag filters.
Tag *[]string `form:"tag,omitempty" json:"tag,omitempty"`
}
ListSMSMessagesParams defines parameters for ListSMSMessages.
type ListSMSMessagesParamsCategory ¶ added in v0.3.0
type ListSMSMessagesParamsCategory string
ListSMSMessagesParamsCategory defines parameters for ListSMSMessages.
const ( ListSMSMessagesParamsCategoryAuthentication ListSMSMessagesParamsCategory = "authentication" ListSMSMessagesParamsCategoryMarketing ListSMSMessagesParamsCategory = "marketing" ListSMSMessagesParamsCategoryService ListSMSMessagesParamsCategory = "service" ListSMSMessagesParamsCategoryTransactional ListSMSMessagesParamsCategory = "transactional" )
Defines values for ListSMSMessagesParamsCategory.
func (ListSMSMessagesParamsCategory) Valid ¶ added in v0.3.0
func (e ListSMSMessagesParamsCategory) Valid() bool
Valid indicates whether the value is a known member of the ListSMSMessagesParamsCategory enum.
type ListSMSMessagesParamsDirection ¶ added in v0.3.0
type ListSMSMessagesParamsDirection string
ListSMSMessagesParamsDirection defines parameters for ListSMSMessages.
const ( ListSMSMessagesParamsDirectionInbound ListSMSMessagesParamsDirection = "inbound" ListSMSMessagesParamsDirectionOutbound ListSMSMessagesParamsDirection = "outbound" )
Defines values for ListSMSMessagesParamsDirection.
func (ListSMSMessagesParamsDirection) Valid ¶ added in v0.3.0
func (e ListSMSMessagesParamsDirection) Valid() bool
Valid indicates whether the value is a known member of the ListSMSMessagesParamsDirection enum.
type ListSMSMessagesResponse ¶ added in v0.3.0
type ListSMSMessagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSMessageList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
JSON503 *ServiceUnavailable
}
func ParseListSMSMessagesResponse ¶ added in v0.3.0
func ParseListSMSMessagesResponse(rsp *http.Response) (*ListSMSMessagesResponse, error)
ParseListSMSMessagesResponse parses an HTTP response from a ListSMSMessagesWithResponse call
func (ListSMSMessagesResponse) ContentType ¶ added in v0.3.0
func (r ListSMSMessagesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListSMSMessagesResponse) Status ¶ added in v0.3.0
func (r ListSMSMessagesResponse) Status() string
Status returns HTTPResponse.Status
func (ListSMSMessagesResponse) StatusCode ¶ added in v0.3.0
func (r ListSMSMessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListSMSTemplatesParams ¶ added in v0.3.0
type ListSMSTemplatesParams struct {
// Scope Filter by scope. Omit for all.
Scope *ListSMSTemplatesParamsScope `form:"scope,omitempty" json:"scope,omitempty"`
// Category Filter by category.
Category *ListSMSTemplatesParamsCategory `form:"category,omitempty" json:"category,omitempty"`
// Language Keep only templates available in this language, as a BCP-47 tag.
Language *string `form:"language,omitempty" json:"language,omitempty"`
}
ListSMSTemplatesParams defines parameters for ListSMSTemplates.
type ListSMSTemplatesParamsCategory ¶ added in v0.3.0
type ListSMSTemplatesParamsCategory string
ListSMSTemplatesParamsCategory defines parameters for ListSMSTemplates.
const ( ListSMSTemplatesParamsCategoryAuthentication ListSMSTemplatesParamsCategory = "authentication" ListSMSTemplatesParamsCategoryMarketing ListSMSTemplatesParamsCategory = "marketing" ListSMSTemplatesParamsCategoryService ListSMSTemplatesParamsCategory = "service" ListSMSTemplatesParamsCategoryTransactional ListSMSTemplatesParamsCategory = "transactional" )
Defines values for ListSMSTemplatesParamsCategory.
func (ListSMSTemplatesParamsCategory) Valid ¶ added in v0.3.0
func (e ListSMSTemplatesParamsCategory) Valid() bool
Valid indicates whether the value is a known member of the ListSMSTemplatesParamsCategory enum.
type ListSMSTemplatesParamsScope ¶ added in v0.3.0
type ListSMSTemplatesParamsScope string
ListSMSTemplatesParamsScope defines parameters for ListSMSTemplates.
const ( ListSMSTemplatesParamsScopeSystem ListSMSTemplatesParamsScope = "system" ListSMSTemplatesParamsScopeWorkspace ListSMSTemplatesParamsScope = "workspace" )
Defines values for ListSMSTemplatesParamsScope.
func (ListSMSTemplatesParamsScope) Valid ¶ added in v0.3.0
func (e ListSMSTemplatesParamsScope) Valid() bool
Valid indicates whether the value is a known member of the ListSMSTemplatesParamsScope enum.
type ListSMSTemplatesResponse ¶ added in v0.3.0
type ListSMSTemplatesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *SMSTemplateList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListSMSTemplatesResponse ¶ added in v0.3.0
func ParseListSMSTemplatesResponse(rsp *http.Response) (*ListSMSTemplatesResponse, error)
ParseListSMSTemplatesResponse parses an HTTP response from a ListSMSTemplatesWithResponse call
func (ListSMSTemplatesResponse) ContentType ¶ added in v0.3.0
func (r ListSMSTemplatesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListSMSTemplatesResponse) Status ¶ added in v0.3.0
func (r ListSMSTemplatesResponse) Status() string
Status returns HTTPResponse.Status
func (ListSMSTemplatesResponse) StatusCode ¶ added in v0.3.0
func (r ListSMSTemplatesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListWhatsAppMessageEventsParams ¶ added in v0.6.0
type ListWhatsAppMessageEventsParams struct {
// Type Filter by event type (e.g. `whatsapp.delivered`, `whatsapp.failed`).
Type *string `form:"type,omitempty" json:"type,omitempty"`
}
ListWhatsAppMessageEventsParams defines parameters for ListWhatsAppMessageEvents.
type ListWhatsAppMessageEventsResponse ¶ added in v0.6.0
type ListWhatsAppMessageEventsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *WhatsAppEventList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
JSON503 *ServiceUnavailable
}
func ParseListWhatsAppMessageEventsResponse ¶ added in v0.6.0
func ParseListWhatsAppMessageEventsResponse(rsp *http.Response) (*ListWhatsAppMessageEventsResponse, error)
ParseListWhatsAppMessageEventsResponse parses an HTTP response from a ListWhatsAppMessageEventsWithResponse call
func (ListWhatsAppMessageEventsResponse) ContentType ¶ added in v0.6.0
func (r ListWhatsAppMessageEventsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListWhatsAppMessageEventsResponse) Status ¶ added in v0.6.0
func (r ListWhatsAppMessageEventsResponse) Status() string
Status returns HTTPResponse.Status
func (ListWhatsAppMessageEventsResponse) StatusCode ¶ added in v0.6.0
func (r ListWhatsAppMessageEventsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListWhatsAppMessagesParams ¶ added in v0.6.0
type ListWhatsAppMessagesParams 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 status. Repeat the parameter to match any of several statuses.
Status *[]WhatsAppMessageStatus `form:"status,omitempty" json:"status,omitempty"`
// PhoneNumber Filter by contact phone number (E.164 exact match).
PhoneNumber *string `form:"phone_number,omitempty" json:"phone_number,omitempty"`
// Bsuid Filter by business-scoped user ID (Meta identifier).
Bsuid *string `form:"bsuid,omitempty" json:"bsuid,omitempty"`
}
ListWhatsAppMessagesParams defines parameters for ListWhatsAppMessages.
type ListWhatsAppMessagesResponse ¶ added in v0.6.0
type ListWhatsAppMessagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *WhatsAppMessageList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
JSON503 *ServiceUnavailable
}
func ParseListWhatsAppMessagesResponse ¶ added in v0.6.0
func ParseListWhatsAppMessagesResponse(rsp *http.Response) (*ListWhatsAppMessagesResponse, error)
ParseListWhatsAppMessagesResponse parses an HTTP response from a ListWhatsAppMessagesWithResponse call
func (ListWhatsAppMessagesResponse) ContentType ¶ added in v0.6.0
func (r ListWhatsAppMessagesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListWhatsAppMessagesResponse) Status ¶ added in v0.6.0
func (r ListWhatsAppMessagesResponse) Status() string
Status returns HTTPResponse.Status
func (ListWhatsAppMessagesResponse) StatusCode ¶ added in v0.6.0
func (r ListWhatsAppMessagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListWhatsAppTemplatesResponse ¶ added in v0.6.0
type ListWhatsAppTemplatesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *WhatsAppTemplateList
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseListWhatsAppTemplatesResponse ¶ added in v0.6.0
func ParseListWhatsAppTemplatesResponse(rsp *http.Response) (*ListWhatsAppTemplatesResponse, error)
ParseListWhatsAppTemplatesResponse parses an HTTP response from a ListWhatsAppTemplatesWithResponse call
func (ListWhatsAppTemplatesResponse) ContentType ¶ added in v0.6.0
func (r ListWhatsAppTemplatesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListWhatsAppTemplatesResponse) Status ¶ added in v0.6.0
func (r ListWhatsAppTemplatesResponse) Status() string
Status returns HTTPResponse.Status
func (ListWhatsAppTemplatesResponse) StatusCode ¶ added in v0.6.0
func (r ListWhatsAppTemplatesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Mailbox ¶ added in v0.4.1
type Mailbox struct {
// Address The mailbox's email address. Immutable once created.
Address *openapi_types.Email `json:"address,omitempty"`
// Channel The channel this mailbox receives on. Always `email`.
Channel *MailboxChannel `json:"channel,omitempty"`
// ContactId The contact this mailbox is associated with. Null when unset.
ContactId *ContactID `json:"contact_id"`
// CreatedAt When the mailbox was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// DefaultReplyTo Default Reply-To address stamped on mail sent from this mailbox. Null when unset.
DefaultReplyTo *openapi_types.Email `json:"default_reply_to"`
// DisplayName Display name used as the sender name on mail from this mailbox. Null when unset.
DisplayName *string `json:"display_name"`
Id MailboxID `json:"id"`
InboundAddressId InboundAddressID `json:"inbound_address_id"`
// MessageCount Number of retained messages across all threads.
MessageCount *int64 `json:"message_count,omitempty"`
// Metadata Your own key/value data attached to the mailbox. Up to 2 KB; keys starting with `__bird` are reserved.
Metadata map[string]interface{} `json:"metadata"`
// Owner The principal that owns the mailbox. Always the workspace.
Owner MailboxOwner `json:"owner"`
// ReceivePolicy Which inbound mail the mailbox accepts. `open` accepts everything not blocked by a rule; `replies_only` accepts only replies to messages this mailbox has sent (a reply must match a message the mailbox sent, not merely land in an existing thread); `allowlist` accepts only senders matching an allow rule (replies to prior outbound are always admitted unless blocked); `drop` stores nothing.
ReceivePolicy MailboxReceivePolicy `json:"receive_policy"`
// RetentionTier How long the mailbox remembers message metadata and extracted text. Original rendered source (HTML, raw message, attachments) is always available for 30 days regardless of tier. `3y` and `10y` are reserved future tiers.
RetentionTier MailboxRetentionTier `json:"retention_tier"`
// State Lifecycle state. Suspended mailboxes stop emitting events; inbound mail is retained as blocked.
State *MailboxState `json:"state,omitempty"`
// StorageBytes Logical size of the mailbox's retained memory, in bytes.
StorageBytes *int64 `json:"storage_bytes,omitempty"`
// ThreadCount Number of retained threads.
ThreadCount *int64 `json:"thread_count,omitempty"`
// UpdatedAt When the mailbox was last updated.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Mailbox A durable mailbox identity for an agent. A mailbox owns an email address, groups mail into threads, applies receive policy, and remembers message metadata and extracted text for its retention tier. The original rendered source of each message remains available for 30 days.
type MailboxChannel ¶ added in v0.4.1
type MailboxChannel string
MailboxChannel The channel this mailbox receives on. Always `email`.
const (
Email MailboxChannel = "email"
)
Defines values for MailboxChannel.
func (MailboxChannel) Valid ¶ added in v0.4.1
func (e MailboxChannel) Valid() bool
Valid indicates whether the value is a known member of the MailboxChannel enum.
type MailboxCreate ¶ added in v0.4.1
type MailboxCreate struct {
ContactId *ContactID `json:"contact_id,omitempty"`
// DefaultReplyTo Default Reply-To address stamped on mail sent from this mailbox.
DefaultReplyTo *openapi_types.Email `json:"default_reply_to,omitempty"`
// DisplayName Display name used as the sender name on mail from this mailbox.
DisplayName *string `json:"display_name,omitempty"`
// Domain The domain the address lives under. Defaults to your workspace's agent domain. May also name one of your inbound-enabled custom domains.
Domain *string `json:"domain,omitempty"`
// LocalPart The local part of the mailbox address (the part before `@`). Letters, digits, dots, underscores, and hyphens; stored lowercase. Omit to have Bird generate a random local part.
LocalPart *string `json:"local_part,omitempty"`
// Metadata Your own key/value data to attach to the mailbox. Up to 2 KB; keys starting with `__bird` are reserved.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// ReceivePolicy Which inbound mail the mailbox accepts. `open` accepts everything not blocked by a rule; `replies_only` accepts only replies to messages this mailbox has sent (a reply must match a message the mailbox sent, not merely land in an existing thread); `allowlist` accepts only senders matching an allow rule; `drop` stores nothing.
ReceivePolicy *MailboxCreateReceivePolicy `json:"receive_policy,omitempty"`
// RetentionTier How long the mailbox remembers message metadata and extracted text. Original rendered source is always available for 30 days regardless of tier. `3y` and `10y` are reserved future tiers.
RetentionTier *MailboxCreateRetentionTier `json:"retention_tier,omitempty"`
}
MailboxCreate Parameters for creating a mailbox.
type MailboxCreateReceivePolicy ¶ added in v0.4.1
type MailboxCreateReceivePolicy string
MailboxCreateReceivePolicy Which inbound mail the mailbox accepts. `open` accepts everything not blocked by a rule; `replies_only` accepts only replies to messages this mailbox has sent (a reply must match a message the mailbox sent, not merely land in an existing thread); `allowlist` accepts only senders matching an allow rule; `drop` stores nothing.
const ( MailboxCreateReceivePolicyAllowlist MailboxCreateReceivePolicy = "allowlist" MailboxCreateReceivePolicyDrop MailboxCreateReceivePolicy = "drop" MailboxCreateReceivePolicyOpen MailboxCreateReceivePolicy = "open" MailboxCreateReceivePolicyRepliesOnly MailboxCreateReceivePolicy = "replies_only" )
Defines values for MailboxCreateReceivePolicy.
func (MailboxCreateReceivePolicy) Valid ¶ added in v0.4.1
func (e MailboxCreateReceivePolicy) Valid() bool
Valid indicates whether the value is a known member of the MailboxCreateReceivePolicy enum.
type MailboxCreateRetentionTier ¶ added in v0.4.1
type MailboxCreateRetentionTier string
MailboxCreateRetentionTier How long the mailbox remembers message metadata and extracted text. Original rendered source is always available for 30 days regardless of tier. `3y` and `10y` are reserved future tiers.
const ( MailboxCreateRetentionTierN1y MailboxCreateRetentionTier = "1y" MailboxCreateRetentionTierN30d MailboxCreateRetentionTier = "30d" MailboxCreateRetentionTierN90d MailboxCreateRetentionTier = "90d" )
Defines values for MailboxCreateRetentionTier.
func (MailboxCreateRetentionTier) Valid ¶ added in v0.4.1
func (e MailboxCreateRetentionTier) Valid() bool
Valid indicates whether the value is a known member of the MailboxCreateRetentionTier enum.
type MailboxList ¶ added in v0.4.1
type MailboxList struct {
Data []Mailbox `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"`
}
MailboxList defines model for MailboxList.
type MailboxOwner ¶ added in v0.4.1
type MailboxOwner struct {
Id WorkspaceID `json:"id"`
// Type Owner principal type.
Type *MailboxOwnerType `json:"type,omitempty"`
}
MailboxOwner The principal that owns the mailbox. Always the workspace.
type MailboxOwnerType ¶ added in v0.4.1
type MailboxOwnerType string
MailboxOwnerType Owner principal type.
const (
MailboxOwnerTypeWorkspace MailboxOwnerType = "workspace"
)
Defines values for MailboxOwnerType.
func (MailboxOwnerType) Valid ¶ added in v0.4.1
func (e MailboxOwnerType) Valid() bool
Valid indicates whether the value is a known member of the MailboxOwnerType enum.
type MailboxReceivePolicy ¶ added in v0.4.1
type MailboxReceivePolicy string
MailboxReceivePolicy Which inbound mail the mailbox accepts. `open` accepts everything not blocked by a rule; `replies_only` accepts only replies to messages this mailbox has sent (a reply must match a message the mailbox sent, not merely land in an existing thread); `allowlist` accepts only senders matching an allow rule (replies to prior outbound are always admitted unless blocked); `drop` stores nothing.
const ( MailboxReceivePolicyAllowlist MailboxReceivePolicy = "allowlist" MailboxReceivePolicyDrop MailboxReceivePolicy = "drop" MailboxReceivePolicyOpen MailboxReceivePolicy = "open" MailboxReceivePolicyRepliesOnly MailboxReceivePolicy = "replies_only" )
Defines values for MailboxReceivePolicy.
func (MailboxReceivePolicy) Valid ¶ added in v0.4.1
func (e MailboxReceivePolicy) Valid() bool
Valid indicates whether the value is a known member of the MailboxReceivePolicy enum.
type MailboxRetentionTier ¶ added in v0.4.1
type MailboxRetentionTier string
MailboxRetentionTier How long the mailbox remembers message metadata and extracted text. Original rendered source (HTML, raw message, attachments) is always available for 30 days regardless of tier. `3y` and `10y` are reserved future tiers.
const ( MailboxRetentionTierN1y MailboxRetentionTier = "1y" MailboxRetentionTierN30d MailboxRetentionTier = "30d" MailboxRetentionTierN90d MailboxRetentionTier = "90d" )
Defines values for MailboxRetentionTier.
func (MailboxRetentionTier) Valid ¶ added in v0.4.1
func (e MailboxRetentionTier) Valid() bool
Valid indicates whether the value is a known member of the MailboxRetentionTier enum.
type MailboxState ¶ added in v0.4.1
type MailboxState string
MailboxState Lifecycle state. Suspended mailboxes stop emitting events; inbound mail is retained as blocked.
const ( MailboxStateActive MailboxState = "active" MailboxStateSuspended MailboxState = "suspended" )
Defines values for MailboxState.
func (MailboxState) Valid ¶ added in v0.4.1
func (e MailboxState) Valid() bool
Valid indicates whether the value is a known member of the MailboxState enum.
type MailboxUpdate ¶ added in v0.4.1
type MailboxUpdate struct {
// ContactId The contact this mailbox is associated with. Null clears it.
ContactId *ContactID `json:"contact_id,omitempty"`
// DefaultReplyTo Default Reply-To address stamped on mail sent from this mailbox. Null clears it.
DefaultReplyTo *openapi_types.Email `json:"default_reply_to,omitempty"`
// DisplayName Display name used as the sender name on mail from this mailbox. Null clears it.
DisplayName *string `json:"display_name,omitempty"`
// Metadata Replaces the mailbox's key/value data. Up to 2 KB; keys starting with `__bird` are reserved.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// ReceivePolicy Which inbound mail the mailbox accepts.
ReceivePolicy *MailboxUpdateReceivePolicy `json:"receive_policy,omitempty"`
// RetentionTier How long the mailbox remembers message metadata and extracted text. Lowering the tier deletes memory older than the new horizon and requires `confirm=true` when messages older than the new horizon would be deleted. `3y` and `10y` are reserved future tiers.
RetentionTier *MailboxUpdateRetentionTier `json:"retention_tier,omitempty"`
}
MailboxUpdate Fields to update on a mailbox. Omitted fields are unchanged; fields set to null are cleared. The address and domain are immutable.
type MailboxUpdateReceivePolicy ¶ added in v0.4.1
type MailboxUpdateReceivePolicy string
MailboxUpdateReceivePolicy Which inbound mail the mailbox accepts.
const ( MailboxUpdateReceivePolicyAllowlist MailboxUpdateReceivePolicy = "allowlist" MailboxUpdateReceivePolicyDrop MailboxUpdateReceivePolicy = "drop" MailboxUpdateReceivePolicyOpen MailboxUpdateReceivePolicy = "open" MailboxUpdateReceivePolicyRepliesOnly MailboxUpdateReceivePolicy = "replies_only" )
Defines values for MailboxUpdateReceivePolicy.
func (MailboxUpdateReceivePolicy) Valid ¶ added in v0.4.1
func (e MailboxUpdateReceivePolicy) Valid() bool
Valid indicates whether the value is a known member of the MailboxUpdateReceivePolicy enum.
type MailboxUpdateRetentionTier ¶ added in v0.4.1
type MailboxUpdateRetentionTier string
MailboxUpdateRetentionTier How long the mailbox remembers message metadata and extracted text. Lowering the tier deletes memory older than the new horizon and requires `confirm=true` when messages older than the new horizon would be deleted. `3y` and `10y` are reserved future tiers.
const ( N1y MailboxUpdateRetentionTier = "1y" N30d MailboxUpdateRetentionTier = "30d" N90d MailboxUpdateRetentionTier = "90d" )
Defines values for MailboxUpdateRetentionTier.
func (MailboxUpdateRetentionTier) Valid ¶ added in v0.4.1
func (e MailboxUpdateRetentionTier) Valid() bool
Valid indicates whether the value is a known member of the MailboxUpdateRetentionTier enum.
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 ReceiveRule ¶ added in v0.4.1
type ReceiveRule struct {
// Action What the rule does when it matches. Block rules always win — over allow rules and over the reply admission on allowlist mailboxes.
Action *ReceiveRuleAction `json:"action,omitempty"`
// CreatedAt When the rule was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Entry The sender address or domain the rule matches. Domains also match their subdomains.
Entry *string `json:"entry,omitempty"`
// EntryType Whether the entry is a full address or a domain.
EntryType *ReceiveRuleEntryType `json:"entry_type,omitempty"`
Id ReceiveRuleID `json:"id"`
MailboxId MailboxID `json:"mailbox_id"`
// Note Your own note about why the rule exists. Null when unset.
Note *string `json:"note,omitempty"`
}
ReceiveRule An allow or block entry on a mailbox, evaluated when inbound mail arrives. Matching is against the message's envelope sender; domain entries also match subdomains. A given entry can be allow or block, never both.
type ReceiveRuleAction ¶ added in v0.4.1
type ReceiveRuleAction string
ReceiveRuleAction What the rule does when it matches. Block rules always win — over allow rules and over the reply admission on allowlist mailboxes.
const ( ReceiveRuleActionAllow ReceiveRuleAction = "allow" ReceiveRuleActionBlock ReceiveRuleAction = "block" )
Defines values for ReceiveRuleAction.
func (ReceiveRuleAction) Valid ¶ added in v0.4.1
func (e ReceiveRuleAction) Valid() bool
Valid indicates whether the value is a known member of the ReceiveRuleAction enum.
type ReceiveRuleCreate ¶ added in v0.4.1
type ReceiveRuleCreate struct {
// Action What the rule does when it matches. Block rules always win. To flip an entry's action, delete the existing rule and re-create it.
Action ReceiveRuleCreateAction `json:"action"`
// Entry The sender address (`alice@example.com`) or domain (`example.com`) to match. Domains also match their subdomains. Stored lowercase.
Entry string `json:"entry"`
// Note Your own note about why the rule exists.
Note *string `json:"note,omitempty"`
}
ReceiveRuleCreate Parameters for adding a receive rule to a mailbox.
type ReceiveRuleCreateAction ¶ added in v0.4.1
type ReceiveRuleCreateAction string
ReceiveRuleCreateAction What the rule does when it matches. Block rules always win. To flip an entry's action, delete the existing rule and re-create it.
const ( ReceiveRuleCreateActionAllow ReceiveRuleCreateAction = "allow" ReceiveRuleCreateActionBlock ReceiveRuleCreateAction = "block" )
Defines values for ReceiveRuleCreateAction.
func (ReceiveRuleCreateAction) Valid ¶ added in v0.4.1
func (e ReceiveRuleCreateAction) Valid() bool
Valid indicates whether the value is a known member of the ReceiveRuleCreateAction enum.
type ReceiveRuleEntryType ¶ added in v0.4.1
type ReceiveRuleEntryType string
ReceiveRuleEntryType Whether the entry is a full address or a domain.
const ( ReceiveRuleEntryTypeAddress ReceiveRuleEntryType = "address" ReceiveRuleEntryTypeDomain ReceiveRuleEntryType = "domain" )
Defines values for ReceiveRuleEntryType.
func (ReceiveRuleEntryType) Valid ¶ added in v0.4.1
func (e ReceiveRuleEntryType) Valid() bool
Valid indicates whether the value is a known member of the ReceiveRuleEntryType enum.
type ReceiveRuleID ¶ added in v0.4.1
type ReceiveRuleID = string
ReceiveRuleID defines model for ReceiveRuleID.
type ReceiveRuleList ¶ added in v0.4.1
type ReceiveRuleList struct {
Data []ReceiveRule `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"`
}
ReceiveRuleList defines model for ReceiveRuleList.
type RecipientRole ¶
type RecipientRole string
RecipientRole Envelope position of a recipient on an outbound email event.
const ( Bcc RecipientRole = "bcc" Cc RecipientRole = "cc" To RecipientRole = "to" )
Defines values for RecipientRole.
func (RecipientRole) Valid ¶
func (e RecipientRole) Valid() bool
Valid indicates whether the value is a known member of the RecipientRole enum.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SMSBatchSummary ¶ added in v0.3.0
type SMSBatchSummary struct {
// AcceptedCount Number of messages accepted in the batch.
AcceptedCount int `json:"accepted_count"`
}
SMSBatchSummary Aggregate result for an SMS batch.
type SMSCost ¶ added in v0.3.0
type SMSCost struct {
// Amount Total cost as a decimal string — the per-segment rate multiplied by the segment count, plus any surcharges.
Amount *string `json:"amount,omitempty"`
// Breakdown Per-component cost breakdown. Returned on single-message reads; omitted from list rows.
Breakdown *SMSCostBreakdown `json:"breakdown,omitempty"`
// CurrencyCode ISO 4217 three-letter currency code.
CurrencyCode *CurrencyCode `json:"currency_code,omitempty"`
}
SMSCost Cost of the message. Null until the message has been priced; the cost is populated as the message is processed, not at the moment it is accepted.
type SMSCostBreakdown ¶ added in v0.3.0
type SMSCostBreakdown struct {
// CarrierSurcharge Carrier surcharge component as a decimal string (for example US 10DLC fees). `0.0000` when none applies.
CarrierSurcharge string `json:"carrier_surcharge"`
// CountryCode ISO 3166-1 alpha-2 destination country the price was resolved for.
CountryCode string `json:"country_code"`
// PerSegment Per-segment price as a decimal string.
PerSegment string `json:"per_segment"`
// Segments Number of billable segments.
Segments int `json:"segments"`
}
SMSCostBreakdown Per-component cost breakdown. Returned on single-message reads; omitted from list rows.
type SMSError ¶ added in v0.2.0
type SMSError struct {
// CarrierErrorCode Raw carrier-supplied error code, when available, for low-level debugging.
CarrierErrorCode *string `json:"carrier_error_code,omitempty"`
// Code Bird-stable failure reason. `invalid_destination` — the number is not assigned, ported out, or malformed. `unreachable` — handset off or out of coverage. `blocked_by_carrier` — the carrier filtered the message. `blocked_by_recipient` — the recipient device blocked the sender. `landline_unreachable` — the destination is a landline that does not accept SMS. `content_rejected` — the carrier rejected the content. `sender_unregistered` — the sender is not registered for the destination. `recipient_opted_out` — the recipient is on a suppression list. `provider_unavailable` — an upstream failure after retries. `insufficient_balance` — the workspace wallet had insufficient balance to send the message. `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. `insufficient_balance` — the workspace wallet had insufficient balance to send the message. `unknown` — an unmapped failure.
const ( BlockedByCarrier SMSErrorCode = "blocked_by_carrier" BlockedByRecipient SMSErrorCode = "blocked_by_recipient" ContentRejected SMSErrorCode = "content_rejected" InsufficientBalance SMSErrorCode = "insufficient_balance" InvalidDestination SMSErrorCode = "invalid_destination" LandlineUnreachable SMSErrorCode = "landline_unreachable" RecipientOptedOut SMSErrorCode = "recipient_opted_out" SenderUnregistered SMSErrorCode = "sender_unregistered" Unknown SMSErrorCode = "unknown" Unreachable SMSErrorCode = "unreachable" )
Defines values for SMSErrorCode.
func (SMSErrorCode) Valid ¶ added in v0.2.0
func (e SMSErrorCode) Valid() bool
Valid indicates whether the value is a known member of the SMSErrorCode enum.
type SMSMessage ¶ added in v0.3.0
type SMSMessage struct {
// Carrier Carrier that handled the message, when known. Populated once a delivery receipt identifies it.
Carrier *string `json:"carrier,omitempty"`
// Category Content classification supplied on the send. Null for inbound messages.
Category *SMSMessageCategory `json:"category,omitempty"`
// Cost Cost of the message. Null until the message has been priced; the cost is populated as the message is processed, not at the moment it is accepted.
Cost *SMSCost `json:"cost,omitempty"`
// CreatedAt When the message was accepted (outbound) or received (inbound).
CreatedAt *time.Time `json:"created_at,omitempty"`
// DeliveredAt When delivery was confirmed. Null until then.
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
// Direction Whether the message was sent from a Bird sender (`outbound`) or received from a subscriber (`inbound`).
Direction *SMSMessageDirection `json:"direction,omitempty"`
// From Sender the message was sent from — an E.164 number, an alphanumeric sender ID, or a short code.
From string `json:"from"`
Id SMSMessageID `json:"id"`
// LastError Failure detail for a message that could not be delivered or was rejected. Null when there is no failure.
LastError *SMSError `json:"last_error,omitempty"`
// MccMnc Mobile country code and mobile network code of the carrier, when known.
MccMnc *string `json:"mcc_mnc,omitempty"`
// Metadata Arbitrary JSON metadata stored on the message and echoed in webhook payloads.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Segments Segment breakdown for the message body. Segment count drives billing.
Segments SMSSegments `json:"segments"`
// SentAt When the message was handed to the carrier. Null until then.
SentAt *time.Time `json:"sent_at,omitempty"`
Status *SMSMessageStatus `json:"status,omitempty"`
// Tags Structured `{name, value}` filter labels applied to this message.
Tags *[]Tag `json:"tags,omitempty"`
// Text Message body.
Text string `json:"text"`
// To Recipient phone number in E.164 format.
To string `json:"to"`
// ValidityPeriod How long, in seconds, Bird keeps trying to deliver before the message transitions to `expired`.
ValidityPeriod *int `json:"validity_period,omitempty"`
}
SMSMessage defines model for SMSMessage.
type SMSMessageBatchRequest ¶ added in v0.3.0
type SMSMessageBatchRequest = []SMSMessageSendRequest
SMSMessageBatchRequest Batch of SMS message send requests. All items are validated before any are queued.
type SMSMessageBatchResponse ¶ added in v0.3.0
type SMSMessageBatchResponse struct {
// Data One entry per message in the batch, in submission order.
Data []SMSMessage `json:"data"`
// Summary Aggregate result for an SMS batch.
Summary *SMSBatchSummary `json:"summary,omitempty"`
}
SMSMessageBatchResponse defines model for SMSMessageBatchResponse.
type SMSMessageCategory ¶ added in v0.3.0
type SMSMessageCategory string
SMSMessageCategory Content classification. Drives opt-out (STOP) policy, quiet-hours, and per-country compliance.
const ( SMSMessageCategoryAuthentication SMSMessageCategory = "authentication" SMSMessageCategoryMarketing SMSMessageCategory = "marketing" SMSMessageCategoryService SMSMessageCategory = "service" SMSMessageCategoryTransactional SMSMessageCategory = "transactional" )
Defines values for SMSMessageCategory.
func (SMSMessageCategory) Valid ¶ added in v0.3.0
func (e SMSMessageCategory) Valid() bool
Valid indicates whether the value is a known member of the SMSMessageCategory enum.
type SMSMessageDirection ¶ added in v0.3.0
type SMSMessageDirection string
SMSMessageDirection Whether the message was sent from a Bird sender (`outbound`) or received from a subscriber (`inbound`).
const ( SMSMessageDirectionInbound SMSMessageDirection = "inbound" SMSMessageDirectionOutbound SMSMessageDirection = "outbound" )
Defines values for SMSMessageDirection.
func (SMSMessageDirection) Valid ¶ added in v0.3.0
func (e SMSMessageDirection) Valid() bool
Valid indicates whether the value is a known member of the SMSMessageDirection enum.
type SMSMessageID ¶ added in v0.2.0
type SMSMessageID = string
SMSMessageID defines model for SMSMessageID.
type SMSMessageList ¶ added in v0.3.0
type SMSMessageList struct {
// Data Page of message objects.
Data []SMSMessage `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
SMSMessageList defines model for SMSMessageList.
type SMSMessageSendRequest ¶ added in v0.3.0
type SMSMessageSendRequest struct {
// AudienceId Preview feature — audience-targeted sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
AudienceId *string `json:"audience_id,omitempty"`
// BroadcastId Preview feature — broadcast correlation. Currently unavailable; supplying this field returns `422 unsupported_feature`.
BroadcastId *string `json:"broadcast_id,omitempty"`
// CampaignId Preview feature — campaign correlation for analytics. Currently unavailable; supplying this field returns `422 unsupported_feature`.
CampaignId *string `json:"campaign_id,omitempty"`
// Category Content classification. Drives opt-out (STOP) policy, quiet-hours, and per-country compliance. Required on a free-text send; omit it on a template send, where the category is derived from the template.
Category *SMSMessageCategory `json:"category,omitempty"`
// ContactId Preview feature — contact-targeted sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ContactId *string `json:"contact_id,omitempty"`
// From Sender to send from: an E.164 number (`+15557654321`), an alphanumeric sender ID (up to 11 characters, for example `MyBrand`), or a short code (5–6 digits). When omitted, Bird selects an eligible sender for you.
From *string `json:"from,omitempty"`
// MaxPricePerSegment Preview feature — per-segment price ceiling. Currently unavailable; supplying this field returns `422 unsupported_feature`.
MaxPricePerSegment *float32 `json:"max_price_per_segment,omitempty"`
// MediaUrls Preview feature — multimedia (MMS) attachments. Currently unavailable; supplying this field returns `422 unsupported_feature`.
MediaUrls *[]string `json:"media_urls,omitempty"`
// MessagingProfileId Preview feature — sender selection from a messaging profile pool. Currently unavailable; supplying this field returns `422 unsupported_feature`.
MessagingProfileId *string `json:"messaging_profile_id,omitempty"`
// Metadata Arbitrary JSON object stored on the message, returned on API reads, and echoed in webhook payloads. Maximum 2 KB serialized. Use metadata for per-send context like internal IDs and foreign keys. For low-cardinality filterable labels, use `tags` instead.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Personalization Preview feature — per-recipient substitution for batch sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
Personalization *map[string]interface{} `json:"personalization,omitempty"`
// ScheduledAt Preview feature — send-later scheduling. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
// Tags Structured `{name, value}` labels for filtering and analytics. Tags become first-class query dimensions: filter the list endpoint by tag name, slice analytics by tag, and surface in webhook payloads. Maximum 20 tags per send. Use tags for low-cardinality dimensions (`category`, `experiment_variant`). For arbitrary structured context you do not need as a filter dimension, use `metadata` instead.
Tags *[]Tag `json:"tags,omitempty"`
// Template Send using a stored template instead of free text. Mutually exclusive with `text`; the message category is derived from the template, so `from`, `category`, and `media_urls` are not accepted alongside it.
Template *SMSTemplateSend `json:"template,omitempty"`
// Text Free-text message body. Required unless `template` is supplied (the two are mutually exclusive). At least 1 character, up to a 12-segment cap (roughly 1836 GSM-7 or 804 UCS-2 characters). Bird does not truncate; a body exceeding 12 segments is rejected with a 422. The limit is on segment count, not characters, because GSM-7 and UCS-2 encodings differ in characters per segment.
Text *string `json:"text,omitempty"`
// To Recipient phone number in E.164 format (for example `+15551234567`). One recipient per message.
To string `json:"to"`
// TopicId Preview feature — topic-gated sends. Currently unavailable; supplying this field returns `422 unsupported_feature`.
TopicId *string `json:"topic_id,omitempty"`
// TrackClicks Preview feature — link click tracking. Defaults to `false`. Currently unavailable; setting this to `true` returns `422 unsupported_feature`.
TrackClicks *bool `json:"track_clicks,omitempty"`
// ValidityPeriod Preview feature — how long, in seconds (60–172800), Bird keeps trying to deliver before the message transitions to `expired`. Currently unavailable; supplying this field returns `422 unsupported_feature`.
ValidityPeriod *int `json:"validity_period,omitempty"`
// contains filtered or unexported fields
}
SMSMessageSendRequest A message to send. Supply exactly one of `text` (free-text, which also requires `category`) or `template` (a stored template, whose category is derived). Supplying both, or neither, is rejected.
func (SMSMessageSendRequest) AsSMSMessageSendRequest0 ¶ added in v0.3.0
func (t SMSMessageSendRequest) AsSMSMessageSendRequest0() (SMSMessageSendRequest0, error)
AsSMSMessageSendRequest0 returns the union data inside the SMSMessageSendRequest as a SMSMessageSendRequest0
func (SMSMessageSendRequest) AsSMSMessageSendRequest1 ¶ added in v0.3.0
func (t SMSMessageSendRequest) AsSMSMessageSendRequest1() (SMSMessageSendRequest1, error)
AsSMSMessageSendRequest1 returns the union data inside the SMSMessageSendRequest as a SMSMessageSendRequest1
func (*SMSMessageSendRequest) FromSMSMessageSendRequest0 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) FromSMSMessageSendRequest0(v SMSMessageSendRequest0) error
FromSMSMessageSendRequest0 overwrites any union data inside the SMSMessageSendRequest as the provided SMSMessageSendRequest0
func (*SMSMessageSendRequest) FromSMSMessageSendRequest1 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) FromSMSMessageSendRequest1(v SMSMessageSendRequest1) error
FromSMSMessageSendRequest1 overwrites any union data inside the SMSMessageSendRequest as the provided SMSMessageSendRequest1
func (SMSMessageSendRequest) MarshalJSON ¶ added in v0.3.0
func (t SMSMessageSendRequest) MarshalJSON() ([]byte, error)
func (*SMSMessageSendRequest) MergeSMSMessageSendRequest0 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest0(v SMSMessageSendRequest0) error
MergeSMSMessageSendRequest0 performs a merge with any union data inside the SMSMessageSendRequest, using the provided SMSMessageSendRequest0
func (*SMSMessageSendRequest) MergeSMSMessageSendRequest1 ¶ added in v0.3.0
func (t *SMSMessageSendRequest) MergeSMSMessageSendRequest1(v SMSMessageSendRequest1) error
MergeSMSMessageSendRequest1 performs a merge with any union data inside the SMSMessageSendRequest, using the provided SMSMessageSendRequest1
func (*SMSMessageSendRequest) UnmarshalJSON ¶ added in v0.3.0
func (t *SMSMessageSendRequest) UnmarshalJSON(b []byte) error
type SMSMessageSendRequest0 ¶ added in v0.3.0
type SMSMessageSendRequest0 = interface{}
SMSMessageSendRequest0 defines model for .
type SMSMessageSendRequest1 ¶ added in v0.3.0
type SMSMessageSendRequest1 = interface{}
SMSMessageSendRequest1 defines model for .
type SMSMessageStatus ¶ added in v0.3.0
type SMSMessageStatus string
SMSMessageStatus Delivery status. `scheduled` means the message is queued to send at a future time and has not been dispatched yet. `accepted` means Bird accepted the request and it is awaiting handoff to the carrier network. `sent` means it was handed to the carrier and is awaiting a delivery receipt. `delivered` is confirmed delivery. `undelivered` is a non-permanent non-delivery (handset off, content blocked). `failed` is a terminal permanent failure. `rejected` means Bird refused it before reaching the carrier. `canceled` means a scheduled message was canceled before it was sent. `expired` means the validity period elapsed without a terminal receipt. `received` applies to inbound messages.
const ( SMSMessageStatusAccepted SMSMessageStatus = "accepted" SMSMessageStatusCanceled SMSMessageStatus = "canceled" SMSMessageStatusDelivered SMSMessageStatus = "delivered" SMSMessageStatusExpired SMSMessageStatus = "expired" SMSMessageStatusFailed SMSMessageStatus = "failed" SMSMessageStatusReceived SMSMessageStatus = "received" SMSMessageStatusRejected SMSMessageStatus = "rejected" SMSMessageStatusScheduled SMSMessageStatus = "scheduled" SMSMessageStatusSent SMSMessageStatus = "sent" SMSMessageStatusUndelivered SMSMessageStatus = "undelivered" )
Defines values for SMSMessageStatus.
func (SMSMessageStatus) Valid ¶ added in v0.3.0
func (e SMSMessageStatus) Valid() bool
Valid indicates whether the value is a known member of the SMSMessageStatus enum.
type SMSSegments ¶ added in v0.3.0
type SMSSegments struct {
// Characters Character count of the body under the selected encoding.
Characters *int `json:"characters,omitempty"`
// Count Number of segments the body is split into. Each segment is a billable unit.
Count *int `json:"count,omitempty"`
// Encoding Encoding used for the body. `GSM_7BIT` fits 160 characters in a single segment (153 per part when multi-segment); `UCS2` is used when the body contains any character outside the GSM 03.38 alphabet (emoji, CJK, some accented characters) and fits 70 characters in a single segment (67 per part when multi-segment).
Encoding *SMSSegmentsEncoding `json:"encoding,omitempty"`
}
SMSSegments Segment breakdown for the message body. Segment count drives billing.
type SMSSegmentsEncoding ¶ added in v0.3.0
type SMSSegmentsEncoding string
SMSSegmentsEncoding Encoding used for the body. `GSM_7BIT` fits 160 characters in a single segment (153 per part when multi-segment); `UCS2` is used when the body contains any character outside the GSM 03.38 alphabet (emoji, CJK, some accented characters) and fits 70 characters in a single segment (67 per part when multi-segment).
const ( GSM7BIT SMSSegmentsEncoding = "GSM_7BIT" UCS2 SMSSegmentsEncoding = "UCS2" )
Defines values for SMSSegmentsEncoding.
func (SMSSegmentsEncoding) Valid ¶ added in v0.3.0
func (e SMSSegmentsEncoding) Valid() bool
Valid indicates whether the value is a known member of the SMSSegmentsEncoding enum.
type SMSTemplate ¶ added in v0.3.0
type SMSTemplate struct {
// AvailableLanguages The languages this template is available in, as BCP-47 tags.
AvailableLanguages *[]string `json:"available_languages,omitempty"`
// Body The template body in its default language, shown for preview.
Body *string `json:"body,omitempty"`
// Category Content classification applied to messages sent from this template.
Category *SMSMessageCategory `json:"category,omitempty"`
// CreatedAt When the template was created. Null for built-in templates.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Description Human-readable description of what the template is for.
Description *string `json:"description,omitempty"`
// DraftVersionId The current editable draft version. Always null today — SMS templates are not yet versioned; present for parity with email templates.
DraftVersionId *SMSTemplateVersionID `json:"draft_version_id,omitempty"`
Id SMSTemplateID `json:"id"`
// Name The template's stable handle. Pass it (or the id) as the template reference when sending.
Name *TemplateName `json:"name,omitempty"`
// PublishedVersionId The currently published version, or null if the template has never been published. Always null today — SMS templates are not yet versioned; present for parity with email templates.
PublishedVersionId *SMSTemplateVersionID `json:"published_version_id,omitempty"`
// Revision The draft's revision counter. Always null today — SMS templates are not yet versioned; present for parity with email templates.
Revision *int `json:"revision,omitempty"`
// Scope Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
Scope *TemplateScope `json:"scope,omitempty"`
// Status The template's lifecycle state. Built-in templates are always `active`.
Status *SMSTemplateStatus `json:"status,omitempty"`
// UpdatedAt When the template was last updated. Null for built-in templates.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// Variables The typed slots this template fills in from the values you supply when sending.
Variables *[]TemplateVariable `json:"variables,omitempty"`
}
SMSTemplate defines model for SMSTemplate.
type SMSTemplateID ¶ added in v0.3.0
type SMSTemplateID = string
SMSTemplateID defines model for SMSTemplateID.
type SMSTemplateList ¶ added in v0.3.0
type SMSTemplateList struct {
// Data The templates available to your workspace. The catalogue is small and returned in full — this list is not paginated.
Data []SMSTemplate `json:"data"`
}
SMSTemplateList defines model for SMSTemplateList.
type SMSTemplateSend ¶ added in v0.3.0
type SMSTemplateSend struct {
Id *SMSTemplateID `json:"id,omitempty"`
// Language Language tag (BCP 47, for example `fr` or `pt-BR`) selecting the localized body. Falls back to the closest available language, then English, when the exact tag is not stocked. Omit for English.
Language *string `json:"language,omitempty"`
// Name The template to send, by its name handle (for example `bird_otp_verification`). Browse the available templates and their variables with the templates endpoint.
Name *TemplateName `json:"name,omitempty"`
// Parameters Values for the template's variables, keyed by variable name. The accepted keys and their formats are fixed per template — see the template's `variables` on the templates endpoint. Every required variable must be supplied, and no undeclared key may be present. Cap: 16 KB serialized.
Parameters *map[string]interface{} `json:"parameters,omitempty"`
// contains filtered or unexported fields
}
SMSTemplateSend A send-by-template reference. Identify the template by its `id` or its `name` (supply exactly one), optionally pick a language, and pass its variable values in `parameters`.
func (SMSTemplateSend) AsSMSTemplateSend0 ¶ added in v0.3.0
func (t SMSTemplateSend) AsSMSTemplateSend0() (SMSTemplateSend0, error)
AsSMSTemplateSend0 returns the union data inside the SMSTemplateSend as a SMSTemplateSend0
func (SMSTemplateSend) AsSMSTemplateSend1 ¶ added in v0.3.0
func (t SMSTemplateSend) AsSMSTemplateSend1() (SMSTemplateSend1, error)
AsSMSTemplateSend1 returns the union data inside the SMSTemplateSend as a SMSTemplateSend1
func (*SMSTemplateSend) FromSMSTemplateSend0 ¶ added in v0.3.0
func (t *SMSTemplateSend) FromSMSTemplateSend0(v SMSTemplateSend0) error
FromSMSTemplateSend0 overwrites any union data inside the SMSTemplateSend as the provided SMSTemplateSend0
func (*SMSTemplateSend) FromSMSTemplateSend1 ¶ added in v0.3.0
func (t *SMSTemplateSend) FromSMSTemplateSend1(v SMSTemplateSend1) error
FromSMSTemplateSend1 overwrites any union data inside the SMSTemplateSend as the provided SMSTemplateSend1
func (SMSTemplateSend) MarshalJSON ¶ added in v0.3.0
func (t SMSTemplateSend) MarshalJSON() ([]byte, error)
func (*SMSTemplateSend) MergeSMSTemplateSend0 ¶ added in v0.3.0
func (t *SMSTemplateSend) MergeSMSTemplateSend0(v SMSTemplateSend0) error
MergeSMSTemplateSend0 performs a merge with any union data inside the SMSTemplateSend, using the provided SMSTemplateSend0
func (*SMSTemplateSend) MergeSMSTemplateSend1 ¶ added in v0.3.0
func (t *SMSTemplateSend) MergeSMSTemplateSend1(v SMSTemplateSend1) error
MergeSMSTemplateSend1 performs a merge with any union data inside the SMSTemplateSend, using the provided SMSTemplateSend1
func (*SMSTemplateSend) UnmarshalJSON ¶ added in v0.3.0
func (t *SMSTemplateSend) UnmarshalJSON(b []byte) error
type SMSTemplateSend0 ¶ added in v0.3.0
type SMSTemplateSend0 = interface{}
SMSTemplateSend0 defines model for .
type SMSTemplateSend1 ¶ added in v0.3.0
type SMSTemplateSend1 = interface{}
SMSTemplateSend1 defines model for .
type SMSTemplateStatus ¶ added in v0.3.0
type SMSTemplateStatus string
SMSTemplateStatus The template's lifecycle state. Built-in templates are always `active`.
const ( SMSTemplateStatusActive SMSTemplateStatus = "active" SMSTemplateStatusApproved SMSTemplateStatus = "approved" SMSTemplateStatusDraft SMSTemplateStatus = "draft" SMSTemplateStatusPending SMSTemplateStatus = "pending" SMSTemplateStatusRejected SMSTemplateStatus = "rejected" )
Defines values for SMSTemplateStatus.
func (SMSTemplateStatus) Valid ¶ added in v0.3.0
func (e SMSTemplateStatus) Valid() bool
Valid indicates whether the value is a known member of the SMSTemplateStatus enum.
type SMSTemplateVersionID ¶ added in v0.3.0
type SMSTemplateVersionID = string
SMSTemplateVersionID defines model for SMSTemplateVersionID.
type SendWhatsAppMessageJSONRequestBody ¶ added in v0.6.0
type SendWhatsAppMessageJSONRequestBody = SendWhatsAppMessageRequest
SendWhatsAppMessageJSONRequestBody defines body for SendWhatsAppMessage for application/json ContentType.
type SendWhatsAppMessageParams ¶ added in v0.6.0
type SendWhatsAppMessageParams 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"`
}
SendWhatsAppMessageParams defines parameters for SendWhatsAppMessage.
type SendWhatsAppMessageRequest ¶ added in v0.4.0
type SendWhatsAppMessageRequest struct {
// Template The template to send. Bird selects the sender number from the template's category, so there is no sender field on this request. Templates are currently the only supported content type, so every send must include one; free-text content will be added in a future release.
Template *SendWhatsAppMessageTemplate `json:"template,omitempty"`
// To The message recipient's phone number in E.164 format (for example `+31612345678`).
To string `json:"to"`
}
SendWhatsAppMessageRequest defines model for SendWhatsAppMessageRequest.
type SendWhatsAppMessageResponse ¶ added in v0.6.0
type SendWhatsAppMessageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON202 *WhatsAppMessage
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseSendWhatsAppMessageResponse ¶ added in v0.6.0
func ParseSendWhatsAppMessageResponse(rsp *http.Response) (*SendWhatsAppMessageResponse, error)
ParseSendWhatsAppMessageResponse parses an HTTP response from a SendWhatsAppMessageWithResponse call
func (SendWhatsAppMessageResponse) ContentType ¶ added in v0.6.0
func (r SendWhatsAppMessageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SendWhatsAppMessageResponse) Status ¶ added in v0.6.0
func (r SendWhatsAppMessageResponse) Status() string
Status returns HTTPResponse.Status
func (SendWhatsAppMessageResponse) StatusCode ¶ added in v0.6.0
func (r SendWhatsAppMessageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SendWhatsAppMessageTemplate ¶ added in v0.4.0
type SendWhatsAppMessageTemplate struct {
// Components The values that fill the template's placeholders.
Components *[]WhatsAppMessageTemplateComponent `json:"components,omitempty"`
// Language Language code of the template variant to send (for example `en` or `pt_BR`). May be omitted when the template has a single language.
Language *string `json:"language,omitempty"`
// Name The template to send, by its name (for example `bird_otp`).
Name TemplateName `json:"name"`
}
SendWhatsAppMessageTemplate defines model for SendWhatsAppMessageTemplate.
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 ( All SuppressionAppliesTo = "all" Category SuppressionAppliesTo = "category" NonTransactional SuppressionAppliesTo = "non_transactional" )
Defines values for SuppressionAppliesTo.
func (SuppressionAppliesTo) Valid ¶
func (e SuppressionAppliesTo) Valid() bool
Valid indicates whether the value is a known member of the SuppressionAppliesTo enum.
type SuppressionCreate ¶
type SuppressionCreate struct {
// Email Email address to suppress. Normalized to lowercase before storage.
Email openapi_types.Email `json:"email"`
}
SuppressionCreate defines model for SuppressionCreate.
type SuppressionList ¶
type SuppressionList struct {
Data []Suppression `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
}
SuppressionList defines model for SuppressionList.
type SuppressionOrigin ¶
type SuppressionOrigin string
SuppressionOrigin defines model for Suppression.Origin.
const ( ApiKey SuppressionOrigin = "api_key" BounceEvent SuppressionOrigin = "bounce_event" ComplaintEvent SuppressionOrigin = "complaint_event" UnsubscribeEvent SuppressionOrigin = "unsubscribe_event" User SuppressionOrigin = "user" )
Defines values for SuppressionOrigin.
func (SuppressionOrigin) Valid ¶
func (e SuppressionOrigin) Valid() bool
Valid indicates whether the value is a known member of the SuppressionOrigin enum.
type SuppressionReason ¶
type SuppressionReason string
SuppressionReason defines model for Suppression.Reason.
const ( Complaint SuppressionReason = "complaint" HardBounce SuppressionReason = "hard_bounce" Manual SuppressionReason = "manual" Unsubscribe SuppressionReason = "unsubscribe" )
Defines values for SuppressionReason.
func (SuppressionReason) Valid ¶
func (e SuppressionReason) Valid() bool
Valid indicates whether the value is a known member of the SuppressionReason enum.
type SuppressionScope ¶
type SuppressionScope struct {
// Id Public ID or alias of the scoped resource. For workspace scope, this is the workspace ID (ws_ prefix).
Id string `json:"id"`
// Type The scope this suppression applies to. Suppressions are currently workspace-scoped; the other scope types are reserved for future use.
Type SuppressionScopeType `json:"type"`
}
SuppressionScope defines model for SuppressionScope.
type SuppressionScopeType ¶
type SuppressionScopeType string
SuppressionScopeType The scope this suppression applies to. Suppressions are currently workspace-scoped; the other scope types are reserved for future use.
const ( SuppressionScopeTypeAudience SuppressionScopeType = "audience" SuppressionScopeTypeCategory SuppressionScopeType = "category" SuppressionScopeTypeContact SuppressionScopeType = "contact" SuppressionScopeTypeDomain SuppressionScopeType = "domain" SuppressionScopeTypeTopic SuppressionScopeType = "topic" SuppressionScopeTypeWorkspace SuppressionScopeType = "workspace" )
Defines values for SuppressionScopeType.
func (SuppressionScopeType) Valid ¶
func (e SuppressionScopeType) Valid() bool
Valid indicates whether the value is a known member of the SuppressionScopeType enum.
type Tag ¶ added in v0.3.0
type Tag struct {
// Name Tag name. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 32 characters.
Name string `json:"name"`
// Value Tag value. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 64 characters.
Value string `json:"value"`
}
Tag Structured key/value label attached to a message. Surfaces in list filters, the event log, and webhook payloads. Use tags for low-cardinality filtering dimensions (category, experiment ID, template ID). For arbitrary per-send context that does not need to be filterable, use `metadata`. Tag count and per-tag size are capped to keep per-send tag payloads small — see the send request for the array maximum. Tag names are unique within a send; supplying the same name twice is rejected.
type TemplateName ¶ added in v0.4.1
type TemplateName = string
TemplateName A template's send-by handle — the stable reference used in place of the template id when sending. Lowercase letters, numbers, hyphens, and underscores; starts and ends with a letter or number.
type TemplateScope ¶ added in v0.3.0
type TemplateScope string
TemplateScope Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
const ( TemplateScopeSystem TemplateScope = "system" TemplateScopeWorkspace TemplateScope = "workspace" )
Defines values for TemplateScope.
func (TemplateScope) Valid ¶ added in v0.3.0
func (e TemplateScope) Valid() bool
Valid indicates whether the value is a known member of the TemplateScope enum.
type TemplateVariable ¶ added in v0.3.0
type TemplateVariable struct {
// Constraint A human-readable description of the accepted values.
Constraint *string `json:"constraint,omitempty"`
// Key The parameters key this slot is filled with.
Key *string `json:"key,omitempty"`
// Required Whether the slot must be supplied when sending. Advisory for email templates, where a missing value renders as empty rather than rejecting the send.
Required *bool `json:"required,omitempty"`
// Type The value type this slot accepts. Open enum — treat any unrecognized value as a future type rather than an error. SMS templates use the typed slots (`code`, `amount`, …); email templates use `text`.
Type *string `json:"type,omitempty"`
}
TemplateVariable A single variable slot a template fills in from the values supplied when sending. Shared across channels (SMS, email) so template introspection reads the same everywhere.
type Timestamps ¶
type Timestamps struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
Timestamps defines model for Timestamps.
type UnarchiveContactPropertyParams ¶ added in v0.4.0
type UnarchiveContactPropertyParams 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"`
}
UnarchiveContactPropertyParams defines parameters for UnarchiveContactProperty.
type UnarchiveContactPropertyResponse ¶ added in v0.4.0
type UnarchiveContactPropertyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ContactProperty
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON409 *Conflict
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseUnarchiveContactPropertyResponse ¶ added in v0.4.0
func ParseUnarchiveContactPropertyResponse(rsp *http.Response) (*UnarchiveContactPropertyResponse, error)
ParseUnarchiveContactPropertyResponse parses an HTTP response from a UnarchiveContactPropertyWithResponse call
func (UnarchiveContactPropertyResponse) ContentType ¶ added in v0.4.0
func (r UnarchiveContactPropertyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UnarchiveContactPropertyResponse) Status ¶ added in v0.4.0
func (r UnarchiveContactPropertyResponse) Status() string
Status returns HTTPResponse.Status
func (UnarchiveContactPropertyResponse) StatusCode ¶ added in v0.4.0
func (r UnarchiveContactPropertyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UnassignAudienceContactParams ¶ added in v0.4.0
type UnassignAudienceContactParams 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"`
}
UnassignAudienceContactParams defines parameters for UnassignAudienceContact.
type UnassignAudienceContactResponse ¶ added in v0.4.0
type UnassignAudienceContactResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseUnassignAudienceContactResponse ¶ added in v0.4.0
func ParseUnassignAudienceContactResponse(rsp *http.Response) (*UnassignAudienceContactResponse, error)
ParseUnassignAudienceContactResponse parses an HTTP response from a UnassignAudienceContactWithResponse call
func (UnassignAudienceContactResponse) ContentType ¶ added in v0.4.0
func (r UnassignAudienceContactResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UnassignAudienceContactResponse) Status ¶ added in v0.4.0
func (r UnassignAudienceContactResponse) Status() string
Status returns HTTPResponse.Status
func (UnassignAudienceContactResponse) StatusCode ¶ added in v0.4.0
func (r UnassignAudienceContactResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UnassignAudienceContactsJSONRequestBody ¶ added in v0.4.0
type UnassignAudienceContactsJSONRequestBody = AudienceContactsRemoveRequest
UnassignAudienceContactsJSONRequestBody defines body for UnassignAudienceContacts for application/json ContentType.
type UnassignAudienceContactsParams ¶ added in v0.4.0
type UnassignAudienceContactsParams 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"`
}
UnassignAudienceContactsParams defines parameters for UnassignAudienceContacts.
type UnassignAudienceContactsResponse ¶ added in v0.4.0
type UnassignAudienceContactsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseUnassignAudienceContactsResponse ¶ added in v0.4.0
func ParseUnassignAudienceContactsResponse(rsp *http.Response) (*UnassignAudienceContactsResponse, error)
ParseUnassignAudienceContactsResponse parses an HTTP response from a UnassignAudienceContactsWithResponse call
func (UnassignAudienceContactsResponse) ContentType ¶ added in v0.4.0
func (r UnassignAudienceContactsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UnassignAudienceContactsResponse) Status ¶ added in v0.4.0
func (r UnassignAudienceContactsResponse) Status() string
Status returns HTTPResponse.Status
func (UnassignAudienceContactsResponse) StatusCode ¶ added in v0.4.0
func (r UnassignAudienceContactsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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 UnmetGate ¶ added in v0.4.1
type UnmetGate struct {
// Name Human-readable name of the verification requirement.
Name *string `json:"name,omitempty"`
// RemediationKind How to resolve this requirement.
RemediationKind *string `json:"remediation_kind,omitempty"`
// Slug Stable identifier for the verification requirement.
Slug *string `json:"slug,omitempty"`
// Status The requirement's current state — for example, not yet started, in review, or previously revoked.
Status *string `json:"status,omitempty"`
}
UnmetGate A verification requirement that is not yet satisfied, blocking the requested action. Complete the corresponding verification flow, then retry.
type UpdateAudienceJSONRequestBody ¶ added in v0.4.0
type UpdateAudienceJSONRequestBody = AudienceUpdateRequest
UpdateAudienceJSONRequestBody defines body for UpdateAudience for application/json ContentType.
type UpdateAudienceParams ¶ added in v0.4.0
type UpdateAudienceParams 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"`
}
UpdateAudienceParams defines parameters for UpdateAudience.
type UpdateAudienceResponse ¶ added in v0.4.0
type UpdateAudienceResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Audience
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseUpdateAudienceResponse ¶ added in v0.4.0
func ParseUpdateAudienceResponse(rsp *http.Response) (*UpdateAudienceResponse, error)
ParseUpdateAudienceResponse parses an HTTP response from a UpdateAudienceWithResponse call
func (UpdateAudienceResponse) ContentType ¶ added in v0.4.0
func (r UpdateAudienceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateAudienceResponse) Status ¶ added in v0.4.0
func (r UpdateAudienceResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateAudienceResponse) StatusCode ¶ added in v0.4.0
func (r UpdateAudienceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateContactJSONRequestBody ¶ added in v0.4.0
type UpdateContactJSONRequestBody = ContactUpdateRequest
UpdateContactJSONRequestBody defines body for UpdateContact for application/json ContentType.
type UpdateContactParams ¶ added in v0.4.0
type UpdateContactParams 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"`
}
UpdateContactParams defines parameters for UpdateContact.
type UpdateContactPropertyJSONRequestBody ¶ added in v0.4.0
type UpdateContactPropertyJSONRequestBody = ContactPropertyUpdateRequest
UpdateContactPropertyJSONRequestBody defines body for UpdateContactProperty for application/json ContentType.
type UpdateContactPropertyParams ¶ added in v0.4.0
type UpdateContactPropertyParams 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"`
}
UpdateContactPropertyParams defines parameters for UpdateContactProperty.
type UpdateContactPropertyResponse ¶ added in v0.4.0
type UpdateContactPropertyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ContactProperty
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseUpdateContactPropertyResponse ¶ added in v0.4.0
func ParseUpdateContactPropertyResponse(rsp *http.Response) (*UpdateContactPropertyResponse, error)
ParseUpdateContactPropertyResponse parses an HTTP response from a UpdateContactPropertyWithResponse call
func (UpdateContactPropertyResponse) ContentType ¶ added in v0.4.0
func (r UpdateContactPropertyResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateContactPropertyResponse) Status ¶ added in v0.4.0
func (r UpdateContactPropertyResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateContactPropertyResponse) StatusCode ¶ added in v0.4.0
func (r UpdateContactPropertyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateContactResponse ¶ added in v0.4.0
type UpdateContactResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Contact
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON409 *Conflict
JSON422 *Unprocessable
JSON429 *RateLimited
JSON500 *InternalError
}
func ParseUpdateContactResponse ¶ added in v0.4.0
func ParseUpdateContactResponse(rsp *http.Response) (*UpdateContactResponse, error)
ParseUpdateContactResponse parses an HTTP response from a UpdateContactWithResponse call
func (UpdateContactResponse) ContentType ¶ added in v0.4.0
func (r UpdateContactResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateContactResponse) Status ¶ added in v0.4.0
func (r UpdateContactResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateContactResponse) StatusCode ¶ added in v0.4.0
func (r UpdateContactResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Verification ¶ added in v0.3.0
type Verification struct {
// Channels The ordered channels this verification uses to deliver the passcode. An email recipient is verified over email; a phone recipient is verified over SMS.
Channels *[]VerificationChannelEntry `json:"channels,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
// ExpiresAt When the verification expires if no correct passcode is submitted.
ExpiresAt *time.Time `json:"expires_at,omitempty"`
Id VerificationID `json:"id"`
// LastChannel The channel the most recent passcode was sent on, or null before the first send. Open enum — new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.
LastChannel *string `json:"last_channel,omitempty"`
// Metadata The key/value pairs attached when the verification was created.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Reason Why the verification reached its final state, or null while pending or once verified. Open enum — treat any unrecognized value as a future reason.
Reason *string `json:"reason,omitempty"`
// Status The verification's current state: pending (awaiting a valid passcode), verified, failed (too many incorrect attempts), or expired (the time window elapsed before a correct passcode).
Status *VerificationStatus `json:"status,omitempty"`
// To The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
To VerificationTo `json:"to"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// VerifiedAt When the verification was completed, or null if it is not yet verified.
VerifiedAt *time.Time `json:"verified_at,omitempty"`
}
Verification defines model for Verification.
type VerificationChannel ¶ added in v0.3.0
type VerificationChannel = string
VerificationChannel The channel a passcode is delivered over. Open enum — new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.
type VerificationChannelEntry ¶ added in v0.3.0
type VerificationChannelEntry struct {
// Channel The channel a passcode is delivered over. Open enum — new channels may be added over time, so treat any unrecognized value as a future channel rather than an error.
Channel VerificationChannel `json:"channel"`
}
VerificationChannelEntry defines model for VerificationChannelEntry.
type VerificationCheckRequest ¶ added in v0.3.0
type VerificationCheckRequest struct {
// Code The passcode the recipient received.
Code string `json:"code"`
// To The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
To VerificationTo `json:"to"`
}
VerificationCheckRequest defines model for VerificationCheckRequest.
type VerificationCheckResult ¶ added in v0.3.0
type VerificationCheckResult struct {
// AttemptsRemaining The number of check attempts left, or null once the verification is complete.
AttemptsRemaining *int `json:"attempts_remaining,omitempty"`
// Reason Why the check did not succeed, or null when success is true. incorrect_code means the passcode was wrong and attempts remain; expired means the time window elapsed; attempts_exhausted means too many incorrect attempts. Open enum — treat any unrecognized value as a future reason.
Reason *string `json:"reason,omitempty"`
// Success Whether the submitted passcode verified this verification. true means the passcode was correct and the verification is now complete; false means it was not verified — see reason. A verification that has already reached a final state is no longer checkable and returns 404.
Success *bool `json:"success,omitempty"`
Verification Verification `json:"verification"`
}
VerificationCheckResult defines model for VerificationCheckResult.
type VerificationCreateRequest ¶ added in v0.3.0
type VerificationCreateRequest struct {
// Metadata Optional key/value pairs to attach to the verification, for example a correlation id. Returned on the verification.
Metadata *map[string]interface{} `json:"metadata,omitempty"`
// Options Per-request overrides applied to this verification only.
Options *VerificationOptions `json:"options,omitempty"`
// To The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
To VerificationTo `json:"to"`
}
VerificationCreateRequest defines model for VerificationCreateRequest.
type VerificationID ¶ added in v0.3.0
type VerificationID = string
VerificationID defines model for VerificationID.
type VerificationOptions ¶ added in v0.3.0
type VerificationOptions struct {
// Channels Reorder or narrow the delivery channels for this request. List channel names in the order to try them; a channel you omit is not used for this request, and a channel not already enabled for the recipient is ignored. Omit the field to use the configured order.
Channels *[]VerificationChannel `json:"channels,omitempty"`
// CodeLength Passcode length for this verification, overriding the configured length.
CodeLength *int `json:"code_length,omitempty"`
}
VerificationOptions Per-request overrides applied to this verification only.
type VerificationStatus ¶ added in v0.3.0
type VerificationStatus string
VerificationStatus The verification's current state: pending (awaiting a valid passcode), verified, failed (too many incorrect attempts), or expired (the time window elapsed before a correct passcode).
const ( VerificationStatusBlocked VerificationStatus = "blocked" VerificationStatusCanceled VerificationStatus = "canceled" VerificationStatusExpired VerificationStatus = "expired" VerificationStatusFailed VerificationStatus = "failed" VerificationStatusPending VerificationStatus = "pending" VerificationStatusVerified VerificationStatus = "verified" )
Defines values for VerificationStatus.
func (VerificationStatus) Valid ¶ added in v0.3.0
func (e VerificationStatus) Valid() bool
Valid indicates whether the value is a known member of the VerificationStatus enum.
type VerificationTo ¶ added in v0.3.0
type VerificationTo struct {
// EmailAddress The recipient's email address.
EmailAddress *openapi_types.Email `json:"email_address,omitempty"`
// PhoneNumber The recipient's phone number in E.164 format.
PhoneNumber *string `json:"phone_number,omitempty"`
}
VerificationTo The recipient to verify. Provide an email_address, a phone_number, or both; at least one is required.
type WebhookAttempt ¶
type WebhookAttempt struct {
// AttemptedAt When the delivery attempt was made.
AttemptedAt *time.Time `json:"attempted_at,omitempty"`
// EventId Bird's source event ID, stable across retries of the same event. Null only for older attempts recorded before event IDs were available.
EventId *WebhookEventID `json:"event_id,omitempty"`
// EventType Webhook event type. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
EventType WebhookEventType `json:"event_type"`
// Id Unique identifier for this delivery attempt.
Id *string `json:"id,omitempty"`
// ResponseBody Body returned by your endpoint, truncated when oversized. Empty string when no body was returned.
ResponseBody *string `json:"response_body,omitempty"`
// ResponseDurationMs Round-trip duration in milliseconds.
ResponseDurationMs int `json:"response_duration_ms"`
// ResponseStatusCode HTTP status returned by the receiver. Null when no response was received (timeout, connection error, DNS failure).
ResponseStatusCode *int `json:"response_status_code"`
// Status Current state of the delivery attempt. `pending` covers in-flight and sending attempts; `failed` is reserved for terminal failures.
Status WebhookAttemptStatus `json:"status"`
// Url The endpoint URL the attempt targeted.
Url string `json:"url"`
}
WebhookAttempt defines model for WebhookAttempt.
type WebhookAttemptList ¶
type WebhookAttemptList struct {
Data []WebhookAttempt `json:"data"`
}
WebhookAttemptList defines model for WebhookAttemptList.
type WebhookAttemptStatus ¶
type WebhookAttemptStatus string
WebhookAttemptStatus Current state of the delivery attempt. `pending` covers in-flight and sending attempts; `failed` is reserved for terminal failures.
const ( WebhookAttemptStatusDelivered WebhookAttemptStatus = "delivered" WebhookAttemptStatusFailed WebhookAttemptStatus = "failed" WebhookAttemptStatusPending WebhookAttemptStatus = "pending" )
Defines values for WebhookAttemptStatus.
func (WebhookAttemptStatus) Valid ¶
func (e WebhookAttemptStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookAttemptStatus enum.
type WebhookEndpoint ¶
type WebhookEndpoint struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
Description *string `json:"description,omitempty"`
// Events Concrete event types this endpoint is subscribed to.
Events []WebhookEventType `json:"events"`
Id WebhookEndpointID `json:"id"`
Status *WebhookEndpointStatus `json:"status,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Url string `json:"url"`
}
WebhookEndpoint defines model for WebhookEndpoint.
type WebhookEndpointCreate ¶
type WebhookEndpointCreate struct {
// Description Human-readable label for this endpoint.
Description *string `json:"description,omitempty"`
// Events Concrete event types to subscribe to.
Events []WebhookEventType `json:"events"`
// Url HTTPS URL to deliver events to.
Url string `json:"url"`
}
WebhookEndpointCreate defines model for WebhookEndpointCreate.
type WebhookEndpointCreated ¶
type WebhookEndpointCreated struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
Description *string `json:"description,omitempty"`
// Events Concrete event types this endpoint is subscribed to.
Events []WebhookEventType `json:"events"`
Id WebhookEndpointID `json:"id"`
// Secret Signing secret (whsec_ prefix). Present in this response only — store it immediately, it cannot be retrieved again.
Secret string `json:"secret" pii:"true"`
Status *WebhookEndpointCreatedStatus `json:"status,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Url string `json:"url"`
}
WebhookEndpointCreated defines model for WebhookEndpointCreated.
type WebhookEndpointCreatedStatus ¶
type WebhookEndpointCreatedStatus string
WebhookEndpointCreatedStatus defines model for WebhookEndpointCreated.Status.
const ( WebhookEndpointCreatedStatusActive WebhookEndpointCreatedStatus = "active" WebhookEndpointCreatedStatusDegraded WebhookEndpointCreatedStatus = "degraded" WebhookEndpointCreatedStatusPaused WebhookEndpointCreatedStatus = "paused" )
Defines values for WebhookEndpointCreatedStatus.
func (WebhookEndpointCreatedStatus) Valid ¶
func (e WebhookEndpointCreatedStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEndpointCreatedStatus enum.
type WebhookEndpointID ¶
type WebhookEndpointID = string
WebhookEndpointID defines model for WebhookEndpointID.
type WebhookEndpointList ¶
type WebhookEndpointList struct {
Data []WebhookEndpoint `json:"data"`
// NextCursor Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.
NextCursor *string `json:"next_cursor"`
// PrevCursor Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.
PrevCursor *string `json:"prev_cursor"`
// RefreshCursor Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.
RefreshCursor *string `json:"refresh_cursor"`
// Total Total number of items matching the request's filters across all pages. Present only when `include_total=true` was passed; otherwise null.
Total *int64 `json:"total,omitempty"`
}
WebhookEndpointList defines model for WebhookEndpointList.
type WebhookEndpointStatus ¶
type WebhookEndpointStatus string
WebhookEndpointStatus defines model for WebhookEndpoint.Status.
const ( WebhookEndpointStatusActive WebhookEndpointStatus = "active" WebhookEndpointStatusDegraded WebhookEndpointStatus = "degraded" WebhookEndpointStatusPaused WebhookEndpointStatus = "paused" )
Defines values for WebhookEndpointStatus.
func (WebhookEndpointStatus) Valid ¶
func (e WebhookEndpointStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEndpointStatus enum.
type WebhookEndpointUpdate ¶
type WebhookEndpointUpdate struct {
// Description Human-readable label for this endpoint.
Description *string `json:"description,omitempty"`
// Events Replacement set of event type subscriptions.
Events *[]WebhookEventType `json:"events,omitempty"`
// Status Set to "active" to re-enable a paused endpoint, or "paused" to stop delivery.
Status *WebhookEndpointUpdateStatus `json:"status,omitempty"`
// Url New HTTPS URL to deliver events to.
Url *string `json:"url,omitempty"`
}
WebhookEndpointUpdate defines model for WebhookEndpointUpdate.
type WebhookEndpointUpdateStatus ¶
type WebhookEndpointUpdateStatus string
WebhookEndpointUpdateStatus Set to "active" to re-enable a paused endpoint, or "paused" to stop delivery.
const ( Active WebhookEndpointUpdateStatus = "active" Paused WebhookEndpointUpdateStatus = "paused" )
Defines values for WebhookEndpointUpdateStatus.
func (WebhookEndpointUpdateStatus) Valid ¶
func (e WebhookEndpointUpdateStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookEndpointUpdateStatus enum.
type WebhookEvent ¶
type WebhookEvent struct {
// contains filtered or unexported fields
}
WebhookEvent Discriminated union of every webhook event the Bird platform emits. Each variant is the full delivery body: `type` names the event, `timestamp` is when the event occurred, and `data` carries the event-specific payload. The `type` property selects the variant — SDKs that consume this schema (openapi-typescript, oapi-codegen) generate a narrowed union keyed on `type`, so customer code can switch on the event id and access the variant-specific payload fields without casting. Delivery metadata (the event id and per-attempt signature headers) rides in HTTP headers per Standard Webhooks and is handled by the SDK's webhook verification helper, which returns one of these variants.
func (WebhookEvent) AsEventDomainFailed ¶
func (t WebhookEvent) AsEventDomainFailed() (EventDomainFailed, error)
AsEventDomainFailed returns the union data inside the WebhookEvent as a EventDomainFailed
func (WebhookEvent) AsEventDomainVerified ¶
func (t WebhookEvent) AsEventDomainVerified() (EventDomainVerified, error)
AsEventDomainVerified returns the union data inside the WebhookEvent as a EventDomainVerified
func (WebhookEvent) AsEventEmailAccepted ¶
func (t WebhookEvent) AsEventEmailAccepted() (EventEmailAccepted, error)
AsEventEmailAccepted returns the union data inside the WebhookEvent as a EventEmailAccepted
func (WebhookEvent) AsEventEmailBounced ¶
func (t WebhookEvent) AsEventEmailBounced() (EventEmailBounced, error)
AsEventEmailBounced returns the union data inside the WebhookEvent as a EventEmailBounced
func (WebhookEvent) AsEventEmailCanceled ¶ added in v0.2.2
func (t WebhookEvent) AsEventEmailCanceled() (EventEmailCanceled, error)
AsEventEmailCanceled returns the union data inside the WebhookEvent as a EventEmailCanceled
func (WebhookEvent) AsEventEmailClicked ¶
func (t WebhookEvent) AsEventEmailClicked() (EventEmailClicked, error)
AsEventEmailClicked returns the union data inside the WebhookEvent as a EventEmailClicked
func (WebhookEvent) AsEventEmailComplained ¶
func (t WebhookEvent) AsEventEmailComplained() (EventEmailComplained, error)
AsEventEmailComplained returns the union data inside the WebhookEvent as a EventEmailComplained
func (WebhookEvent) AsEventEmailDeferred ¶
func (t WebhookEvent) AsEventEmailDeferred() (EventEmailDeferred, error)
AsEventEmailDeferred returns the union data inside the WebhookEvent as a EventEmailDeferred
func (WebhookEvent) AsEventEmailDelivered ¶
func (t WebhookEvent) AsEventEmailDelivered() (EventEmailDelivered, error)
AsEventEmailDelivered returns the union data inside the WebhookEvent as a EventEmailDelivered
func (WebhookEvent) AsEventEmailListUnsubscribed ¶
func (t WebhookEvent) AsEventEmailListUnsubscribed() (EventEmailListUnsubscribed, error)
AsEventEmailListUnsubscribed returns the union data inside the WebhookEvent as a EventEmailListUnsubscribed
func (WebhookEvent) AsEventEmailMailboxMessageDelivered ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxMessageDelivered() (EventEmailMailboxMessageDelivered, error)
AsEventEmailMailboxMessageDelivered returns the union data inside the WebhookEvent as a EventEmailMailboxMessageDelivered
func (WebhookEvent) AsEventEmailMailboxMessageFailed ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxMessageFailed() (EventEmailMailboxMessageFailed, error)
AsEventEmailMailboxMessageFailed returns the union data inside the WebhookEvent as a EventEmailMailboxMessageFailed
func (WebhookEvent) AsEventEmailMailboxMessageReceived ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxMessageReceived() (EventEmailMailboxMessageReceived, error)
AsEventEmailMailboxMessageReceived returns the union data inside the WebhookEvent as a EventEmailMailboxMessageReceived
func (WebhookEvent) AsEventEmailMailboxMessageReceivedBlocked ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxMessageReceivedBlocked() (EventEmailMailboxMessageReceivedBlocked, error)
AsEventEmailMailboxMessageReceivedBlocked returns the union data inside the WebhookEvent as a EventEmailMailboxMessageReceivedBlocked
func (WebhookEvent) AsEventEmailMailboxMessageReceivedUnauthenticated ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxMessageReceivedUnauthenticated() (EventEmailMailboxMessageReceivedUnauthenticated, error)
AsEventEmailMailboxMessageReceivedUnauthenticated returns the union data inside the WebhookEvent as a EventEmailMailboxMessageReceivedUnauthenticated
func (WebhookEvent) AsEventEmailMailboxMessageSent ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxMessageSent() (EventEmailMailboxMessageSent, error)
AsEventEmailMailboxMessageSent returns the union data inside the WebhookEvent as a EventEmailMailboxMessageSent
func (WebhookEvent) AsEventEmailMailboxSuspended ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxSuspended() (EventEmailMailboxSuspended, error)
AsEventEmailMailboxSuspended returns the union data inside the WebhookEvent as a EventEmailMailboxSuspended
func (WebhookEvent) AsEventEmailMailboxThreadCreated ¶ added in v0.4.1
func (t WebhookEvent) AsEventEmailMailboxThreadCreated() (EventEmailMailboxThreadCreated, error)
AsEventEmailMailboxThreadCreated returns the union data inside the WebhookEvent as a EventEmailMailboxThreadCreated
func (WebhookEvent) AsEventEmailOpened ¶
func (t WebhookEvent) AsEventEmailOpened() (EventEmailOpened, error)
AsEventEmailOpened returns the union data inside the WebhookEvent as a EventEmailOpened
func (WebhookEvent) AsEventEmailOutOfBandBounce ¶
func (t WebhookEvent) AsEventEmailOutOfBandBounce() (EventEmailOutOfBandBounce, error)
AsEventEmailOutOfBandBounce returns the union data inside the WebhookEvent as a EventEmailOutOfBandBounce
func (WebhookEvent) AsEventEmailProcessed ¶
func (t WebhookEvent) AsEventEmailProcessed() (EventEmailProcessed, error)
AsEventEmailProcessed returns the union data inside the WebhookEvent as a EventEmailProcessed
func (WebhookEvent) AsEventEmailReceived ¶
func (t WebhookEvent) AsEventEmailReceived() (EventEmailReceived, error)
AsEventEmailReceived returns the union data inside the WebhookEvent as a EventEmailReceived
func (WebhookEvent) AsEventEmailRejected ¶
func (t WebhookEvent) AsEventEmailRejected() (EventEmailRejected, error)
AsEventEmailRejected returns the union data inside the WebhookEvent as a EventEmailRejected
func (WebhookEvent) AsEventEmailScheduled ¶ added in v0.2.2
func (t WebhookEvent) AsEventEmailScheduled() (EventEmailScheduled, error)
AsEventEmailScheduled returns the union data inside the WebhookEvent as a EventEmailScheduled
func (WebhookEvent) AsEventEmailSuppressionCreated ¶
func (t WebhookEvent) AsEventEmailSuppressionCreated() (EventEmailSuppressionCreated, error)
AsEventEmailSuppressionCreated returns the union data inside the WebhookEvent as a EventEmailSuppressionCreated
func (WebhookEvent) AsEventEmailUnsubscribed ¶
func (t WebhookEvent) AsEventEmailUnsubscribed() (EventEmailUnsubscribed, error)
AsEventEmailUnsubscribed returns the union data inside the WebhookEvent as a EventEmailUnsubscribed
func (WebhookEvent) AsEventSMSAccepted ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSAccepted() (EventSMSAccepted, error)
AsEventSMSAccepted returns the union data inside the WebhookEvent as a EventSMSAccepted
func (WebhookEvent) AsEventSMSDelivered ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSDelivered() (EventSMSDelivered, error)
AsEventSMSDelivered returns the union data inside the WebhookEvent as a EventSMSDelivered
func (WebhookEvent) AsEventSMSExpired ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSExpired() (EventSMSExpired, error)
AsEventSMSExpired returns the union data inside the WebhookEvent as a EventSMSExpired
func (WebhookEvent) AsEventSMSFailed ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSFailed() (EventSMSFailed, error)
AsEventSMSFailed returns the union data inside the WebhookEvent as a EventSMSFailed
func (WebhookEvent) AsEventSMSRejected ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSRejected() (EventSMSRejected, error)
AsEventSMSRejected returns the union data inside the WebhookEvent as a EventSMSRejected
func (WebhookEvent) AsEventSMSSent ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSSent() (EventSMSSent, error)
AsEventSMSSent returns the union data inside the WebhookEvent as a EventSMSSent
func (WebhookEvent) AsEventSMSUndelivered ¶ added in v0.2.0
func (t WebhookEvent) AsEventSMSUndelivered() (EventSMSUndelivered, error)
AsEventSMSUndelivered returns the union data inside the WebhookEvent as a EventSMSUndelivered
func (WebhookEvent) Discriminator ¶
func (t WebhookEvent) Discriminator() (string, error)
func (*WebhookEvent) FromEventDomainFailed ¶
func (t *WebhookEvent) FromEventDomainFailed(v EventDomainFailed) error
FromEventDomainFailed overwrites any union data inside the WebhookEvent as the provided EventDomainFailed
func (*WebhookEvent) FromEventDomainVerified ¶
func (t *WebhookEvent) FromEventDomainVerified(v EventDomainVerified) error
FromEventDomainVerified overwrites any union data inside the WebhookEvent as the provided EventDomainVerified
func (*WebhookEvent) FromEventEmailAccepted ¶
func (t *WebhookEvent) FromEventEmailAccepted(v EventEmailAccepted) error
FromEventEmailAccepted overwrites any union data inside the WebhookEvent as the provided EventEmailAccepted
func (*WebhookEvent) FromEventEmailBounced ¶
func (t *WebhookEvent) FromEventEmailBounced(v EventEmailBounced) error
FromEventEmailBounced overwrites any union data inside the WebhookEvent as the provided EventEmailBounced
func (*WebhookEvent) FromEventEmailCanceled ¶ added in v0.2.2
func (t *WebhookEvent) FromEventEmailCanceled(v EventEmailCanceled) error
FromEventEmailCanceled overwrites any union data inside the WebhookEvent as the provided EventEmailCanceled
func (*WebhookEvent) FromEventEmailClicked ¶
func (t *WebhookEvent) FromEventEmailClicked(v EventEmailClicked) error
FromEventEmailClicked overwrites any union data inside the WebhookEvent as the provided EventEmailClicked
func (*WebhookEvent) FromEventEmailComplained ¶
func (t *WebhookEvent) FromEventEmailComplained(v EventEmailComplained) error
FromEventEmailComplained overwrites any union data inside the WebhookEvent as the provided EventEmailComplained
func (*WebhookEvent) FromEventEmailDeferred ¶
func (t *WebhookEvent) FromEventEmailDeferred(v EventEmailDeferred) error
FromEventEmailDeferred overwrites any union data inside the WebhookEvent as the provided EventEmailDeferred
func (*WebhookEvent) FromEventEmailDelivered ¶
func (t *WebhookEvent) FromEventEmailDelivered(v EventEmailDelivered) error
FromEventEmailDelivered overwrites any union data inside the WebhookEvent as the provided EventEmailDelivered
func (*WebhookEvent) FromEventEmailListUnsubscribed ¶
func (t *WebhookEvent) FromEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
FromEventEmailListUnsubscribed overwrites any union data inside the WebhookEvent as the provided EventEmailListUnsubscribed
func (*WebhookEvent) FromEventEmailMailboxMessageDelivered ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxMessageDelivered(v EventEmailMailboxMessageDelivered) error
FromEventEmailMailboxMessageDelivered overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxMessageDelivered
func (*WebhookEvent) FromEventEmailMailboxMessageFailed ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxMessageFailed(v EventEmailMailboxMessageFailed) error
FromEventEmailMailboxMessageFailed overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxMessageFailed
func (*WebhookEvent) FromEventEmailMailboxMessageReceived ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxMessageReceived(v EventEmailMailboxMessageReceived) error
FromEventEmailMailboxMessageReceived overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxMessageReceived
func (*WebhookEvent) FromEventEmailMailboxMessageReceivedBlocked ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxMessageReceivedBlocked(v EventEmailMailboxMessageReceivedBlocked) error
FromEventEmailMailboxMessageReceivedBlocked overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxMessageReceivedBlocked
func (*WebhookEvent) FromEventEmailMailboxMessageReceivedUnauthenticated ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxMessageReceivedUnauthenticated(v EventEmailMailboxMessageReceivedUnauthenticated) error
FromEventEmailMailboxMessageReceivedUnauthenticated overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxMessageReceivedUnauthenticated
func (*WebhookEvent) FromEventEmailMailboxMessageSent ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxMessageSent(v EventEmailMailboxMessageSent) error
FromEventEmailMailboxMessageSent overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxMessageSent
func (*WebhookEvent) FromEventEmailMailboxSuspended ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxSuspended(v EventEmailMailboxSuspended) error
FromEventEmailMailboxSuspended overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxSuspended
func (*WebhookEvent) FromEventEmailMailboxThreadCreated ¶ added in v0.4.1
func (t *WebhookEvent) FromEventEmailMailboxThreadCreated(v EventEmailMailboxThreadCreated) error
FromEventEmailMailboxThreadCreated overwrites any union data inside the WebhookEvent as the provided EventEmailMailboxThreadCreated
func (*WebhookEvent) FromEventEmailOpened ¶
func (t *WebhookEvent) FromEventEmailOpened(v EventEmailOpened) error
FromEventEmailOpened overwrites any union data inside the WebhookEvent as the provided EventEmailOpened
func (*WebhookEvent) FromEventEmailOutOfBandBounce ¶
func (t *WebhookEvent) FromEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
FromEventEmailOutOfBandBounce overwrites any union data inside the WebhookEvent as the provided EventEmailOutOfBandBounce
func (*WebhookEvent) FromEventEmailProcessed ¶
func (t *WebhookEvent) FromEventEmailProcessed(v EventEmailProcessed) error
FromEventEmailProcessed overwrites any union data inside the WebhookEvent as the provided EventEmailProcessed
func (*WebhookEvent) FromEventEmailReceived ¶
func (t *WebhookEvent) FromEventEmailReceived(v EventEmailReceived) error
FromEventEmailReceived overwrites any union data inside the WebhookEvent as the provided EventEmailReceived
func (*WebhookEvent) FromEventEmailRejected ¶
func (t *WebhookEvent) FromEventEmailRejected(v EventEmailRejected) error
FromEventEmailRejected overwrites any union data inside the WebhookEvent as the provided EventEmailRejected
func (*WebhookEvent) FromEventEmailScheduled ¶ added in v0.2.2
func (t *WebhookEvent) FromEventEmailScheduled(v EventEmailScheduled) error
FromEventEmailScheduled overwrites any union data inside the WebhookEvent as the provided EventEmailScheduled
func (*WebhookEvent) FromEventEmailSuppressionCreated ¶
func (t *WebhookEvent) FromEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
FromEventEmailSuppressionCreated overwrites any union data inside the WebhookEvent as the provided EventEmailSuppressionCreated
func (*WebhookEvent) FromEventEmailUnsubscribed ¶
func (t *WebhookEvent) FromEventEmailUnsubscribed(v EventEmailUnsubscribed) error
FromEventEmailUnsubscribed overwrites any union data inside the WebhookEvent as the provided EventEmailUnsubscribed
func (*WebhookEvent) FromEventSMSAccepted ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSAccepted(v EventSMSAccepted) error
FromEventSMSAccepted overwrites any union data inside the WebhookEvent as the provided EventSMSAccepted
func (*WebhookEvent) FromEventSMSDelivered ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSDelivered(v EventSMSDelivered) error
FromEventSMSDelivered overwrites any union data inside the WebhookEvent as the provided EventSMSDelivered
func (*WebhookEvent) FromEventSMSExpired ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSExpired(v EventSMSExpired) error
FromEventSMSExpired overwrites any union data inside the WebhookEvent as the provided EventSMSExpired
func (*WebhookEvent) FromEventSMSFailed ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSFailed(v EventSMSFailed) error
FromEventSMSFailed overwrites any union data inside the WebhookEvent as the provided EventSMSFailed
func (*WebhookEvent) FromEventSMSRejected ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSRejected(v EventSMSRejected) error
FromEventSMSRejected overwrites any union data inside the WebhookEvent as the provided EventSMSRejected
func (*WebhookEvent) FromEventSMSSent ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSSent(v EventSMSSent) error
FromEventSMSSent overwrites any union data inside the WebhookEvent as the provided EventSMSSent
func (*WebhookEvent) FromEventSMSUndelivered ¶ added in v0.2.0
func (t *WebhookEvent) FromEventSMSUndelivered(v EventSMSUndelivered) error
FromEventSMSUndelivered overwrites any union data inside the WebhookEvent as the provided EventSMSUndelivered
func (WebhookEvent) MarshalJSON ¶
func (t WebhookEvent) MarshalJSON() ([]byte, error)
func (*WebhookEvent) MergeEventDomainFailed ¶
func (t *WebhookEvent) MergeEventDomainFailed(v EventDomainFailed) error
MergeEventDomainFailed performs a merge with any union data inside the WebhookEvent, using the provided EventDomainFailed
func (*WebhookEvent) MergeEventDomainVerified ¶
func (t *WebhookEvent) MergeEventDomainVerified(v EventDomainVerified) error
MergeEventDomainVerified performs a merge with any union data inside the WebhookEvent, using the provided EventDomainVerified
func (*WebhookEvent) MergeEventEmailAccepted ¶
func (t *WebhookEvent) MergeEventEmailAccepted(v EventEmailAccepted) error
MergeEventEmailAccepted performs a merge with any union data inside the WebhookEvent, using the provided EventEmailAccepted
func (*WebhookEvent) MergeEventEmailBounced ¶
func (t *WebhookEvent) MergeEventEmailBounced(v EventEmailBounced) error
MergeEventEmailBounced performs a merge with any union data inside the WebhookEvent, using the provided EventEmailBounced
func (*WebhookEvent) MergeEventEmailCanceled ¶ added in v0.2.2
func (t *WebhookEvent) MergeEventEmailCanceled(v EventEmailCanceled) error
MergeEventEmailCanceled performs a merge with any union data inside the WebhookEvent, using the provided EventEmailCanceled
func (*WebhookEvent) MergeEventEmailClicked ¶
func (t *WebhookEvent) MergeEventEmailClicked(v EventEmailClicked) error
MergeEventEmailClicked performs a merge with any union data inside the WebhookEvent, using the provided EventEmailClicked
func (*WebhookEvent) MergeEventEmailComplained ¶
func (t *WebhookEvent) MergeEventEmailComplained(v EventEmailComplained) error
MergeEventEmailComplained performs a merge with any union data inside the WebhookEvent, using the provided EventEmailComplained
func (*WebhookEvent) MergeEventEmailDeferred ¶
func (t *WebhookEvent) MergeEventEmailDeferred(v EventEmailDeferred) error
MergeEventEmailDeferred performs a merge with any union data inside the WebhookEvent, using the provided EventEmailDeferred
func (*WebhookEvent) MergeEventEmailDelivered ¶
func (t *WebhookEvent) MergeEventEmailDelivered(v EventEmailDelivered) error
MergeEventEmailDelivered performs a merge with any union data inside the WebhookEvent, using the provided EventEmailDelivered
func (*WebhookEvent) MergeEventEmailListUnsubscribed ¶
func (t *WebhookEvent) MergeEventEmailListUnsubscribed(v EventEmailListUnsubscribed) error
MergeEventEmailListUnsubscribed performs a merge with any union data inside the WebhookEvent, using the provided EventEmailListUnsubscribed
func (*WebhookEvent) MergeEventEmailMailboxMessageDelivered ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxMessageDelivered(v EventEmailMailboxMessageDelivered) error
MergeEventEmailMailboxMessageDelivered performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxMessageDelivered
func (*WebhookEvent) MergeEventEmailMailboxMessageFailed ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxMessageFailed(v EventEmailMailboxMessageFailed) error
MergeEventEmailMailboxMessageFailed performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxMessageFailed
func (*WebhookEvent) MergeEventEmailMailboxMessageReceived ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxMessageReceived(v EventEmailMailboxMessageReceived) error
MergeEventEmailMailboxMessageReceived performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxMessageReceived
func (*WebhookEvent) MergeEventEmailMailboxMessageReceivedBlocked ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxMessageReceivedBlocked(v EventEmailMailboxMessageReceivedBlocked) error
MergeEventEmailMailboxMessageReceivedBlocked performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxMessageReceivedBlocked
func (*WebhookEvent) MergeEventEmailMailboxMessageReceivedUnauthenticated ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxMessageReceivedUnauthenticated(v EventEmailMailboxMessageReceivedUnauthenticated) error
MergeEventEmailMailboxMessageReceivedUnauthenticated performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxMessageReceivedUnauthenticated
func (*WebhookEvent) MergeEventEmailMailboxMessageSent ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxMessageSent(v EventEmailMailboxMessageSent) error
MergeEventEmailMailboxMessageSent performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxMessageSent
func (*WebhookEvent) MergeEventEmailMailboxSuspended ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxSuspended(v EventEmailMailboxSuspended) error
MergeEventEmailMailboxSuspended performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxSuspended
func (*WebhookEvent) MergeEventEmailMailboxThreadCreated ¶ added in v0.4.1
func (t *WebhookEvent) MergeEventEmailMailboxThreadCreated(v EventEmailMailboxThreadCreated) error
MergeEventEmailMailboxThreadCreated performs a merge with any union data inside the WebhookEvent, using the provided EventEmailMailboxThreadCreated
func (*WebhookEvent) MergeEventEmailOpened ¶
func (t *WebhookEvent) MergeEventEmailOpened(v EventEmailOpened) error
MergeEventEmailOpened performs a merge with any union data inside the WebhookEvent, using the provided EventEmailOpened
func (*WebhookEvent) MergeEventEmailOutOfBandBounce ¶
func (t *WebhookEvent) MergeEventEmailOutOfBandBounce(v EventEmailOutOfBandBounce) error
MergeEventEmailOutOfBandBounce performs a merge with any union data inside the WebhookEvent, using the provided EventEmailOutOfBandBounce
func (*WebhookEvent) MergeEventEmailProcessed ¶
func (t *WebhookEvent) MergeEventEmailProcessed(v EventEmailProcessed) error
MergeEventEmailProcessed performs a merge with any union data inside the WebhookEvent, using the provided EventEmailProcessed
func (*WebhookEvent) MergeEventEmailReceived ¶
func (t *WebhookEvent) MergeEventEmailReceived(v EventEmailReceived) error
MergeEventEmailReceived performs a merge with any union data inside the WebhookEvent, using the provided EventEmailReceived
func (*WebhookEvent) MergeEventEmailRejected ¶
func (t *WebhookEvent) MergeEventEmailRejected(v EventEmailRejected) error
MergeEventEmailRejected performs a merge with any union data inside the WebhookEvent, using the provided EventEmailRejected
func (*WebhookEvent) MergeEventEmailScheduled ¶ added in v0.2.2
func (t *WebhookEvent) MergeEventEmailScheduled(v EventEmailScheduled) error
MergeEventEmailScheduled performs a merge with any union data inside the WebhookEvent, using the provided EventEmailScheduled
func (*WebhookEvent) MergeEventEmailSuppressionCreated ¶
func (t *WebhookEvent) MergeEventEmailSuppressionCreated(v EventEmailSuppressionCreated) error
MergeEventEmailSuppressionCreated performs a merge with any union data inside the WebhookEvent, using the provided EventEmailSuppressionCreated
func (*WebhookEvent) MergeEventEmailUnsubscribed ¶
func (t *WebhookEvent) MergeEventEmailUnsubscribed(v EventEmailUnsubscribed) error
MergeEventEmailUnsubscribed performs a merge with any union data inside the WebhookEvent, using the provided EventEmailUnsubscribed
func (*WebhookEvent) MergeEventSMSAccepted ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSAccepted(v EventSMSAccepted) error
MergeEventSMSAccepted performs a merge with any union data inside the WebhookEvent, using the provided EventSMSAccepted
func (*WebhookEvent) MergeEventSMSDelivered ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSDelivered(v EventSMSDelivered) error
MergeEventSMSDelivered performs a merge with any union data inside the WebhookEvent, using the provided EventSMSDelivered
func (*WebhookEvent) MergeEventSMSExpired ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSExpired(v EventSMSExpired) error
MergeEventSMSExpired performs a merge with any union data inside the WebhookEvent, using the provided EventSMSExpired
func (*WebhookEvent) MergeEventSMSFailed ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSFailed(v EventSMSFailed) error
MergeEventSMSFailed performs a merge with any union data inside the WebhookEvent, using the provided EventSMSFailed
func (*WebhookEvent) MergeEventSMSRejected ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSRejected(v EventSMSRejected) error
MergeEventSMSRejected performs a merge with any union data inside the WebhookEvent, using the provided EventSMSRejected
func (*WebhookEvent) MergeEventSMSSent ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSSent(v EventSMSSent) error
MergeEventSMSSent performs a merge with any union data inside the WebhookEvent, using the provided EventSMSSent
func (*WebhookEvent) MergeEventSMSUndelivered ¶ added in v0.2.0
func (t *WebhookEvent) MergeEventSMSUndelivered(v EventSMSUndelivered) error
MergeEventSMSUndelivered performs a merge with any union data inside the WebhookEvent, using the provided EventSMSUndelivered
func (*WebhookEvent) UnmarshalJSON ¶
func (t *WebhookEvent) UnmarshalJSON(b []byte) error
func (WebhookEvent) ValueByDiscriminator ¶
func (t WebhookEvent) ValueByDiscriminator() (interface{}, error)
type WebhookEventID ¶ added in v0.2.0
type WebhookEventID = string
WebhookEventID defines model for WebhookEventID.
type WebhookEventType ¶
type WebhookEventType = string
WebhookEventType Webhook event type. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error. The values below are the types known at this version.
type WebhookReplayRequest ¶
type WebhookReplayRequest struct {
// Since Replay events created at or after this timestamp. Defaults to 24h ago when omitted.
Since *time.Time `json:"since,omitempty"`
// Until Replay events created before or at this timestamp. Omit to bound only by `since`.
Until *time.Time `json:"until,omitempty"`
}
WebhookReplayRequest defines model for WebhookReplayRequest.
type WebhookRotateSecretResponse ¶
type WebhookRotateSecretResponse struct {
// Secret The new signing secret (whsec_ prefix). Store this immediately — it is not shown again.
Secret string `json:"secret" pii:"true"`
}
WebhookRotateSecretResponse defines model for WebhookRotateSecretResponse.
type WebhookTestRequest ¶
type WebhookTestRequest struct {
// EventType Event type to simulate. Defaults to a generic test ping if omitted.
EventType *string `json:"event_type,omitempty"`
}
WebhookTestRequest defines model for WebhookTestRequest.
type WebhookTestResponse ¶
type WebhookTestResponse struct {
// Error A short explanation of why the event could not be delivered. Present only when your endpoint could not be reached.
Error *string `json:"error,omitempty"`
// EventPayload Discriminated union of every webhook event the Bird platform emits.
// Each variant is the full delivery body: `type` names the event, `timestamp` is when the event occurred, and `data` carries the event-specific payload. The `type` property selects the variant — SDKs that consume this schema (openapi-typescript, oapi-codegen) generate a narrowed union keyed on `type`, so customer code can switch on the event id and access the variant-specific payload fields without casting.
// Delivery metadata (the event id and per-attempt signature headers) rides in HTTP headers per Standard Webhooks and is handled by the SDK's webhook verification helper, which returns one of these variants.
EventPayload *WebhookEvent `json:"event_payload,omitempty"`
// ResponseBody Response body returned by your endpoint, truncated when oversized. Empty when no body was returned.
ResponseBody *string `json:"response_body,omitempty"`
// ResponseDurationMs Round-trip delivery latency in milliseconds.
ResponseDurationMs int `json:"response_duration_ms"`
// ResponseStatusCode HTTP status returned by your endpoint. Null when no response was received (timeout, connection error, DNS failure).
ResponseStatusCode *int `json:"response_status_code"`
// Status Whether your endpoint accepted the test event. `delivered` means it returned a 2xx status; `failed` means it returned a non-2xx status or could not be reached.
Status WebhookTestResponseStatus `json:"status"`
}
WebhookTestResponse defines model for WebhookTestResponse.
type WebhookTestResponseStatus ¶
type WebhookTestResponseStatus string
WebhookTestResponseStatus Whether your endpoint accepted the test event. `delivered` means it returned a 2xx status; `failed` means it returned a non-2xx status or could not be reached.
const ( WebhookTestResponseStatusDelivered WebhookTestResponseStatus = "delivered" WebhookTestResponseStatusFailed WebhookTestResponseStatus = "failed" )
Defines values for WebhookTestResponseStatus.
func (WebhookTestResponseStatus) Valid ¶
func (e WebhookTestResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the WebhookTestResponseStatus enum.
type WhatsAppError ¶ added in v0.4.0
type WhatsAppError struct {
// Code Bird-stable failure reason, uniform whether the failure happened internally or was reported by the WhatsApp network. `insufficient_balance` — the workspace could not afford the send. `price_not_found` — no price was configured for this destination/template combination. `internal_error` — an unexpected Bird-side failure. `undeliverable` — the recipient could not be reached (e.g. not on WhatsApp, number invalid). `service_window_expired` — the 24-hour customer care window has closed and a free-form message cannot be sent; send a template instead. `rate_limited` — the send was throttled.
Code WhatsAppErrorCode `json:"code"`
// Description Human-readable explanation of the failure.
Description *string `json:"description,omitempty"`
// OccurredAt When the failure occurred.
OccurredAt *time.Time `json:"occurred_at,omitempty"`
}
WhatsAppError Failure detail for a message that could not be delivered. Null when there is no failure.
type WhatsAppErrorCode ¶ added in v0.4.0
type WhatsAppErrorCode = string
WhatsAppErrorCode Bird-stable failure reason, uniform whether the failure happened internally or was reported by the WhatsApp network. `insufficient_balance` — the workspace could not afford the send. `price_not_found` — no price was configured for this destination/template combination. `internal_error` — an unexpected Bird-side failure. `undeliverable` — the recipient could not be reached (e.g. not on WhatsApp, number invalid). `service_window_expired` — the 24-hour customer care window has closed and a free-form message cannot be sent; send a template instead. `rate_limited` — the send was throttled.
type WhatsAppEvent ¶ added in v0.4.0
type WhatsAppEvent struct {
// Error Failure detail for a message that could not be delivered. Null when there is no failure.
Error *WhatsAppError `json:"error,omitempty"`
Id WhatsAppEventID `json:"id"`
// OccurredAt When this event occurred.
OccurredAt *time.Time `json:"occurred_at,omitempty"`
// Type Lifecycle event type. `whatsapp.accepted` — Bird accepted the request. `whatsapp.sent` — handed to the WhatsApp network. `whatsapp.delivered` — delivery confirmed to the recipient's device. `whatsapp.read` — the recipient opened the message (this does not change the message `status`, which never becomes `read`). `whatsapp.failed` — terminal permanent failure. Open enum — new event types may be added over time, so treat any unrecognized value as a future event rather than an error.
Type *string `json:"type,omitempty"`
}
WhatsAppEvent defines model for WhatsAppEvent.
type WhatsAppEventID ¶ added in v0.4.0
type WhatsAppEventID = string
WhatsAppEventID defines model for WhatsAppEventID.
type WhatsAppEventList ¶ added in v0.4.0
type WhatsAppEventList struct {
// Data Timeline events for this WhatsApp message, in chronological order. The timeline is bounded and returned in full — this list is not paginated.
Data []WhatsAppEvent `json:"data"`
}
WhatsAppEventList defines model for WhatsAppEventList.
type WhatsAppMessage ¶ added in v0.4.0
type WhatsAppMessage struct {
Business *WhatsAppMessageBusiness `json:"business,omitempty"`
Contact *WhatsAppMessageContact `json:"contact,omitempty"`
// CreatedAt When the message was accepted for delivery.
CreatedAt *time.Time `json:"created_at,omitempty"`
// DeliveredAt When delivery was confirmed. Null until then.
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
// Direction Whether the message was sent by the business (`outbound`) or received from the contact (`inbound`).
Direction *WhatsAppMessageDirection `json:"direction,omitempty"`
Id WhatsAppMessageID `json:"id"`
// LastError Failure detail for a message that could not be delivered. Null when there is no failure.
LastError *WhatsAppError `json:"last_error,omitempty"`
// ReadAt When the message was read by the recipient. Null until then.
ReadAt *time.Time `json:"read_at,omitempty"`
// SentAt When the message was handed to the WhatsApp network. Null until then.
SentAt *time.Time `json:"sent_at,omitempty"`
Status *WhatsAppMessageStatus `json:"status,omitempty"`
// Template The template the message was sent from. For authentication templates the filled-in values are not returned.
Template *WhatsAppMessageTemplate `json:"template,omitempty"`
}
WhatsAppMessage defines model for WhatsAppMessage.
type WhatsAppMessageBusiness ¶ added in v0.4.0
type WhatsAppMessageBusiness struct {
// PhoneNumber E.164 phone number of the WhatsApp business account that sent the message.
PhoneNumber *string `json:"phone_number,omitempty"`
// PhoneNumberId The WhatsApp phone number identifier. Present only for account-owned numbers.
PhoneNumberId *string `json:"phone_number_id,omitempty"`
}
WhatsAppMessageBusiness The business identity that sent the message. `phone_number` is always present; `phone_number_id` is included only for account-owned numbers.
type WhatsAppMessageContact ¶ added in v0.4.0
type WhatsAppMessageContact struct {
// Bsuid Business-scoped user ID (Meta's WhatsApp identifier for this contact within the business account), when available.
Bsuid *string `json:"bsuid,omitempty"`
// PhoneNumber Contact's phone number in E.164 format, when known.
PhoneNumber *string `json:"phone_number,omitempty"`
}
WhatsAppMessageContact Contact on the other end of the message. Fields are omitted when not available; at least one is always present.
type WhatsAppMessageDirection ¶ added in v0.4.0
type WhatsAppMessageDirection string
WhatsAppMessageDirection Whether the message was sent by the business (`outbound`) or received from the contact (`inbound`).
const ( WhatsAppMessageDirectionInbound WhatsAppMessageDirection = "inbound" WhatsAppMessageDirectionOutbound WhatsAppMessageDirection = "outbound" )
Defines values for WhatsAppMessageDirection.
func (WhatsAppMessageDirection) Valid ¶ added in v0.4.0
func (e WhatsAppMessageDirection) Valid() bool
Valid indicates whether the value is a known member of the WhatsAppMessageDirection enum.
type WhatsAppMessageID ¶ added in v0.4.0
type WhatsAppMessageID = string
WhatsAppMessageID defines model for WhatsAppMessageID.
type WhatsAppMessageList ¶ added in v0.4.0
type WhatsAppMessageList struct {
// Data Page of WhatsApp message objects.
Data []WhatsAppMessage `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"`
}
WhatsAppMessageList defines model for WhatsAppMessageList.
type WhatsAppMessageStatus ¶ added in v0.4.0
type WhatsAppMessageStatus string
WhatsAppMessageStatus Delivery status. `scheduled` means the message is queued to send at a future time and has not been dispatched yet. `accepted` means Bird accepted the request and it is queued for sending. `sent` means it was handed to the WhatsApp network. `delivered` is confirmed delivery to the recipient's device. `failed` is a terminal permanent failure. `canceled` means a scheduled message was canceled before it was sent. `received` is the status of an inbound message (`direction: inbound`) sent to you by a contact. There is no `read` status — a read receipt is reported as `read_at` and a `whatsapp.read` event, not a status value.
const ( WhatsAppMessageStatusAccepted WhatsAppMessageStatus = "accepted" WhatsAppMessageStatusCanceled WhatsAppMessageStatus = "canceled" WhatsAppMessageStatusDelivered WhatsAppMessageStatus = "delivered" WhatsAppMessageStatusFailed WhatsAppMessageStatus = "failed" WhatsAppMessageStatusReceived WhatsAppMessageStatus = "received" WhatsAppMessageStatusScheduled WhatsAppMessageStatus = "scheduled" WhatsAppMessageStatusSent WhatsAppMessageStatus = "sent" )
Defines values for WhatsAppMessageStatus.
func (WhatsAppMessageStatus) Valid ¶ added in v0.4.0
func (e WhatsAppMessageStatus) Valid() bool
Valid indicates whether the value is a known member of the WhatsAppMessageStatus enum.
type WhatsAppMessageTemplate ¶ added in v0.4.0
type WhatsAppMessageTemplate struct {
// Category Content classification applied to messages sent from this template.
Category *WhatsAppTemplateCategory `json:"category,omitempty"`
// Components The values that filled the template's placeholders. Empty for an authentication template, whose content is never returned.
Components *[]WhatsAppMessageTemplateComponent `json:"components,omitempty"`
// Language The language code of the template variant that was sent (for example `en`).
Language *string `json:"language,omitempty"`
// Name The template's stable handle (for example `bird_otp`).
Name *TemplateName `json:"name,omitempty"`
}
WhatsAppMessageTemplate The template a message was sent from. On reads `name`, `language`, `category`, and `components` are always present — `components` is an empty array for an authentication template (the filled-in values, e.g. a verification code, are never returned).
type WhatsAppMessageTemplateComponent ¶ added in v0.4.0
type WhatsAppMessageTemplateComponent struct {
// Parameters The values that fill this part's placeholders, in order.
Parameters *[]WhatsAppMessageTemplateComponentParameter `json:"parameters,omitempty"`
// Type Which part of the template this fills in.
Type string `json:"type"`
}
WhatsAppMessageTemplateComponent defines model for WhatsAppMessageTemplateComponent.
type WhatsAppMessageTemplateComponentParameter ¶ added in v0.4.0
type WhatsAppMessageTemplateComponentParameter struct {
// Text Parameter value.
Text string `json:"text"`
// Type Parameter type.
Type WhatsAppTemplateParameterType `json:"type"`
}
WhatsAppMessageTemplateComponentParameter defines model for WhatsAppMessageTemplateComponentParameter.
type WhatsAppTemplate ¶ added in v0.4.0
type WhatsAppTemplate struct {
// Category Content classification applied to messages sent from this template.
Category *WhatsAppTemplateCategory `json:"category,omitempty"`
// Components The content blocks that make up the template, in display order.
Components *[]WhatsAppTemplateComponent `json:"components,omitempty"`
// Language The language code of this template variant (for example `en` or `pt_BR`).
Language *string `json:"language,omitempty"`
// Name The template's stable handle. Pass it as the template reference when sending.
Name *TemplateName `json:"name,omitempty"`
// Scope Whether the template is a built-in Bird template (`system`) or one your workspace authored (`workspace`).
Scope *TemplateScope `json:"scope,omitempty"`
// Status The template's review and health status.
Status *WhatsAppTemplateStatus `json:"status,omitempty"`
}
WhatsAppTemplate defines model for WhatsAppTemplate.
type WhatsAppTemplateButton ¶ added in v0.4.0
type WhatsAppTemplateButton struct {
// ExampleParameters Example values for this button's variables, in placeholder order. Present when the button URL has variables.
ExampleParameters *[]WhatsAppTemplateExampleParameter `json:"example_parameters,omitempty"`
// Text The button's label text.
Text *string `json:"text,omitempty"`
// Type The button's behavior type.
Type *string `json:"type,omitempty"`
// Url The URL the button opens, with any variable placeholder shown inline. Present on link buttons.
Url *string `json:"url,omitempty"`
}
WhatsAppTemplateButton defines model for WhatsAppTemplateButton.
type WhatsAppTemplateCategory ¶ added in v0.4.0
type WhatsAppTemplateCategory = string
WhatsAppTemplateCategory WhatsApp template category — Meta's content classification for a template. Open enum — Meta may add new categories over time, so treat any unrecognized value as a future category rather than an error. The values below are the categories known at this version.
type WhatsAppTemplateComponent ¶ added in v0.4.0
type WhatsAppTemplateComponent struct {
// Buttons The buttons attached to this block. Present when the block carries buttons.
Buttons *[]WhatsAppTemplateButton `json:"buttons,omitempty"`
// ExampleParameters Example values for this block's variables, in placeholder order — one per `{{n}}`. Use them to see what a filled message looks like. Present when the block has variables.
ExampleParameters *[]WhatsAppTemplateExampleParameter `json:"example_parameters,omitempty"`
// Text The block's text content, with any variable placeholders shown inline. Present when the block carries text.
Text *string `json:"text,omitempty"`
// Type The content block's type within the template.
Type *string `json:"type,omitempty"`
}
WhatsAppTemplateComponent defines model for WhatsAppTemplateComponent.
type WhatsAppTemplateExampleParameter ¶ added in v0.4.0
type WhatsAppTemplateExampleParameter struct {
// Text An example value for a text parameter. Present when `type` is `text`.
Text *string `json:"text,omitempty"`
// Type The kind of value this parameter accepts.
Type *WhatsAppTemplateParameterType `json:"type,omitempty"`
}
WhatsAppTemplateExampleParameter defines model for WhatsAppTemplateExampleParameter.
type WhatsAppTemplateList ¶ added in v0.4.0
type WhatsAppTemplateList struct {
// Data The templates available to your workspace.
Data []WhatsAppTemplate `json:"data"`
}
WhatsAppTemplateList defines model for WhatsAppTemplateList.
type WhatsAppTemplateParameterType ¶ added in v0.4.0
type WhatsAppTemplateParameterType = string
WhatsAppTemplateParameterType The type of a template parameter.
type WhatsAppTemplateStatus ¶ added in v0.4.0
type WhatsAppTemplateStatus = string
WhatsAppTemplateStatus A message template's review and health status. `approved`, `pending`, and `rejected` are review outcomes; `paused`, `disabled`, `in_appeal`, `pending_deletion`, and `limit_exceeded` reflect a template's ongoing health after approval.
type XWorkspaceId ¶ added in v0.3.0
type XWorkspaceId = string
XWorkspaceId defines model for XWorkspaceId.