View as Markdown

WebhooksUnsubscribe

POST/v2/whks/unsubscribe
Base URL
https://us1.proctorapi.com
Available Regions10 regions
The unsubscribe request marks the termination of a previously established subscription to proctorio webhook notifications.
application/json

Body

The unsubscribe request.

id
stringRequired
This request must contain a unique value for specific webhook.

Responses

200application/json

Indicates success.

400application/json

Indicates bad request.

401application/json

Indicates unauthorized response.

2154 - Account not active.

2155 - Incorrect region.

2655 - Invalid api_key.

POST/v2/whks/unsubscribe
curl --request POST \
  --url https://us1.proctorapi.com/v2/whks/unsubscribe \
  --header 'Content-Type: application/json' \
  --header 'api_key: $API_KEY' \
  --data '{"id":"example-id-123"}'
import requests

url = "https://us1.proctorapi.com/v2/whks/unsubscribe"

payload = { "id": "example-id-123" }
headers = {
    "api_key": "$API_KEY",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
const fetch = require('node-fetch');

const url = 'https://us1.proctorapi.com/v2/whks/unsubscribe';
const options = {
  method: 'POST',
  headers: {api_key: '$API_KEY', 'Content-Type': 'application/json'},
  body: '{"id":"example-id-123"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("https://us1.proctorapi.com/v2/whks/unsubscribe"),
    Headers =
    {
        { "api_key", "$API_KEY" },
    },
    Content = new StringContent("{\"id\":\"example-id-123\"}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
Request examples
{
  "id": "example-id-123"
}