400
invalid_requestThe request did not satisfy the documented contract.
Beladed Marketing API
Create Segment through the reviewed Beladed Marketing contract.
/api/marketing/segment/createcurl --request POST 'https://api.beladed.dev/api/marketing/segment/create' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Beladed-API-Key: BELADED_SECRET_KEY' \
--data '{
"workspaceId": "id_demo_001",
"name": "High-Value Enterprise Leads",
"description": "Contacts from enterprise companies with high lead scores and active engagement",
"type": "dynamic",
"category": "lead_scoring",
"status": "active",
"criteria": {
"conditions": [
{
"field": "leadScore",
"operator": "greater_than",
"value": 80
},
{
"field": "company.size",
"operator": "in",
"value": [
"enterprise",
"large"
]
}
],
"logic": "AND"
},
"targeting": {
"demographic": {
"ageRange": "25-55",
"locations": [
"US",
"CA"
],
"languages": [
"en"
]
},
"behavioral": {
"interests": [
"technology",
"business"
],
"actions": [
"email_opened",
"website_visited"
]
},
"firmographic": {
"industries": [
"technology",
"finance"
],
"companySize": [
"tok_beladed_visa"
],
"revenue": "$10M+"
}
},
"automation": {
"autoRefresh": true,
"refreshFrequency": "daily",
"triggers": [
"contact_updated",
"activity_recorded"
]
},
"tags": [
"enterprise",
"high-value"
]
}'const response = await fetch("https://api.beladed.dev/api/marketing/segment/create", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"X-Beladed-API-Key": "BELADED_SECRET_KEY"
},
body: JSON.stringify({
"workspaceId": "id_demo_001",
"name": "High-Value Enterprise Leads",
"description": "Contacts from enterprise companies with high lead scores and active engagement",
"type": "dynamic",
"category": "lead_scoring",
"status": "active",
"criteria": {
"conditions": [
{
"field": "leadScore",
"operator": "greater_than",
"value": 80
},
{
"field": "company.size",
"operator": "in",
"value": [
"enterprise",
"large"
]
}
],
"logic": "AND"
},
"targeting": {
"demographic": {
"ageRange": "25-55",
"locations": [
"US",
"CA"
],
"languages": [
"en"
]
},
"behavioral": {
"interests": [
"technology",
"business"
],
"actions": [
"email_opened",
"website_visited"
]
},
"firmographic": {
"industries": [
"technology",
"finance"
],
"companySize": [
"tok_beladed_visa"
],
"revenue": "$10M+"
}
},
"automation": {
"autoRefresh": true,
"refreshFrequency": "daily",
"triggers": [
"contact_updated",
"activity_recorded"
]
},
"tags": [
"enterprise",
"high-value"
]
})
});
const data = await response.json();import requests
response = requests.request(
"POST",
"https://api.beladed.dev/api/marketing/segment/create",
headers={"Accept":"application/json","Content-Type":"application/json","X-Beladed-API-Key":"BELADED_SECRET_KEY"},
json={
"workspaceId": "id_demo_001",
"name": "High-Value Enterprise Leads",
"description": "Contacts from enterprise companies with high lead scores and active engagement",
"type": "dynamic",
"category": "lead_scoring",
"status": "active",
"criteria": {
"conditions": [
{
"field": "leadScore",
"operator": "greater_than",
"value": 80
},
{
"field": "company.size",
"operator": "in",
"value": [
"enterprise",
"large"
]
}
],
"logic": "AND"
},
"targeting": {
"demographic": {
"ageRange": "25-55",
"locations": [
"US",
"CA"
],
"languages": [
"en"
]
},
"behavioral": {
"interests": [
"technology",
"business"
],
"actions": [
"email_opened",
"website_visited"
]
},
"firmographic": {
"industries": [
"technology",
"finance"
],
"companySize": [
"tok_beladed_visa"
],
"revenue": "$10M+"
}
},
"automation": {
"autoRefresh": true,
"refreshFrequency": "daily",
"triggers": [
"contact_updated",
"activity_recorded"
]
},
"tags": [
"enterprise",
"high-value"
]
},
timeout=30,
)
response.raise_for_status()
data = response.json()<?php
$client = curl_init("https://api.beladed.dev/api/marketing/segment/create");
curl_setopt_array($client, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => ["Accept: application/json","Content-Type: application/json","X-Beladed-API-Key: BELADED_SECRET_KEY"],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode({
"workspaceId": "id_demo_001",
"name": "High-Value Enterprise Leads",
"description": "Contacts from enterprise companies with high lead scores and active engagement",
"type": "dynamic",
"category": "lead_scoring",
"status": "active",
"criteria": {
"conditions": [
{
"field": "leadScore",
"operator": "greater_than",
"value": 80
},
{
"field": "company.size",
"operator": "in",
"value": [
"enterprise",
"large"
]
}
],
"logic": "AND"
},
"targeting": {
"demographic": {
"ageRange": "25-55",
"locations": [
"US",
"CA"
],
"languages": [
"en"
]
},
"behavioral": {
"interests": [
"technology",
"business"
],
"actions": [
"email_opened",
"website_visited"
]
},
"firmographic": {
"industries": [
"technology",
"finance"
],
"companySize": [
"tok_beladed_visa"
],
"revenue": "$10M+"
}
},
"automation": {
"autoRefresh": true,
"refreshFrequency": "daily",
"triggers": [
"contact_updated",
"activity_recorded"
]
},
"tags": [
"enterprise",
"high-value"
]
}),
]);
$response = curl_exec($client);require "net/http"
require "json"
uri = URI("https://api.beladed.dev/api/marketing/segment/create")
request = Net::HTTP::Post.new(uri)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request["X-Beladed-API-Key"] = "BELADED_SECRET_KEY"
request.body = "{\n \"workspaceId\": \"id_demo_001\",\n \"name\": \"High-Value Enterprise Leads\",\n \"description\": \"Contacts from enterprise companies with high lead scores and active engagement\",\n \"type\": \"dynamic\",\n \"category\": \"lead_scoring\",\n \"status\": \"active\",\n \"criteria\": {\n \"conditions\": [\n {\n \"field\": \"leadScore\",\n \"operator\": \"greater_than\",\n \"value\": 80\n },\n {\n \"field\": \"company.size\",\n \"operator\": \"in\",\n \"value\": [\n \"enterprise\",\n \"large\"\n ]\n }\n ],\n \"logic\": \"AND\"\n },\n \"targeting\": {\n \"demographic\": {\n \"ageRange\": \"25-55\",\n \"locations\": [\n \"US\",\n \"CA\"\n ],\n \"languages\": [\n \"en\"\n ]\n },\n \"behavioral\": {\n \"interests\": [\n \"technology\",\n \"business\"\n ],\n \"actions\": [\n \"email_opened\",\n \"website_visited\"\n ]\n },\n \"firmographic\": {\n \"industries\": [\n \"technology\",\n \"finance\"\n ],\n \"companySize\": [\n \"tok_beladed_visa\"\n ],\n \"revenue\": \"$10M+\"\n }\n },\n \"automation\": {\n \"autoRefresh\": true,\n \"refreshFrequency\": \"daily\",\n \"triggers\": [\n \"contact_updated\",\n \"activity_recorded\"\n ]\n },\n \"tags\": [\n \"enterprise\",\n \"high-value\"\n ]\n}"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }var request = java.net.http.HttpRequest.newBuilder()
.uri(java.net.URI.create("https://api.beladed.dev/api/marketing/segment/create"))
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("X-Beladed-API-Key", "BELADED_SECRET_KEY")
.method("POST", java.net.http.HttpRequest.BodyPublishers.ofString("{\n \"workspaceId\": \"id_demo_001\",\n \"name\": \"High-Value Enterprise Leads\",\n \"description\": \"Contacts from enterprise companies with high lead scores and active engagement\",\n \"type\": \"dynamic\",\n \"category\": \"lead_scoring\",\n \"status\": \"active\",\n \"criteria\": {\n \"conditions\": [\n {\n \"field\": \"leadScore\",\n \"operator\": \"greater_than\",\n \"value\": 80\n },\n {\n \"field\": \"company.size\",\n \"operator\": \"in\",\n \"value\": [\n \"enterprise\",\n \"large\"\n ]\n }\n ],\n \"logic\": \"AND\"\n },\n \"targeting\": {\n \"demographic\": {\n \"ageRange\": \"25-55\",\n \"locations\": [\n \"US\",\n \"CA\"\n ],\n \"languages\": [\n \"en\"\n ]\n },\n \"behavioral\": {\n \"interests\": [\n \"technology\",\n \"business\"\n ],\n \"actions\": [\n \"email_opened\",\n \"website_visited\"\n ]\n },\n \"firmographic\": {\n \"industries\": [\n \"technology\",\n \"finance\"\n ],\n \"companySize\": [\n \"tok_beladed_visa\"\n ],\n \"revenue\": \"$10M+\"\n }\n },\n \"automation\": {\n \"autoRefresh\": true,\n \"refreshFrequency\": \"daily\",\n \"triggers\": [\n \"contact_updated\",\n \"activity_recorded\"\n ]\n },\n \"tags\": [\n \"enterprise\",\n \"high-value\"\n ]\n}"))
.build();
var response = java.net.http.HttpClient.newHttpClient().send(request, java.net.http.HttpResponse.BodyHandlers.ofString());package main
import (
"bytes"
"net/http"
)
func callBeladed() (*http.Response, error) {
body := []byte("{\n \"workspaceId\": \"id_demo_001\",\n \"name\": \"High-Value Enterprise Leads\",\n \"description\": \"Contacts from enterprise companies with high lead scores and active engagement\",\n \"type\": \"dynamic\",\n \"category\": \"lead_scoring\",\n \"status\": \"active\",\n \"criteria\": {\n \"conditions\": [\n {\n \"field\": \"leadScore\",\n \"operator\": \"greater_than\",\n \"value\": 80\n },\n {\n \"field\": \"company.size\",\n \"operator\": \"in\",\n \"value\": [\n \"enterprise\",\n \"large\"\n ]\n }\n ],\n \"logic\": \"AND\"\n },\n \"targeting\": {\n \"demographic\": {\n \"ageRange\": \"25-55\",\n \"locations\": [\n \"US\",\n \"CA\"\n ],\n \"languages\": [\n \"en\"\n ]\n },\n \"behavioral\": {\n \"interests\": [\n \"technology\",\n \"business\"\n ],\n \"actions\": [\n \"email_opened\",\n \"website_visited\"\n ]\n },\n \"firmographic\": {\n \"industries\": [\n \"technology\",\n \"finance\"\n ],\n \"companySize\": [\n \"tok_beladed_visa\"\n ],\n \"revenue\": \"$10M+\"\n }\n },\n \"automation\": {\n \"autoRefresh\": true,\n \"refreshFrequency\": \"daily\",\n \"triggers\": [\n \"contact_updated\",\n \"activity_recorded\"\n ]\n },\n \"tags\": [\n \"enterprise\",\n \"high-value\"\n ]\n}")
request, err := http.NewRequest("POST", "https://api.beladed.dev/api/marketing/segment/create", bytes.NewReader(body))
if err != nil { return nil, err }
request.Header.Set("Accept", "application/json")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Beladed-API-Key", "BELADED_SECRET_KEY")
return http.DefaultClient.Do(request)
}using var client = new HttpClient();
using var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.beladed.dev/api/marketing/segment/create");
request.Headers.TryAddWithoutValidation("Accept", "application/json");
request.Headers.TryAddWithoutValidation("Content-Type", "application/json");
request.Headers.TryAddWithoutValidation("X-Beladed-API-Key", "BELADED_SECRET_KEY");
request.Content = new StringContent("{\n \"workspaceId\": \"id_demo_001\",\n \"name\": \"High-Value Enterprise Leads\",\n \"description\": \"Contacts from enterprise companies with high lead scores and active engagement\",\n \"type\": \"dynamic\",\n \"category\": \"lead_scoring\",\n \"status\": \"active\",\n \"criteria\": {\n \"conditions\": [\n {\n \"field\": \"leadScore\",\n \"operator\": \"greater_than\",\n \"value\": 80\n },\n {\n \"field\": \"company.size\",\n \"operator\": \"in\",\n \"value\": [\n \"enterprise\",\n \"large\"\n ]\n }\n ],\n \"logic\": \"AND\"\n },\n \"targeting\": {\n \"demographic\": {\n \"ageRange\": \"25-55\",\n \"locations\": [\n \"US\",\n \"CA\"\n ],\n \"languages\": [\n \"en\"\n ]\n },\n \"behavioral\": {\n \"interests\": [\n \"technology\",\n \"business\"\n ],\n \"actions\": [\n \"email_opened\",\n \"website_visited\"\n ]\n },\n \"firmographic\": {\n \"industries\": [\n \"technology\",\n \"finance\"\n ],\n \"companySize\": [\n \"tok_beladed_visa\"\n ],\n \"revenue\": \"$10M+\"\n }\n },\n \"automation\": {\n \"autoRefresh\": true,\n \"refreshFrequency\": \"daily\",\n \"triggers\": [\n \"contact_updated\",\n \"activity_recorded\"\n ]\n },\n \"tags\": [\n \"enterprise\",\n \"high-value\"\n ]\n}", System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();var request = URLRequest(url: URL(string: "https://api.beladed.dev/api/marketing/segment/create")!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("BELADED_SECRET_KEY", forHTTPHeaderField: "X-Beladed-API-Key")
request.httpBody = "{\n \"workspaceId\": \"id_demo_001\",\n \"name\": \"High-Value Enterprise Leads\",\n \"description\": \"Contacts from enterprise companies with high lead scores and active engagement\",\n \"type\": \"dynamic\",\n \"category\": \"lead_scoring\",\n \"status\": \"active\",\n \"criteria\": {\n \"conditions\": [\n {\n \"field\": \"leadScore\",\n \"operator\": \"greater_than\",\n \"value\": 80\n },\n {\n \"field\": \"company.size\",\n \"operator\": \"in\",\n \"value\": [\n \"enterprise\",\n \"large\"\n ]\n }\n ],\n \"logic\": \"AND\"\n },\n \"targeting\": {\n \"demographic\": {\n \"ageRange\": \"25-55\",\n \"locations\": [\n \"US\",\n \"CA\"\n ],\n \"languages\": [\n \"en\"\n ]\n },\n \"behavioral\": {\n \"interests\": [\n \"technology\",\n \"business\"\n ],\n \"actions\": [\n \"email_opened\",\n \"website_visited\"\n ]\n },\n \"firmographic\": {\n \"industries\": [\n \"technology\",\n \"finance\"\n ],\n \"companySize\": [\n \"tok_beladed_visa\"\n ],\n \"revenue\": \"$10M+\"\n }\n },\n \"automation\": {\n \"autoRefresh\": true,\n \"refreshFrequency\": \"daily\",\n \"triggers\": [\n \"contact_updated\",\n \"activity_recorded\"\n ]\n },\n \"tags\": [\n \"enterprise\",\n \"high-value\"\n ]\n}".data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)val request = okhttp3.Request.Builder()
.url("https://api.beladed.dev/api/marketing/segment/create")
.addHeader("Accept", "application/json")
.addHeader("Content-Type", "application/json")
.addHeader("X-Beladed-API-Key", "BELADED_SECRET_KEY")
.method("POST", okhttp3.RequestBody.create(okhttp3.MediaType.get("application/json"), "{\n \"workspaceId\": \"id_demo_001\",\n \"name\": \"High-Value Enterprise Leads\",\n \"description\": \"Contacts from enterprise companies with high lead scores and active engagement\",\n \"type\": \"dynamic\",\n \"category\": \"lead_scoring\",\n \"status\": \"active\",\n \"criteria\": {\n \"conditions\": [\n {\n \"field\": \"leadScore\",\n \"operator\": \"greater_than\",\n \"value\": 80\n },\n {\n \"field\": \"company.size\",\n \"operator\": \"in\",\n \"value\": [\n \"enterprise\",\n \"large\"\n ]\n }\n ],\n \"logic\": \"AND\"\n },\n \"targeting\": {\n \"demographic\": {\n \"ageRange\": \"25-55\",\n \"locations\": [\n \"US\",\n \"CA\"\n ],\n \"languages\": [\n \"en\"\n ]\n },\n \"behavioral\": {\n \"interests\": [\n \"technology\",\n \"business\"\n ],\n \"actions\": [\n \"email_opened\",\n \"website_visited\"\n ]\n },\n \"firmographic\": {\n \"industries\": [\n \"technology\",\n \"finance\"\n ],\n \"companySize\": [\n \"tok_beladed_visa\"\n ],\n \"revenue\": \"$10M+\"\n }\n },\n \"automation\": {\n \"autoRefresh\": true,\n \"refreshFrequency\": \"daily\",\n \"triggers\": [\n \"contact_updated\",\n \"activity_recorded\"\n ]\n },\n \"tags\": [\n \"enterprise\",\n \"high-value\"\n ]\n}"))
.build()
val response = okhttp3.OkHttpClient().newCall(request).execute()
This operation has no documented parameters.
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"category": {
"type": "string"
},
"status": {
"type": "string"
},
"criteria": {
"type": "object",
"properties": {
"conditions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"operator": {
"type": "string"
},
"value": {
"type": "integer"
}
}
}
},
"logic": {
"type": "string"
}
}
},
"targeting": {
"type": "object",
"properties": {
"demographic": {
"type": "object",
"properties": {
"ageRange": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "string"
}
},
"languages": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"behavioral": {
"type": "object",
"properties": {
"interests": {
"type": "array",
"items": {
"type": "string"
}
},
"actions": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"firmographic": {
"type": "object",
"properties": {
"industries": {
"type": "array",
"items": {
"type": "string"
}
},
"companySize": {
"type": "array",
"items": {
"type": "string"
}
},
"revenue": {
"type": "string"
}
}
}
}
},
"automation": {
"type": "object",
"properties": {
"autoRefresh": {
"type": "boolean"
},
"refreshFrequency": {
"type": "string"
},
"triggers": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
}{
"workspaceId": "id_demo_001",
"name": "High-Value Enterprise Leads",
"description": "Contacts from enterprise companies with high lead scores and active engagement",
"type": "dynamic",
"category": "lead_scoring",
"status": "active",
"criteria": {
"conditions": [
{
"field": "leadScore",
"operator": "greater_than",
"value": 80
},
{
"field": "company.size",
"operator": "in",
"value": [
"enterprise",
"large"
]
}
],
"logic": "AND"
},
"targeting": {
"demographic": {
"ageRange": "25-55",
"locations": [
"US",
"CA"
],
"languages": [
"en"
]
},
"behavioral": {
"interests": [
"technology",
"business"
],
"actions": [
"email_opened",
"website_visited"
]
},
"firmographic": {
"industries": [
"technology",
"finance"
],
"companySize": [
"tok_beladed_visa"
],
"revenue": "$10M+"
}
},
"automation": {
"autoRefresh": true,
"refreshFrequency": "daily",
"triggers": [
"contact_updated",
"activity_recorded"
]
},
"tags": [
"enterprise",
"high-value"
]
}
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"requestId": {
"type": "string"
}
}
}{
"data": {
"id": "id_demo_001",
"status": "available"
},
"requestId": "req_demo_001"
}
invalid_requestThe request did not satisfy the documented contract.
authentication_requiredThe credential is missing or invalid.
not_authorizedThe account, product scope, permission, or origin is not eligible.
not_foundThe requested public or account-owned resource was not found.
rate_limitedRetry after the current product limit resets.
This operation is published from reviewed repository contracts. Source metadata is included for traceability without exposing internal implementation details.