openapi

package
v4.0.0-rc.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 7 Imported by: 0

README

Go API client for

The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns.

A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery.

Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the Marketing Campaigns application user interface.

The Single Sends API changed on May 6, 2020. See Single Sends 2020 Update for more information.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/sendgrid-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version:
  • Build date: 2025-02-11T10:49:32.713902Z[Etc/UTC]
  • Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit https://support.sendgrid.com/hc/en-us

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./"

Documentation for API Endpoints

All URIs are relative to https://api.sendgrid.com

Class Method HTTP request Description
CreateSingleSend CreateSingleSend Post /v3/marketing/singlesends Create Single Send
DeleteScheduledSingleSend DeleteScheduledSingleSend Delete /v3/marketing/singlesends/{Id}/schedule Delete Single Send Schedule
DeleteSingleSend DeleteSingleSend Delete /v3/marketing/singlesends/{Id} Delete Single Send by ID
DeleteSingleSends DeleteSingleSends Delete /v3/marketing/singlesends Bulk Delete Single Sends
DuplicateSingleSend DuplicateSingleSend Post /v3/marketing/singlesends/{Id} Duplicate Single Send
GetSingleSend GetSingleSend Get /v3/marketing/singlesends/{Id} Get Single Send by ID
ListCategory ListCategory Get /v3/marketing/singlesends/categories Get All Categories
ListSingleSend ListSingleSend Get /v3/marketing/singlesends Get All Single Sends
ScheduleSingleSend ScheduleSingleSend Put /v3/marketing/singlesends/{Id}/schedule Schedule Single Send
SearchSingleSend SearchSingleSend Post /v3/marketing/singlesends/search Get Single Sends Search
UpdateSingleSend UpdateSingleSend Patch /v3/marketing/singlesends/{Id} Update Single Send

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbTestSummary

type AbTestSummary struct {
	// What differs between the A/B tests
	Type Type `json:"type"`
	// How the winner will be decided
	WinnerCriteria WinnerCriteria `json:"winner_criteria"`
	// What percentage of your recipient will be included in your A/B testing
	TestPercentage int32 `json:"test_percentage"`
	// How long the A/B Testing will last
	Duration string `json:"duration"`
	// Winner of the A/B Test
	WinningTemplateId string `json:"winning_template_id"`
	// When the winner was selected
	WinnerSelectedAt string `json:"winner_selected_at"`
	// Last day to select an A/B Test Winner
	ExpirationDate string `json:"expiration_date"`
}

AbTestSummary struct for AbTestSummary

type ApiService

type ApiService struct {
	// contains filtered or unexported fields
}

func NewApiService

func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService

func NewApiServiceWithClient

func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService

func (*ApiService) CreateSingleSend

func (c *ApiService) CreateSingleSend(params *CreateSingleSendParam) (interface{}, error)

**This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object. This endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI.

func (*ApiService) DeleteScheduledSingleSend

func (c *ApiService) DeleteScheduledSingleSend(params *DeleteScheduledSingleSendParam) (interface{}, error)

**This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`.

func (*ApiService) DeleteSingleSend

func (c *ApiService) DeleteSingleSend(params *DeleteSingleSendParam) (interface{}, error)

**This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion.

func (*ApiService) DeleteSingleSends

func (c *ApiService) DeleteSingleSends(params *DeleteSingleSendsParam) (interface{}, error)

**This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion.

func (*ApiService) DuplicateSingleSend

func (c *ApiService) DuplicateSingleSend(params *DuplicateSingleSendParam) (interface{}, error)

**This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit.

func (*ApiService) GetSingleSend

func (c *ApiService) GetSingleSend(params *GetSingleSendParam) (interface{}, error)

**This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint.

func (*ApiService) ListCategory

func (c *ApiService) ListCategory() (interface{}, error)

**This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories.

func (*ApiService) ListSingleSend

func (c *ApiService) ListSingleSend(params *ListSingleSendParam) (interface{}, error)

**This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint.

func (*ApiService) ScheduleSingleSend

func (c *ApiService) ScheduleSingleSend(params *ScheduleSingleSendParam) (interface{}, error)

**This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.** To send your message immediately, set the `send_at` property value to the string `now`. To schedule the Single Send for future delivery, set the `send_at` value to your desired send time in [ISO 8601 date time format](https://www.iso.org/iso-8601-date-and-time-format.html) (`yyyy-MM-ddTHH:mm:ssZ`).

func (*ApiService) SearchSingleSend

func (c *ApiService) SearchSingleSend(params *SearchSingleSendParam) (interface{}, error)

**This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are \"drafts\" or \"scheduled\" and also associated with the category \"shoes,\" your request body may look like the example below. ```javascript { \"status\": [ \"draft\", \"scheduled\" ], \"categories\": [ \"shoes\" ], } ```

func (*ApiService) UpdateSingleSend

func (c *ApiService) UpdateSingleSend(params *UpdateSingleSendParam) (interface{}, error)

**This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the properties you want to update. Any blank or missing properties will remain unaltered. This endpoint will update a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI.

type CreateSingleSendParam

type CreateSingleSendParam struct {
	//
	SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"`
}

func (*CreateSingleSendParam) SetSinglesendRequest

func (params *CreateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *CreateSingleSendParam

type DeleteScheduledSingleSendParam

type DeleteScheduledSingleSendParam struct {
	//
	Id *string `json:"id"`
}

func (*DeleteScheduledSingleSendParam) SetId

type DeleteSingleSendParam

type DeleteSingleSendParam struct {
	//
	Id *string `json:"id"`
}

func (*DeleteSingleSendParam) SetId

type DeleteSingleSendsParam

type DeleteSingleSendsParam struct {
	// Single Send IDs to delete
	Ids *[]string `json:"ids,omitempty"`
}

func (*DeleteSingleSendsParam) SetIds

func (params *DeleteSingleSendsParam) SetIds(Ids []string) *DeleteSingleSendsParam

type DuplicateSingleSendParam

type DuplicateSingleSendParam struct {
	//
	Id *string `json:"id"`
	//
	DuplicateSingleSendRequest *DuplicateSingleSendRequest `json:"DuplicateSingleSendRequest,omitempty"`
}

func (*DuplicateSingleSendParam) SetDuplicateSingleSendRequest

func (params *DuplicateSingleSendParam) SetDuplicateSingleSendRequest(DuplicateSingleSendRequest DuplicateSingleSendRequest) *DuplicateSingleSendParam

func (*DuplicateSingleSendParam) SetId

type DuplicateSingleSendRequest

type DuplicateSingleSendRequest struct {
	// The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit.
	Name *string `json:"name,omitempty"`
}

DuplicateSingleSendRequest struct for DuplicateSingleSendRequest

type Editor

type Editor string

Editor the model 'Editor'

const (
	EDITOR_CODE   Editor = "code"
	EDITOR_DESIGN Editor = "design"
)

List of Editor

type Editor1

type Editor1 string

Editor1 the model 'Editor1'

const (
	EDITOR1_CODE   Editor1 = "code"
	EDITOR1_DESIGN Editor1 = "design"
)

List of Editor1

type GetSingleSendParam

type GetSingleSendParam struct {
	//
	Id *string `json:"id"`
}

func (*GetSingleSendParam) SetId

func (params *GetSingleSendParam) SetId(Id string) *GetSingleSendParam

type Items

type Items string

Items the model 'Items'

const (
	ITEMS_DRAFT     Items = "draft"
	ITEMS_SCHEDULED Items = "scheduled"
	ITEMS_TRIGGERED Items = "triggered"
)

List of Items

type ListCategory200Response

type ListCategory200Response struct {
	// list of latest one thousand unique categories associated with all Single Sends in ascending order
	Categories *[]string `json:"categories,omitempty"`
}

ListCategory200Response struct for ListCategory200Response

type ListCategoryParam

type ListCategoryParam struct {
}

type ListSingleSend200Response

type ListSingleSend200Response struct {
	Result   *[]SinglesendResponseShort `json:"result,omitempty"`
	Metadata *Metadata                  `json:"_metadata,omitempty"`
}

ListSingleSend200Response struct for ListSingleSend200Response

type ListSingleSend500Response

type ListSingleSend500Response struct {
	Errors *[]ListSingleSend500ResponseErrorsInner `json:"errors,omitempty"`
}

ListSingleSend500Response struct for ListSingleSend500Response

type ListSingleSend500ResponseErrorsInner

type ListSingleSend500ResponseErrorsInner struct {
	Field   *string `json:"field,omitempty"`
	Message *string `json:"message,omitempty"`
	ErrorId *string `json:"error_id,omitempty"`
}

ListSingleSend500ResponseErrorsInner struct for ListSingleSend500ResponseErrorsInner

type ListSingleSendParam

type ListSingleSendParam struct {
	//
	PageSize *int32 `json:"page_size,omitempty"`
	//
	PageToken *string `json:"page_token,omitempty"`
}

func (*ListSingleSendParam) SetPageSize

func (params *ListSingleSendParam) SetPageSize(PageSize int32) *ListSingleSendParam

func (*ListSingleSendParam) SetPageToken

func (params *ListSingleSendParam) SetPageToken(PageToken string) *ListSingleSendParam

type Metadata

type Metadata struct {
	Prev  *string `json:"prev,omitempty"`
	Self  *string `json:"self,omitempty"`
	Next  *string `json:"next,omitempty"`
	Count *int32  `json:"count,omitempty"`
}

Metadata struct for Metadata

type ScheduleSingleSend201Response

type ScheduleSingleSend201Response struct {
	// The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/).
	SendAt *time.Time `json:"send_at,omitempty"`
	Status *Status    `json:"status,omitempty"`
}

ScheduleSingleSend201Response struct for ScheduleSingleSend201Response

type ScheduleSingleSendParam

type ScheduleSingleSendParam struct {
	//
	Id *string `json:"id"`
	//
	ScheduleSingleSendRequest *ScheduleSingleSendRequest `json:"ScheduleSingleSendRequest,omitempty"`
}

func (*ScheduleSingleSendParam) SetId

func (*ScheduleSingleSendParam) SetScheduleSingleSendRequest

func (params *ScheduleSingleSendParam) SetScheduleSingleSendRequest(ScheduleSingleSendRequest ScheduleSingleSendRequest) *ScheduleSingleSendParam

type ScheduleSingleSendRequest

type ScheduleSingleSendRequest struct {
	// The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/).
	SendAt time.Time `json:"send_at"`
}

ScheduleSingleSendRequest struct for ScheduleSingleSendRequest

type SearchSingleSendParam

type SearchSingleSendParam struct {
	//
	PageSize *int32 `json:"page_size,omitempty"`
	//
	PageToken *string `json:"page_token,omitempty"`
	//
	SinglesendSearch *SinglesendSearch `json:"SinglesendSearch,omitempty"`
}

func (*SearchSingleSendParam) SetPageSize

func (params *SearchSingleSendParam) SetPageSize(PageSize int32) *SearchSingleSendParam

func (*SearchSingleSendParam) SetPageToken

func (params *SearchSingleSendParam) SetPageToken(PageToken string) *SearchSingleSendParam

func (*SearchSingleSendParam) SetSinglesendSearch

func (params *SearchSingleSendParam) SetSinglesendSearch(SinglesendSearch SinglesendSearch) *SearchSingleSendParam

type SinglesendRequest

type SinglesendRequest struct {
	// The name of the Single Send.
	Name string `json:"name"`
	// The categories to associate with this Single Send.
	Categories *[]string `json:"categories,omitempty"`
	// Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error.
	SendAt      *time.Time                    `json:"send_at,omitempty"`
	SendTo      *SinglesendRequestSendTo      `json:"send_to,omitempty"`
	EmailConfig *SinglesendRequestEmailConfig `json:"email_config,omitempty"`
}

SinglesendRequest struct for SinglesendRequest

type SinglesendRequestEmailConfig

type SinglesendRequestEmailConfig struct {
	// The subject line of the Single Send. Do not include this field when using a `design_id`.
	Subject *string `json:"subject,omitempty"`
	// The HTML content of the Single Send. Do not include this field when using a `design_id`.
	HtmlContent *string `json:"html_content,omitempty"`
	// The plain text content of the Single Send. Do not include this field when using a `design_id`.
	PlainContent *string `json:"plain_content,omitempty"`
	// If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered.
	GeneratePlainContent *bool `json:"generate_plain_content,omitempty"`
	// A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App.
	DesignId *string `json:"design_id,omitempty"`
	// The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App.
	Editor *Editor `json:"editor,omitempty"`
	// The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`.
	SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"`
	// The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`.
	CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"`
	// The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App.
	SenderId *int32 `json:"sender_id,omitempty"`
	// The name of the IP Pool from which the Single Send emails are sent.
	IpPool *string `json:"ip_pool,omitempty"`
}

SinglesendRequestEmailConfig struct for SinglesendRequestEmailConfig

type SinglesendRequestSendTo

type SinglesendRequestSendTo struct {
	// The recipient List IDs that will receive the Single Send.
	ListIds *[]string `json:"list_ids,omitempty"`
	// The recipient Segment IDs that will receive the Single Send.
	SegmentIds *[]string `json:"segment_ids,omitempty"`
	// Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients.
	All *bool `json:"all,omitempty"`
}

SinglesendRequestSendTo struct for SinglesendRequestSendTo

type SinglesendResponse

type SinglesendResponse struct {
	// The unique ID for the Single Send.
	Id *string `json:"id,omitempty"`
	// The name of the Single Send.
	Name *string `json:"name,omitempty"`
	// The current status of the Single Send. The status may be `draft`, `scheduled`, or `triggered`.
	Status *Status2 `json:"status,omitempty"`
	// The categories associated with this Single Send.
	Categories *[]string `json:"categories,omitempty"`
	// An ISO 8601 formatted date-time when the Single Send is set to be sent. Please note that any `send_at` property value will have no effect while the Single Send `status` is `draft`. You must update the Single Send with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI to schedule it.
	SendAt *time.Time                `json:"send_at,omitempty"`
	SendTo *SinglesendResponseSendTo `json:"send_to,omitempty"`
	// the ISO 8601 time at which the Single Send was last updated.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// the ISO 8601 time at which the Single Send was created.
	CreatedAt   *time.Time                         `json:"created_at,omitempty"`
	EmailConfig *SinglesendResponseEmailConfig     `json:"email_config,omitempty"`
	Warnings    *[]SinglesendResponseWarningsInner `json:"warnings,omitempty"`
}

SinglesendResponse struct for SinglesendResponse

type SinglesendResponseEmailConfig

type SinglesendResponseEmailConfig struct {
	// The subject line of the Single Send. This property is not used when a `design_id` value is set.
	Subject *string `json:"subject,omitempty"`
	// The HTML content of the Single Send. This property is not used when a `design_id` value is set.
	HtmlContent *string `json:"html_content,omitempty"`
	// The plain text content of the Single Send. This property is not used when a `design_id` value is set.
	PlainContent *string `json:"plain_content,omitempty"`
	// If this property is set to `true`, `plain_content` is always generated from `html_content`. If it's set to false, `plain_content` is not altered.
	GeneratePlainContent *bool `json:"generate_plain_content,omitempty"`
	// A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [**List Designs** endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App.
	DesignId *string `json:"design_id,omitempty"`
	// The editor, `design` or `code`, used to modify the Single Send's design in the Marketing Campaigns application user interface.
	Editor *Editor1 `json:"editor,omitempty"`
	// The ID of the Suppression Group to allow recipients to unsubscribe. You must provide a `suppression_group_id` or the `custom_unsubscribe_url` with your Single Send.
	SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"`
	// The URL allowing recipients to unsubscribe. You must provide a `custom_unsubscribe_url` or a `suppression_group_id` with your Single Send.
	CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"`
	// The ID of the verified sender from whom the Single Send will be sent. You can retrieve a verified sender's ID from the [**Get Verified Senders** endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the sender's detail page URL in the SendGrid App.
	SenderId *int32 `json:"sender_id,omitempty"`
	// The name of the IP Pool from which the Single Send emails are sent.
	IpPool *string `json:"ip_pool,omitempty"`
}

SinglesendResponseEmailConfig struct for SinglesendResponseEmailConfig

type SinglesendResponseSendTo

type SinglesendResponseSendTo struct {
	// The IDs of each contact list to which the Single Send will be sent.
	ListIds *[]string `json:"list_ids,omitempty"`
	// The IDs of each segment to which the Single Send will be sent.
	SegmentIds *[]string `json:"segment_ids,omitempty"`
	// If this property is set to `true`, the Single Send will be sent to all of your contacts. If it's set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent.
	All *bool `json:"all,omitempty"`
}

SinglesendResponseSendTo struct for SinglesendResponseSendTo

type SinglesendResponseShort

type SinglesendResponseShort struct {
	Id string `json:"id"`
	// name of the Single Send
	Name   string        `json:"name"`
	Abtest AbTestSummary `json:"abtest"`
	// current status of the Single Send
	Status Status3 `json:"status"`
	// categories to associate with this Single Send
	Categories []string `json:"categories"`
	// The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/).
	SendAt *time.Time `json:"send_at,omitempty"`
	// true if the Single Send's AB Test functionality has been toggled on
	IsAbtest bool `json:"is_abtest"`
	// the ISO 8601 time at which the Single Send was last updated
	UpdatedAt time.Time `json:"updated_at"`
	// the ISO 8601 time at which the Single Send was created
	CreatedAt time.Time `json:"created_at"`
}

SinglesendResponseShort struct for SinglesendResponseShort

type SinglesendResponseWarningsInner

type SinglesendResponseWarningsInner struct {
	Message   *string `json:"message,omitempty"`
	Field     *string `json:"field,omitempty"`
	WarningId *string `json:"warning_id,omitempty"`
}

SinglesendResponseWarningsInner struct for SinglesendResponseWarningsInner

type SinglesendSchedule

type SinglesendSchedule struct {
	// The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/).
	SendAt time.Time `json:"send_at"`
	Status *Status1  `json:"status,omitempty"`
}

SinglesendSchedule struct for SinglesendSchedule

type SinglesendSearch

type SinglesendSearch struct {
	// leading and trailing wildcard search on name of the Single Send
	Name *string `json:"name,omitempty"`
	// current status of the Single Send
	Status *[]Items `json:"status,omitempty"`
	// categories to associate with this Single Send, match any single send that has at least one of the categories
	Categories *[]string `json:"categories,omitempty"`
}

SinglesendSearch struct for SinglesendSearch

type Status

type Status string

Status the model 'Status'

const (
	STATUS_SCHEDULED Status = "scheduled"
)

List of Status

type Status1

type Status1 string

Status1 the model 'Status1'

const (
	STATUS1_DRAFT     Status1 = "draft"
	STATUS1_SCHEDULED Status1 = "scheduled"
	STATUS1_TRIGGERED Status1 = "triggered"
)

List of Status1

type Status2

type Status2 string

Status2 the model 'Status2'

const (
	STATUS2_DRAFT     Status2 = "draft"
	STATUS2_SCHEDULED Status2 = "scheduled"
	STATUS2_TRIGGERED Status2 = "triggered"
)

List of Status2

type Status3

type Status3 string

Status3 the model 'Status3'

const (
	STATUS3_DRAFT     Status3 = "draft"
	STATUS3_SCHEDULED Status3 = "scheduled"
	STATUS3_TRIGGERED Status3 = "triggered"
)

List of Status3

type Type

type Type string

Type the model 'Type'

const (
	TYPE_SUBJECT Type = "subject"
	TYPE_CONTENT Type = "content"
)

List of Type

type UpdateSingleSendParam

type UpdateSingleSendParam struct {
	//
	Id *string `json:"id"`
	//
	SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"`
}

func (*UpdateSingleSendParam) SetId

func (*UpdateSingleSendParam) SetSinglesendRequest

func (params *UpdateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *UpdateSingleSendParam

type WinnerCriteria

type WinnerCriteria string

WinnerCriteria the model 'WinnerCriteria'

const (
	WINNERCRITERIA_OPEN   WinnerCriteria = "open"
	WINNERCRITERIA_CLICK  WinnerCriteria = "click"
	WINNERCRITERIA_MANUAL WinnerCriteria = "manual"
)

List of WinnerCriteria

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL