package
4.0.0-rc.10
Repository: https://github.com/sendgrid/sendgrid-go.git
Documentation: pkg.go.dev

# README

Go API client for

The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the Contacts API.

You can also manage your lists using the Contacts menu in the Marketing Campaigns application user interface. For more information about lists and best practices for building them, see Building your Contact Lists.

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-08-18T08:58:25.234227Z[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

ClassMethodHTTP requestDescription
CreateMarketingListCreateMarketingListPost /v3/marketing/listsCreate List
DeleteContactDeleteContactDelete /v3/marketing/lists/{Id}/contactsRemove Contacts from a List
DeleteMarketingListDeleteMarketingListDelete /v3/marketing/lists/{Id}Delete a list
GetMarketingListGetMarketingListGet /v3/marketing/lists/{Id}Get a List by ID
ListContactCountListContactCountGet /v3/marketing/lists/{Id}/contacts/countGet List Contact Count
ListMarketingListListMarketingListGet /v3/marketing/listsGet All Lists
UpdateMarketingListUpdateMarketingListPatch /v3/marketing/lists/{Id}Update List

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)