Skip to content

Latest commit

 

History

History
246 lines (179 loc) · 6.57 KB

WebhookApi.md

File metadata and controls

246 lines (179 loc) · 6.57 KB

Org.OpenAPITools.Api.WebhookApi

All URIs are relative to https://eu-api.legalesign.com/api/v1

Method HTTP request Description
DeleteWebhook POST /unsubscribe Delete webhook
GetWebhooks GET /notifications Get webhooks
PostWebhook POST /subscribe Create webhook

DeleteWebhook

void DeleteWebhook (CallbackDeletePost callbackDeletePost)

Delete webhook

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class DeleteWebhookExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://eu-api.legalesign.com/api/v1";
            // Configure API key authorization: apikeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(Configuration.Default);
            var callbackDeletePost = new CallbackDeletePost(); // CallbackDeletePost | 

            try
            {
                // Delete webhook
                apiInstance.DeleteWebhook(callbackDeletePost);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling WebhookApi.DeleteWebhook: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
callbackDeletePost CallbackDeletePost

Return type

void (empty response body)

Authorization

apikeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 operation successful, will return 200 whether url is actually subscribed or not -
400 bad request - not json data or not a valid url -

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

GetWebhooks

List<InlineResponse2001> GetWebhooks ()

Get webhooks

Callbacks sent to URL of your choice

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetWebhooksExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://eu-api.legalesign.com/api/v1";
            // Configure API key authorization: apikeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(Configuration.Default);

            try
            {
                // Get webhooks
                List<InlineResponse2001> result = apiInstance.GetWebhooks();
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling WebhookApi.GetWebhooks: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List<InlineResponse2001>

Authorization

apikeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 operation successful -

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

PostWebhook

void PostWebhook (CallbackCreatePost callbackCreatePost)

Create webhook

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class PostWebhookExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://eu-api.legalesign.com/api/v1";
            // Configure API key authorization: apikeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new WebhookApi(Configuration.Default);
            var callbackCreatePost = new CallbackCreatePost(); // CallbackCreatePost | 

            try
            {
                // Create webhook
                apiInstance.PostWebhook(callbackCreatePost);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling WebhookApi.PostWebhook: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
callbackCreatePost CallbackCreatePost

Return type

void (empty response body)

Authorization

apikeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 operation successful -
400 bad request -

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