Cadastra um webhook
curl --request POST \
--url 'https://memberkit.com.br/api/v1/hooks?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"<string>"
]
}
'import requests
url = "https://memberkit.com.br/api/v1/hooks?api_key="
payload = {
"url": "<string>",
"events": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: ['<string>']})
};
fetch('https://memberkit.com.br/api/v1/hooks?api_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://memberkit.com.br/api/v1/hooks?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://memberkit.com.br/api/v1/hooks?api_key="
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://memberkit.com.br/api/v1/hooks?api_key=")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://memberkit.com.br/api/v1/hooks?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"url": "<string>",
"status": "<string>",
"events": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Webhooks
Cadastra um webhook
Cadastra uma nova URL de notificação.
POST
/
api
/
v1
/
hooks
Cadastra um webhook
curl --request POST \
--url 'https://memberkit.com.br/api/v1/hooks?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"<string>"
]
}
'import requests
url = "https://memberkit.com.br/api/v1/hooks?api_key="
payload = {
"url": "<string>",
"events": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: ['<string>']})
};
fetch('https://memberkit.com.br/api/v1/hooks?api_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://memberkit.com.br/api/v1/hooks?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://memberkit.com.br/api/v1/hooks?api_key="
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://memberkit.com.br/api/v1/hooks?api_key=")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://memberkit.com.br/api/v1/hooks?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"events\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"url": "<string>",
"status": "<string>",
"events": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}| Descrição | Evento |
|---|---|
| Assinatura atualizada | membership_updated |
| Assinatura criada | membership_created |
| Aula atualizada | lesson_updated |
| Aula criada | lesson_created |
| Avaliação feita | rating_saved |
| Comentário criado | comment_created |
| Download de material | lesson_file_downloaded |
| Inscrição em convite | invite_pass_created |
| Login enviado | login_sent |
| Login feito | user_signed_in |
| Matrícula atualizada | enrollment_updated |
| Matrícula criada | enrollment_created |
| Oferta transacionada | integration_log_received |
| Onboarding confirmado | page_agreement_accepted |
| Postagem criada | forum_post_created |
| Progresso atualizada | lesson_status_saved |
| Última vez visto | user_last_seen |
Autorizações
Corpo
application/json
Esta página foi útil?
⌘I