Skip to content

Latest commit

 

History

History
181 lines (114 loc) · 6.18 KB

WebhooksApi.md

File metadata and controls

181 lines (114 loc) · 6.18 KB

\WebhooksApi

All URIs are relative to https://api.brevo.com/v3

Method HTTP request Description
CreateWebhook Post /webhooks Create a webhook
DeleteWebhook Delete /webhooks/{webhookId} Delete a webhook
ExportWebhooksHistory Post /webhooks/export Export all webhook events
GetWebhook Get /webhooks/{webhookId} Get a webhook details
GetWebhooks Get /webhooks Get all webhooks
UpdateWebhook Put /webhooks/{webhookId} Update a webhook

CreateWebhook

CreateModel CreateWebhook(ctx, createWebhook) Create a webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
createWebhook CreateWebhook Values to create a webhook

Return type

CreateModel

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteWebhook

DeleteWebhook(ctx, webhookId) Delete a webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId int64 Id of the webhook

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ExportWebhooksHistory

CreatedProcessId ExportWebhooksHistory(ctx, exportWebhookHistory) Export all webhook events

This endpoint will submit a request to get the history of webhooks in the CSV file. The link to download the CSV file will be sent to the webhook that was provided in the notifyURL.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
exportWebhookHistory ExportWebhooksHistory Values to submit for webhooks history

Return type

CreatedProcessId

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetWebhook

GetWebhook GetWebhook(ctx, webhookId) Get a webhook details

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId int64 Id of the webhook

Return type

GetWebhook

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetWebhooks

GetWebhooks GetWebhooks(ctx, optional) Get all webhooks

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetWebhooksOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetWebhooksOpts struct

Name Type Description Notes
type_ optional.String Filter on webhook type [default to transactional]
sort optional.String Sort the results in the ascending/descending order of webhook creation [default to desc]

Return type

GetWebhooks

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateWebhook

UpdateWebhook(ctx, webhookId, updateWebhook) Update a webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId int64 Id of the webhook
updateWebhook UpdateWebhook Values to update a webhook

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]