Skip to main content
POST
/
api
/
v2
/
segment
/
generate
Generate Segments
curl --request POST \
  --url https://app.octavehq.com/api/v2/segment/generate \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '{
  "primaryOfferingOId": "o_123456",
  "linkingStrategy": {
    "mode": "ALL"
  },
  "segments": [
    {
      "name": "Enterprise Technology Companies",
      "sources": [
        {
          "type": "TEXT",
          "value": "Enterprise companies with 500+ employees in technology sector"
        }
      ]
    },
    {
      "sources": [
        {
          "type": "URL",
          "value": "https://example.com/market-research"
        }
      ]
    }
  ],
  "brandVoiceOId": "bv_123456"
}'
{
  "_metadata": {
    "usage": 0,
    "requestId": "requestId",
    "message": "message",
    "timestamp": "2021-01-01T00:00:00.000Z"
  },
  "data": [
    {
      "oId": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "deletedAt": "<string>",
      "archivedAt": "<string>",
      "name": "<string>",
      "internalName": "<string>",
      "description": "<string>",
      "active": true,
      "data": {
        "fitExplanation": "<string>",
        "firmographics": {},
        "keyPriorities": [
          "<string>"
        ],
        "keyConsiderations": [
          "<string>"
        ],
        "uniqueApproach": [
          "<string>"
        ],
        "customFields": [
          {
            "title": "<string>",
            "value": [
              "<string>"
            ]
          }
        ]
      },
      "qualifyingQuestions": [
        {
          "question": "<string>",
          "rationale": "<string>",
          "fitType": "GOOD",
          "weight": "MEDIUM",
          "archivedAt": "<string>"
        }
      ],
      "user": {
        "oId": "<string>",
        "firstName": "John",
        "lastName": "Doe"
      },
      "workspace": {
        "oId": "<string>"
      },
      "unrecognized": true,
      "rejected": true
    }
  ]
}

Authorizations

api_key
string
header
required

Body

application/json

Segment generation input with source materials

segments
object[]
required

Array of segment generation requests - each object generates one market segment

Minimum length: 1
Example:
[
{
"name": "Enterprise Technology Companies",
"sources": [
{
"type": "TEXT",
"value": "Enterprise companies with 500+ employees in technology sector"
}
]
},
{
"sources": [
{
"type": "URL",
"value": "https://example.com/market-research"
}
]
}
]
primaryOfferingOId
string

Primary Offering to use as context when generating segments. If not provided, the primary company attached to the Workspace will be used.

Example:

"o_123456"

linkingStrategy
object

Strategy for linking this persona to products/offerings Strategy for linking generated segments to products/offerings

  • Option 1
  • Option 2
brandVoiceOId
string

Brand voice oId to apply to generated segments

Example:

"bv_123456"

Response

Segments generated successfully

_metadata
object
required
data
object[]
required
I