Create a Loop
curl --request POST \
--url https://api.enrichloop.com/v1/loops \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"webhook_url": "<string>",
"slug": "<string>",
"object_type": "company",
"operation": "enrich"
}
'import requests
url = "https://api.enrichloop.com/v1/loops"
payload = {
"name": "<string>",
"webhook_url": "<string>",
"slug": "<string>",
"object_type": "company",
"operation": "enrich"
}
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({
name: '<string>',
webhook_url: '<string>',
slug: '<string>',
object_type: 'company',
operation: 'enrich'
})
};
fetch('https://api.enrichloop.com/v1/loops', 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.enrichloop.com/v1/loops",
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([
'name' => '<string>',
'webhook_url' => '<string>',
'slug' => '<string>',
'object_type' => 'company',
'operation' => 'enrich'
]),
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.enrichloop.com/v1/loops"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"slug\": \"<string>\",\n \"object_type\": \"company\",\n \"operation\": \"enrich\"\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.enrichloop.com/v1/loops")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"slug\": \"<string>\",\n \"object_type\": \"company\",\n \"operation\": \"enrich\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enrichloop.com/v1/loops")
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 \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"slug\": \"<string>\",\n \"object_type\": \"company\",\n \"operation\": \"enrich\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"object_type": "company",
"operation": "enrich",
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"destination": {
"kind": "webhook",
"url": "<string>",
"enabled": true,
"secret": "<string>"
}
}
}{
"error": "<string>"
}"Unauthorized"{
"error": "<string>"
}{
"error": "<string>",
"code": "queue_full",
"queuedTasks": 123
}Loops
Create a Loop
Your webhook URL must be https and publicly reachable (loopback and
private addresses are rejected). On success you get back the Loop
along with a signing secret — shown once, at creation, and never
retrievable again. If you lose it, delete the Loop and create a new
one.
POST
/
v1
/
loops
Create a Loop
curl --request POST \
--url https://api.enrichloop.com/v1/loops \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"webhook_url": "<string>",
"slug": "<string>",
"object_type": "company",
"operation": "enrich"
}
'import requests
url = "https://api.enrichloop.com/v1/loops"
payload = {
"name": "<string>",
"webhook_url": "<string>",
"slug": "<string>",
"object_type": "company",
"operation": "enrich"
}
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({
name: '<string>',
webhook_url: '<string>',
slug: '<string>',
object_type: 'company',
operation: 'enrich'
})
};
fetch('https://api.enrichloop.com/v1/loops', 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.enrichloop.com/v1/loops",
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([
'name' => '<string>',
'webhook_url' => '<string>',
'slug' => '<string>',
'object_type' => 'company',
'operation' => 'enrich'
]),
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.enrichloop.com/v1/loops"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"slug\": \"<string>\",\n \"object_type\": \"company\",\n \"operation\": \"enrich\"\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.enrichloop.com/v1/loops")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"slug\": \"<string>\",\n \"object_type\": \"company\",\n \"operation\": \"enrich\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enrichloop.com/v1/loops")
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 \"name\": \"<string>\",\n \"webhook_url\": \"<string>\",\n \"slug\": \"<string>\",\n \"object_type\": \"company\",\n \"operation\": \"enrich\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"object_type": "company",
"operation": "enrich",
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"destination": {
"kind": "webhook",
"url": "<string>",
"enabled": true,
"secret": "<string>"
}
}
}{
"error": "<string>"
}"Unauthorized"{
"error": "<string>"
}{
"error": "<string>",
"code": "queue_full",
"queuedTasks": 123
}Authorizations
Pass your API key as a bearer token: Authorization: Bearer YOUR_API_KEY. Generate and manage keys from your dashboard under
Settings → API Keys.
Body
application/json
URL-safe identifier, unique per organization. Derived
from name if omitted. Lowercase letters, numbers and
single hyphens, 2–64 characters.
Available options:
company Available options:
enrich Response
The created Loop, including its signing secret.
The one response where destination.secret is populated.
Show child attributes
Show child attributes
⌘I