Register Webhook
curl --request POST \
--url https://b2b-api.dev-riseworks.io/v2/webhooks/register \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_nanoid": "<string>",
"url": "<string>",
"team_nanoid": "<string>",
"webhook_version": "v2",
"events": [
"<string>"
],
"secret": "<string>",
"is_active": true,
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://b2b-api.dev-riseworks.io/v2/webhooks/register"
payload = {
"company_nanoid": "<string>",
"url": "<string>",
"team_nanoid": "<string>",
"webhook_version": "v2",
"events": ["<string>"],
"secret": "<string>",
"is_active": True,
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_nanoid: '<string>',
url: '<string>',
team_nanoid: '<string>',
webhook_version: 'v2',
events: ['<string>'],
secret: '<string>',
is_active: true,
name: '<string>',
description: '<string>'
})
};
fetch('https://b2b-api.dev-riseworks.io/v2/webhooks/register', 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://b2b-api.dev-riseworks.io/v2/webhooks/register",
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([
'company_nanoid' => '<string>',
'url' => '<string>',
'team_nanoid' => '<string>',
'webhook_version' => 'v2',
'events' => [
'<string>'
],
'secret' => '<string>',
'is_active' => true,
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://b2b-api.dev-riseworks.io/v2/webhooks/register"
payload := strings.NewReader("{\n \"company_nanoid\": \"<string>\",\n \"url\": \"<string>\",\n \"team_nanoid\": \"<string>\",\n \"webhook_version\": \"v2\",\n \"events\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"is_active\": true,\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://b2b-api.dev-riseworks.io/v2/webhooks/register")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_nanoid\": \"<string>\",\n \"url\": \"<string>\",\n \"team_nanoid\": \"<string>\",\n \"webhook_version\": \"v2\",\n \"events\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"is_active\": true,\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b-api.dev-riseworks.io/v2/webhooks/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_nanoid\": \"<string>\",\n \"url\": \"<string>\",\n \"team_nanoid\": \"<string>\",\n \"webhook_version\": \"v2\",\n \"events\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"is_active\": true,\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"webhook_nanoid": "<string>",
"company_nanoid": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"is_active": true,
"name": "<string>",
"description": "<string>",
"team_nanoid": "<string>"
}
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}B2B Webhooks
Register Webhook
POST
/
v2
/
webhooks
/
register
Register Webhook
curl --request POST \
--url https://b2b-api.dev-riseworks.io/v2/webhooks/register \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_nanoid": "<string>",
"url": "<string>",
"team_nanoid": "<string>",
"webhook_version": "v2",
"events": [
"<string>"
],
"secret": "<string>",
"is_active": true,
"name": "<string>",
"description": "<string>"
}
'import requests
url = "https://b2b-api.dev-riseworks.io/v2/webhooks/register"
payload = {
"company_nanoid": "<string>",
"url": "<string>",
"team_nanoid": "<string>",
"webhook_version": "v2",
"events": ["<string>"],
"secret": "<string>",
"is_active": True,
"name": "<string>",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_nanoid: '<string>',
url: '<string>',
team_nanoid: '<string>',
webhook_version: 'v2',
events: ['<string>'],
secret: '<string>',
is_active: true,
name: '<string>',
description: '<string>'
})
};
fetch('https://b2b-api.dev-riseworks.io/v2/webhooks/register', 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://b2b-api.dev-riseworks.io/v2/webhooks/register",
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([
'company_nanoid' => '<string>',
'url' => '<string>',
'team_nanoid' => '<string>',
'webhook_version' => 'v2',
'events' => [
'<string>'
],
'secret' => '<string>',
'is_active' => true,
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://b2b-api.dev-riseworks.io/v2/webhooks/register"
payload := strings.NewReader("{\n \"company_nanoid\": \"<string>\",\n \"url\": \"<string>\",\n \"team_nanoid\": \"<string>\",\n \"webhook_version\": \"v2\",\n \"events\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"is_active\": true,\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://b2b-api.dev-riseworks.io/v2/webhooks/register")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_nanoid\": \"<string>\",\n \"url\": \"<string>\",\n \"team_nanoid\": \"<string>\",\n \"webhook_version\": \"v2\",\n \"events\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"is_active\": true,\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b-api.dev-riseworks.io/v2/webhooks/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_nanoid\": \"<string>\",\n \"url\": \"<string>\",\n \"team_nanoid\": \"<string>\",\n \"webhook_version\": \"v2\",\n \"events\": [\n \"<string>\"\n ],\n \"secret\": \"<string>\",\n \"is_active\": true,\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"webhook_nanoid": "<string>",
"company_nanoid": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"is_active": true,
"name": "<string>",
"description": "<string>",
"team_nanoid": "<string>"
}
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Unique identifier of the company.
Required string length:
15Pattern:
^co-.*Unique identifier of the team.
Required string length:
15Pattern:
^te-.*v2: HMAC-signed payloads (requires secret and events). v1: Ethereum-signed legacy payloads (omit secret; receives all events).
Available options:
v1, v2 Required for v2: non-empty list of subscribed event types. For v1 omit or use []; v1 always receives all events.
Required for v2 (minimum 16 characters). Must be omitted for v1.
Minimum string length:
16Optional display name for the webhook.
Maximum string length:
255Optional description for the webhook.
⌘I
