Skip to content

Latest commit

 

History

History
355 lines (276 loc) · 11.1 KB

WebhooksApi.md

File metadata and controls

355 lines (276 loc) · 11.1 KB

sib_api_v3_sdk.Api.WebhooksApi

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

Method HTTP request Description
CreateWebhook POST /webhooks Create a webhook
DeleteWebhook DELETE /webhooks/{webhookId} Delete a webhook
GetWebhook GET /webhooks/{webhookId} Get a webhook details
GetWebhooks GET /webhooks Get all webhooks
UpdateWebhook PUT /webhooks/{webhookId} Update a webhook

CreateWebhook

CreateModel CreateWebhook (CreateWebhook createWebhook)

Create a webhook

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class CreateWebhookExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new WebhooksApi();
            var createWebhook = new CreateWebhook(); // CreateWebhook | Values to create a webhook

            try
            {
                // Create a webhook
                CreateModel result = apiInstance.CreateWebhook(createWebhook);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.CreateWebhook: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
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

void DeleteWebhook (long? webhookId)

Delete a webhook

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class DeleteWebhookExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new WebhooksApi();
            var webhookId = 789;  // long? | Id of the webhook

            try
            {
                // Delete a webhook
                apiInstance.DeleteWebhook(webhookId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.DeleteWebhook: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId long? Id of the webhook

Return type

void (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]

GetWebhook

GetWebhook GetWebhook (long? webhookId)

Get a webhook details

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class GetWebhookExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new WebhooksApi();
            var webhookId = 789;  // long? | Id of the webhook

            try
            {
                // Get a webhook details
                GetWebhook result = apiInstance.GetWebhook(webhookId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.GetWebhook: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId long? 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 (string type = null, string sort = null)

Get all webhooks

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class GetWebhooksExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new WebhooksApi();
            var type = type_example;  // string | Filter on webhook type (optional)  (default to transactional)
            var sort = sort_example;  // string | Sort the results in the ascending/descending order of webhook creation (optional)  (default to desc)

            try
            {
                // Get all webhooks
                GetWebhooks result = apiInstance.GetWebhooks(type, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.GetWebhooks: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
type string Filter on webhook type [optional] [default to transactional]
sort string Sort the results in the ascending/descending order of webhook creation [optional] [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

void UpdateWebhook (long? webhookId, UpdateWebhook updateWebhook)

Update a webhook

Example

using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

namespace Example
{
    public class UpdateWebhookExample
    {
        public void main()
        {
            // Configure API key authorization: api-key
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");

            var apiInstance = new WebhooksApi();
            var webhookId = 789;  // long? | Id of the webhook
            var updateWebhook = new UpdateWebhook(); // UpdateWebhook | Values to update a webhook

            try
            {
                // Update a webhook
                apiInstance.UpdateWebhook(webhookId, updateWebhook);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WebhooksApi.UpdateWebhook: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId long? Id of the webhook
updateWebhook UpdateWebhook Values to update a webhook

Return type

void (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]