curl --request POST \
--url https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"contact.created"
]
}
'import requests
url = "https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks"
payload = {
"url": "<string>",
"events": ["contact.created"]
}
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({url: '<string>', events: ['contact.created']})
};
fetch('https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks', 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://api.blinq.me/v1/workspaces/{workspace_id}/webhooks",
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' => [
'contact.created'
]
]),
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://api.blinq.me/v1/workspaces/{workspace_id}/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"contact.created\"\n ]\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://api.blinq.me/v1/workspaces/{workspace_id}/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"contact.created\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks")
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 \"url\": \"<string>\",\n \"events\": [\n \"contact.created\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "subscription-id",
"signing_secret": "whsec_example"
}Create webhook subscription
Available to any API-eligible account with a verified email address.
Stores a webhook subscription for your personal workspace or for a business workspace where you are an owner or admin. Business members and other workspaces return 404. Business subscriptions belong to the workspace, not to the key owner, so other owners and admins can list and delete them.
In a business workspace, contact.created fires once for each new business contact shared into that workspace. Its data.contact_id is the business contact id returned by the list contacts endpoint. Updates, repeat shares, restores, and imported or backfilled history do not fire it, and events from before the subscription was created are not replayed.
The URL must be an absolute HTTPS URL without embedded credentials or a fragment. At least one event is required, and duplicate event names are stored once. No request is sent to the URL during registration.
Repeated calls create separate subscriptions, including for the same URL. Store the signing_secret returned on creation securely; it cannot be retrieved again. If the response is lost, delete the subscription and create a replacement.
Requires the blinq:webhooks:write and blinq:contacts:read scopes.
curl --request POST \
--url https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [
"contact.created"
]
}
'import requests
url = "https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks"
payload = {
"url": "<string>",
"events": ["contact.created"]
}
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({url: '<string>', events: ['contact.created']})
};
fetch('https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks', 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://api.blinq.me/v1/workspaces/{workspace_id}/webhooks",
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' => [
'contact.created'
]
]),
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://api.blinq.me/v1/workspaces/{workspace_id}/webhooks"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": [\n \"contact.created\"\n ]\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://api.blinq.me/v1/workspaces/{workspace_id}/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"events\": [\n \"contact.created\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blinq.me/v1/workspaces/{workspace_id}/webhooks")
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 \"url\": \"<string>\",\n \"events\": [\n \"contact.created\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "subscription-id",
"signing_secret": "whsec_example"
}Authorizations
Send a Blinq API key as Authorization: Bearer <api-key>; enter only the key in the documentation playground.
Create and revoke keys in the Blinq web app under Settings > API keys. See Creating and revoking keys above.
The key needs the scopes required by the operation, and public API access requires a Pro or Business plan.
Path Parameters
Body
The events to receive. At least one is required; duplicates are stored once.
1An event the subscription receives. contact.created fires when a contact is created in your personal workspace, or once for each new business contact shared into a business workspace. Business payloads carry the business contact id returned by the list contacts endpoint.
contact.created 