Edit or confirm the company profile
Partial profile edits, the survey answer (heardFrom) and confirm, which starts the keyword proposal. 409 ONBOARDING_REVISION_CHANGED when ifRevision is stale.
curl --request PATCH \
--url https://app.octolens.com/api/v2/onboarding/draft/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draftId": "draft_k3v9x0q2m1",
"profile": {
"name": "<string>",
"description": "<string>",
"productAreas": [
{
"label": "<string>",
"path": "<string>"
}
],
"competitors": [
{
"name": "<string>",
"why": "<string>",
"domain": "<string>"
}
],
"ownAccounts": [
{
"handle": "<string>"
}
],
"protectedVocabulary": [
"<string>"
]
},
"heardFrom": "ai-tools:claude",
"confirm": true,
"ifRevision": "<string>"
}
'import requests
url = "https://app.octolens.com/api/v2/onboarding/draft/profile"
payload = {
"draftId": "draft_k3v9x0q2m1",
"profile": {
"name": "<string>",
"description": "<string>",
"productAreas": [
{
"label": "<string>",
"path": "<string>"
}
],
"competitors": [
{
"name": "<string>",
"why": "<string>",
"domain": "<string>"
}
],
"ownAccounts": [{ "handle": "<string>" }],
"protectedVocabulary": ["<string>"]
},
"heardFrom": "ai-tools:claude",
"confirm": True,
"ifRevision": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draftId: 'draft_k3v9x0q2m1',
profile: {
name: '<string>',
description: '<string>',
productAreas: [{label: '<string>', path: '<string>'}],
competitors: [{name: '<string>', why: '<string>', domain: '<string>'}],
ownAccounts: [{handle: '<string>'}],
protectedVocabulary: ['<string>']
},
heardFrom: 'ai-tools:claude',
confirm: true,
ifRevision: '<string>'
})
};
fetch('https://app.octolens.com/api/v2/onboarding/draft/profile', 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://app.octolens.com/api/v2/onboarding/draft/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'draftId' => 'draft_k3v9x0q2m1',
'profile' => [
'name' => '<string>',
'description' => '<string>',
'productAreas' => [
[
'label' => '<string>',
'path' => '<string>'
]
],
'competitors' => [
[
'name' => '<string>',
'why' => '<string>',
'domain' => '<string>'
]
],
'ownAccounts' => [
[
'handle' => '<string>'
]
],
'protectedVocabulary' => [
'<string>'
]
],
'heardFrom' => 'ai-tools:claude',
'confirm' => true,
'ifRevision' => '<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://app.octolens.com/api/v2/onboarding/draft/profile"
payload := strings.NewReader("{\n \"draftId\": \"draft_k3v9x0q2m1\",\n \"profile\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"productAreas\": [\n {\n \"label\": \"<string>\",\n \"path\": \"<string>\"\n }\n ],\n \"competitors\": [\n {\n \"name\": \"<string>\",\n \"why\": \"<string>\",\n \"domain\": \"<string>\"\n }\n ],\n \"ownAccounts\": [\n {\n \"handle\": \"<string>\"\n }\n ],\n \"protectedVocabulary\": [\n \"<string>\"\n ]\n },\n \"heardFrom\": \"ai-tools:claude\",\n \"confirm\": true,\n \"ifRevision\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.octolens.com/api/v2/onboarding/draft/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draftId\": \"draft_k3v9x0q2m1\",\n \"profile\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"productAreas\": [\n {\n \"label\": \"<string>\",\n \"path\": \"<string>\"\n }\n ],\n \"competitors\": [\n {\n \"name\": \"<string>\",\n \"why\": \"<string>\",\n \"domain\": \"<string>\"\n }\n ],\n \"ownAccounts\": [\n {\n \"handle\": \"<string>\"\n }\n ],\n \"protectedVocabulary\": [\n \"<string>\"\n ]\n },\n \"heardFrom\": \"ai-tools:claude\",\n \"confirm\": true,\n \"ifRevision\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octolens.com/api/v2/onboarding/draft/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draftId\": \"draft_k3v9x0q2m1\",\n \"profile\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"productAreas\": [\n {\n \"label\": \"<string>\",\n \"path\": \"<string>\"\n }\n ],\n \"competitors\": [\n {\n \"name\": \"<string>\",\n \"why\": \"<string>\",\n \"domain\": \"<string>\"\n }\n ],\n \"ownAccounts\": [\n {\n \"handle\": \"<string>\"\n }\n ],\n \"protectedVocabulary\": [\n \"<string>\"\n ]\n },\n \"heardFrom\": \"ai-tools:claude\",\n \"confirm\": true,\n \"ifRevision\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "draft_k3v9x0q2m1",
"domain": "<string>",
"status": "scanning",
"profile": {
"name": "<string>",
"description": "<string>",
"industry": "<string>",
"website": "<string>",
"domainVariants": [
"<string>"
],
"productAreas": [
{
"label": "<string>",
"path": "<string>"
}
],
"ownAccounts": [
{
"platform": "x",
"handle": "<string>"
}
],
"founderHandles": [
"<string>"
],
"protectedVocabulary": [
"<string>"
],
"competitors": [
{
"name": "<string>",
"why": "<string>",
"domain": "<string>"
}
],
"relevanceContext": "<string>",
"productUseCases": [
"<string>"
],
"companyMoat": "<string>"
},
"degraded": [
{
"code": "enrichment_failed",
"message": "<string>"
}
],
"scanSteps": [
{
"step": "cache",
"status": "pending",
"line": "<string>",
"ms": 4503599627370495
}
],
"cached": true,
"reused": true,
"skillVersion": "<string>",
"appliedOrganizationId": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}Authorizations
Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>. Keys carry a scope — read, write (implies read) or admin (implies write) — chosen when the key is minted. Each operation's security requirement (and its x-required-scope extension) names the minimum scope it needs; request the least-privileged key that covers the operations you call.
Body
The draft_… id. Optional on every onboarding route: defaults to the onboarding's current draft.
1 - 64"draft_k3v9x0q2m1"
Show child attributes
Show child attributes
The survey answer ("How did you hear about us?"), e.g. ai-tools:claude.
1 - 255"ai-tools:claude"
Confirm the profile: starts the proposal.
Refuse with 409 ONBOARDING_REVISION_CHANGED unless the state is still at this revision.
1 - 128Response
200 response
draft_… id.
"draft_k3v9x0q2m1"
Where the draft is in the setup engine. The scan moves scanning → scanned (or failed).
scanning, scanned, proposing, measuring, sampling, ready, needs_narrowing, failed, applied What the domain scan learned about the company. Every field the wizard renders is editable.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
True when the profile came from the domain cache.
True when an existing draft (same owner + domain, < 24 h) was returned.
ISO-8601.
Was this page helpful?
curl --request PATCH \
--url https://app.octolens.com/api/v2/onboarding/draft/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draftId": "draft_k3v9x0q2m1",
"profile": {
"name": "<string>",
"description": "<string>",
"productAreas": [
{
"label": "<string>",
"path": "<string>"
}
],
"competitors": [
{
"name": "<string>",
"why": "<string>",
"domain": "<string>"
}
],
"ownAccounts": [
{
"handle": "<string>"
}
],
"protectedVocabulary": [
"<string>"
]
},
"heardFrom": "ai-tools:claude",
"confirm": true,
"ifRevision": "<string>"
}
'import requests
url = "https://app.octolens.com/api/v2/onboarding/draft/profile"
payload = {
"draftId": "draft_k3v9x0q2m1",
"profile": {
"name": "<string>",
"description": "<string>",
"productAreas": [
{
"label": "<string>",
"path": "<string>"
}
],
"competitors": [
{
"name": "<string>",
"why": "<string>",
"domain": "<string>"
}
],
"ownAccounts": [{ "handle": "<string>" }],
"protectedVocabulary": ["<string>"]
},
"heardFrom": "ai-tools:claude",
"confirm": True,
"ifRevision": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draftId: 'draft_k3v9x0q2m1',
profile: {
name: '<string>',
description: '<string>',
productAreas: [{label: '<string>', path: '<string>'}],
competitors: [{name: '<string>', why: '<string>', domain: '<string>'}],
ownAccounts: [{handle: '<string>'}],
protectedVocabulary: ['<string>']
},
heardFrom: 'ai-tools:claude',
confirm: true,
ifRevision: '<string>'
})
};
fetch('https://app.octolens.com/api/v2/onboarding/draft/profile', 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://app.octolens.com/api/v2/onboarding/draft/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'draftId' => 'draft_k3v9x0q2m1',
'profile' => [
'name' => '<string>',
'description' => '<string>',
'productAreas' => [
[
'label' => '<string>',
'path' => '<string>'
]
],
'competitors' => [
[
'name' => '<string>',
'why' => '<string>',
'domain' => '<string>'
]
],
'ownAccounts' => [
[
'handle' => '<string>'
]
],
'protectedVocabulary' => [
'<string>'
]
],
'heardFrom' => 'ai-tools:claude',
'confirm' => true,
'ifRevision' => '<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://app.octolens.com/api/v2/onboarding/draft/profile"
payload := strings.NewReader("{\n \"draftId\": \"draft_k3v9x0q2m1\",\n \"profile\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"productAreas\": [\n {\n \"label\": \"<string>\",\n \"path\": \"<string>\"\n }\n ],\n \"competitors\": [\n {\n \"name\": \"<string>\",\n \"why\": \"<string>\",\n \"domain\": \"<string>\"\n }\n ],\n \"ownAccounts\": [\n {\n \"handle\": \"<string>\"\n }\n ],\n \"protectedVocabulary\": [\n \"<string>\"\n ]\n },\n \"heardFrom\": \"ai-tools:claude\",\n \"confirm\": true,\n \"ifRevision\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.octolens.com/api/v2/onboarding/draft/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draftId\": \"draft_k3v9x0q2m1\",\n \"profile\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"productAreas\": [\n {\n \"label\": \"<string>\",\n \"path\": \"<string>\"\n }\n ],\n \"competitors\": [\n {\n \"name\": \"<string>\",\n \"why\": \"<string>\",\n \"domain\": \"<string>\"\n }\n ],\n \"ownAccounts\": [\n {\n \"handle\": \"<string>\"\n }\n ],\n \"protectedVocabulary\": [\n \"<string>\"\n ]\n },\n \"heardFrom\": \"ai-tools:claude\",\n \"confirm\": true,\n \"ifRevision\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octolens.com/api/v2/onboarding/draft/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draftId\": \"draft_k3v9x0q2m1\",\n \"profile\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"productAreas\": [\n {\n \"label\": \"<string>\",\n \"path\": \"<string>\"\n }\n ],\n \"competitors\": [\n {\n \"name\": \"<string>\",\n \"why\": \"<string>\",\n \"domain\": \"<string>\"\n }\n ],\n \"ownAccounts\": [\n {\n \"handle\": \"<string>\"\n }\n ],\n \"protectedVocabulary\": [\n \"<string>\"\n ]\n },\n \"heardFrom\": \"ai-tools:claude\",\n \"confirm\": true,\n \"ifRevision\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "draft_k3v9x0q2m1",
"domain": "<string>",
"status": "scanning",
"profile": {
"name": "<string>",
"description": "<string>",
"industry": "<string>",
"website": "<string>",
"domainVariants": [
"<string>"
],
"productAreas": [
{
"label": "<string>",
"path": "<string>"
}
],
"ownAccounts": [
{
"platform": "x",
"handle": "<string>"
}
],
"founderHandles": [
"<string>"
],
"protectedVocabulary": [
"<string>"
],
"competitors": [
{
"name": "<string>",
"why": "<string>",
"domain": "<string>"
}
],
"relevanceContext": "<string>",
"productUseCases": [
"<string>"
],
"companyMoat": "<string>"
},
"degraded": [
{
"code": "enrichment_failed",
"message": "<string>"
}
],
"scanSteps": [
{
"step": "cache",
"status": "pending",
"line": "<string>",
"ms": 4503599627370495
}
],
"cached": true,
"reused": true,
"skillVersion": "<string>",
"appliedOrganizationId": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}