Als Markdown anzeigen

WebhooksUnsubscribe

POST/v2/whks/unsubscribe
Basis-URL
https://us1.proctorapi.com
Verfügbare Regionen10 Regionen
Die Abbestellungs-Anfrage markiert die Beendigung eines zuvor eingerichteten Abonnements für Proctorio-Webhook-Benachrichtigungen.
application/json

Body

Die Abbestellungs-Anfrage.

id
stringErforderlich
Diese Anfrage muss einen eindeutigen Wert für den spezifischen Webhook enthalten.

Antworten

200application/json

Zeigt Erfolg an.

400application/json

Zeigt eine fehlerhafte Anfrage an.

401application/json

Zeigt eine nicht autorisierte Antwort an.

2154 - Konto nicht aktiv.

2155 - Falsche Region.

2655 - Ungültiger 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);
}
Anfrage-Beispiele
{
  "id": "example-id-123"
}