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 Webhooks API allows you to configure the Event and Parse Webhooks.

Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle.

The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs multipart/form-data to a URL that you choose.

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:30.280508Z[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
CreateEventWebhookCreateEventWebhookPost /v3/user/webhooks/event/settingsCreate a new Event Webhook
CreateParseSettingCreateParseSettingPost /v3/user/webhooks/parse/settingsCreate a parse setting
CreateSecurityPolicyCreateSecurityPolicyPost /v3/user/webhooks/security/policiesCreate a new webhook security policy
DeleteEventWebhookDeleteEventWebhookDelete /v3/user/webhooks/event/settings/{Id}Delete a single Event Webhook by ID.
DeleteParseSettingDeleteParseSettingDelete /v3/user/webhooks/parse/settings/{Hostname}Delete a parse setting
DeleteSecurityPolicyDeleteSecurityPolicyDelete /v3/user/webhooks/security/policies/{Id}Delete a specific webhook security policy
GetEventWebhookGetEventWebhookGet /v3/user/webhooks/event/settings/{Id}Get the settings for a single Event Webhook.
GetParseSettingGetParseSettingGet /v3/user/webhooks/parse/settings/{Hostname}Retrieve a specific parse setting
GetSecurityPolicyGetSecurityPolicyGet /v3/user/webhooks/security/policies/{Id}Retrieve a specific webhook security policy
GetSignedEventWebhookGetSignedEventWebhookGet /v3/user/webhooks/event/settings/signed/{Id}Get Signed Event Webhook's Public Key
ListAllSecurityPoliciesListAllSecurityPoliciesGet /v3/user/webhooks/security/policiesRetrieve all webhook security policies for your account
ListEventWebhookListEventWebhookGet /v3/user/webhooks/event/settings/allRetrieve all of your Event Webhooks.
ListParseSettingListParseSettingGet /v3/user/webhooks/parse/settingsRetrieve all parse settings
ListParseStaticListParseStaticGet /v3/user/webhooks/parse/statsRetrieves Inbound Parse Webhook statistics.
TestEventWebhookTestEventWebhookPost /v3/user/webhooks/event/testTest an Event Webhook's settings
UpdateEventWebhookUpdateEventWebhookPatch /v3/user/webhooks/event/settings/{Id}Update a single Event Webhook by ID.
UpdateParseSettingUpdateParseSettingPatch /v3/user/webhooks/parse/settings/{Hostname}Update a parse setting
UpdateSecurityPolicyUpdateSecurityPolicyPatch /v3/user/webhooks/security/policies/{Id}Update an existing webhook security policy
UpdateSignedEventWebhookUpdateSignedEventWebhookPatch /v3/user/webhooks/event/settings/signed/{Id}Toggle signature verification for a single Event Webhook by ID

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)