Skip to content

Search Profile Creation

Create a reusable search profile before you place a discovery or enrichment order. The profile describes what to look for; the order asks OpenProspect to deliver briefings from that profile.

Flow

  1. Create the request with POST /api/v1/search-profile-creations.
  2. Poll GET /api/v1/search-profile-creations/{profile_creation_id}.
  3. Save the returned profile_id when the status is SUCCEEDED.

Both endpoints use API-key bearer authentication.

Endpoint Scope
POST /api/v1/search-profile-creations orders:write
GET /api/v1/search-profile-creations/{profile_creation_id} orders:read

POST /api/v1/search-profile-creations requires Idempotency-Key. Reuse a key only with the same request body.

Create a Profile

curl -sS -X POST "https://api.openprospect.io/api/v1/search-profile-creations" \
  -H "Authorization: Bearer ${OPENPROSPECT_API_KEY}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: profile-create-dach-saas-001" \
  -d '{
    "profile_name": "DACH SaaS buyers",
    "ideal_customer_profile": "B2B SaaS companies in DACH with 50-500 employees",
    "seller_offering": "Lead generation and enrichment software",
    "seller_industry": "Software",
    "target_countries": ["DE", "AT", "CH"],
    "target_cities": ["Berlin", "Munich", "Vienna"],
    "target_industries": ["Software"],
    "excluded_industries": ["Consulting"],
    "contact_roles": ["Head of Sales", "RevOps Lead"],
    "output_language": "en"
  }'
import os

import httpx

response = httpx.post(
    "https://api.openprospect.io/api/v1/search-profile-creations",
    headers={
        "Authorization": f"Bearer {os.environ['OPENPROSPECT_API_KEY']}",
        "Idempotency-Key": "profile-create-dach-saas-001",
    },
    json={
        "profile_name": "DACH SaaS buyers",
        "ideal_customer_profile": "B2B SaaS companies in DACH with 50-500 employees",
        "seller_offering": "Lead generation and enrichment software",
        "seller_industry": "Software",
        "target_countries": ["DE", "AT", "CH"],
        "target_cities": ["Berlin", "Munich", "Vienna"],
        "target_industries": ["Software"],
        "excluded_industries": ["Consulting"],
        "contact_roles": ["Head of Sales", "RevOps Lead"],
        "output_language": "en",
    },
    timeout=30.0,
)
response.raise_for_status()
print(response.json()["profile_creation_id"])
const response = await fetch("https://api.openprospect.io/api/v1/search-profile-creations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPENPROSPECT_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": "profile-create-dach-saas-001",
  },
  body: JSON.stringify({
    profile_name: "DACH SaaS buyers",
    ideal_customer_profile: "B2B SaaS companies in DACH with 50-500 employees",
    seller_offering: "Lead generation and enrichment software",
    seller_industry: "Software",
    target_countries: ["DE", "AT", "CH"],
    target_cities: ["Berlin", "Munich", "Vienna"],
    target_industries: ["Software"],
    excluded_industries: ["Consulting"],
    contact_roles: ["Head of Sales", "RevOps Lead"],
    output_language: "en",
  }),
});

if (!response.ok) {
  throw new Error(`Profile creation failed: ${response.status} ${await response.text()}`);
}

console.log((await response.json()).profile_creation_id);
interface CreateSearchProfileResponse {
  profile_creation_id: string;
  status: "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED";
  profile_id: string | null;
  error_code: string | null;
  error_message: string | null;
}

const response = await fetch("https://api.openprospect.io/api/v1/search-profile-creations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPENPROSPECT_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": "profile-create-dach-saas-001",
  },
  body: JSON.stringify({
    profile_name: "DACH SaaS buyers",
    ideal_customer_profile: "B2B SaaS companies in DACH with 50-500 employees",
    target_countries: ["DE", "AT", "CH"],
    output_language: "en",
  }),
});

if (!response.ok) {
  throw new Error(`Profile creation failed: ${response.status} ${await response.text()}`);
}

const request = (await response.json()) as CreateSearchProfileResponse;
console.log(request.profile_creation_id);
using System.Net.Http.Headers;
using System.Net.Http.Json;

var apiKey = Environment.GetEnvironmentVariable("OPENPROSPECT_API_KEY")
    ?? throw new InvalidOperationException("OPENPROSPECT_API_KEY is not set.");

using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
client.DefaultRequestHeaders.Add("Idempotency-Key", "profile-create-dach-saas-001");

var response = await client.PostAsJsonAsync(
    "https://api.openprospect.io/api/v1/search-profile-creations",
    new
    {
        profile_name = "DACH SaaS buyers",
        ideal_customer_profile = "B2B SaaS companies in DACH with 50-500 employees",
        seller_offering = "Lead generation and enrichment software",
        target_countries = new[] { "DE", "AT", "CH" },
        output_language = "en"
    });
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Expected 202 Accepted response:

{
  "profile_creation_id": "f7a5a926-4d42-4e30-9f40-61e5da52f7aa",
  "status": "PENDING",
  "profile_id": null,
  "error_code": null,
  "error_message": null,
  "created_at": "2026-06-29T10:00:00Z",
  "started_at": null,
  "finished_at": null,
  "message": "Search profile creation accepted. Poll this resource for status."
}

Save profile_creation_id as OPENPROSPECT_PROFILE_CREATION_ID.

Poll the Profile

Poll until the status is SUCCEEDED or FAILED.

curl -sS \
  "https://api.openprospect.io/api/v1/search-profile-creations/${OPENPROSPECT_PROFILE_CREATION_ID}" \
  -H "Authorization: Bearer ${OPENPROSPECT_API_KEY}"
import os
import time

import httpx

while True:
    response = httpx.get(
        (
            "https://api.openprospect.io/api/v1/search-profile-creations/"
            f"{os.environ['OPENPROSPECT_PROFILE_CREATION_ID']}"
        ),
        headers={"Authorization": f"Bearer {os.environ['OPENPROSPECT_API_KEY']}"},
        timeout=30.0,
    )
    response.raise_for_status()
    data = response.json()
    if data["status"] in {"SUCCEEDED", "FAILED"}:
        print(data)
        break
    time.sleep(2)
while (true) {
  const response = await fetch(
    `https://api.openprospect.io/api/v1/search-profile-creations/${process.env.OPENPROSPECT_PROFILE_CREATION_ID}`,
    { headers: { Authorization: `Bearer ${process.env.OPENPROSPECT_API_KEY}` } },
  );

  if (!response.ok) {
    throw new Error(`Profile status failed: ${response.status} ${await response.text()}`);
  }

  const data = await response.json();
  if (["SUCCEEDED", "FAILED"].includes(data.status)) {
    console.log(data);
    break;
  }
  await new Promise((resolve) => setTimeout(resolve, 2000));
}
interface SearchProfileStatus {
  status: "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED";
  profile_id: string | null;
  error_code: string | null;
  error_message: string | null;
}

while (true) {
  const response = await fetch(
    `https://api.openprospect.io/api/v1/search-profile-creations/${process.env.OPENPROSPECT_PROFILE_CREATION_ID}`,
    { headers: { Authorization: `Bearer ${process.env.OPENPROSPECT_API_KEY}` } },
  );

  if (!response.ok) {
    throw new Error(`Profile status failed: ${response.status} ${await response.text()}`);
  }

  const data = (await response.json()) as SearchProfileStatus;
  if (data.status === "SUCCEEDED" || data.status === "FAILED") {
    console.log(data.profile_id);
    break;
  }
  await new Promise((resolve) => setTimeout(resolve, 2000));
}
using System.Net.Http.Headers;

var apiKey = Environment.GetEnvironmentVariable("OPENPROSPECT_API_KEY")
    ?? throw new InvalidOperationException("OPENPROSPECT_API_KEY is not set.");
var requestId = Environment.GetEnvironmentVariable("OPENPROSPECT_PROFILE_CREATION_ID")
    ?? throw new InvalidOperationException("OPENPROSPECT_PROFILE_CREATION_ID is not set.");

using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);

while (true)
{
    var response = await client.GetAsync(
        $"https://api.openprospect.io/api/v1/search-profile-creations/{requestId}");
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    if (body.Contains("\"SUCCEEDED\"") || body.Contains("\"FAILED\""))
    {
        Console.WriteLine(body);
        break;
    }
    await Task.Delay(TimeSpan.FromSeconds(2));
}

Successful terminal response:

{
  "profile_creation_id": "f7a5a926-4d42-4e30-9f40-61e5da52f7aa",
  "status": "SUCCEEDED",
  "profile_id": "9a59f498-ec55-4e6c-a90a-d8d54ad1207e",
  "error_code": null,
  "error_message": null,
  "created_at": "2026-06-29T10:00:00Z",
  "started_at": "2026-06-29T10:00:02Z",
  "finished_at": "2026-06-29T10:00:19Z"
}

Save profile_id as OPENPROSPECT_PROFILE_ID.

Status Values

Status Meaning What to do
PENDING The request is accepted and waiting Poll again
RUNNING OpenProspect is generating the profile Poll again
SUCCEEDED The profile is ready Create an order
FAILED Profile creation did not finish Retry with a new idempotency key

Validation Rules

  • profile_name, ideal_customer_profile, and target_countries are required.
  • target_countries must contain at least one value.
  • output_language defaults to en.
  • company_size_min and company_size_max must be positive when provided.
  • OpenProspect chooses the sourcing strategy during fulfillment.

Errors

Status Cause Resolution
401 Missing or invalid API key Send Authorization: Bearer lnc_live_...
403 Missing orders:write or orders:read Add the required scope
409 Reused Idempotency-Key with a different body Retry with a new key
422 Invalid request body or missing idempotency header Correct the request