Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.partneros.ai/llms.txt

Use this file to discover all available pages before exploring further.

The PartnerOS AI API exposes the same generation pipelines that power the strategy wizard and partner intelligence features in the web application. You can generate and stream an Ideal Customer Profile (ICP), an Ideal Partner Profile (IPP), partner type recommendations grounded in your knowledge base, and executive summary reports for your entire partner ecosystem. A conversational chat endpoint lets you build assistants that answer questions in the context of your PartnerOS data. Most AI endpoints stream their responses as plain text in the AI SDK streaming protocol. A few endpoints return non-streaming JSON or use Server-Sent Events. Each endpoint is marked clearly below. All endpoints require authentication and are subject to your organization’s AI quota.
AI generation endpoints are quota-gated. If your organization has exhausted its AI quota, requests return 402 Payment Required. Contact PartnerOS support to review your plan.

Generate an ICP (streaming)

Generates an Ideal Customer Profile for a company domain. The response is a streaming plain-text payload. Parse the stream incrementally to display results as they arrive. POST /api/ai/icp

Body parameters

company
string
required
Company name or domain to generate an ICP for (e.g. "acmecorp.com" or "Acme Corp"). Must be a non-empty string.

Streaming response

The response body is a streamed plain-text payload. Consume it with the @ai-sdk/react useObject hook or by reading the response body as a stream and parsing each line. The fully assembled payload is a JSON object matching the ICPResult schema:
industry
string
Target customer industry vertical.
verticals
string[]
Sub-verticals within the industry.
companySize
string
Target company size range (e.g. "100-500 employees").
revenue
string
Target company revenue range.
geographies
string[]
Target geographic markets.
goals
string[]
Business goals of the ideal customer.
businessImplications
string[]
Business implications of not solving the problem.
buyingIntentSignals
string[]
Signals that indicate a company is ready to buy.
techStack
string[]
Technologies commonly used by the ideal customer.
painPoints
string[]
Key pain points the ideal customer experiences.
personas
object[]
Array of buying personas within the target company. Each object has a role (job title) and description (goals and concerns).

Example

curl --request POST \
  --url "https://app.partneros.com/api/ai/icp" \
  --header "Content-Type: application/json" \
  --header "Cookie: session_token=<your-session-token>" \
  --data '{ "company": "acmecorp.com" }'
The ICP generation result is cached by domain for the duration of a session. Repeated calls with the same domain value return a cached stream, avoiding redundant LLM calls.

Generate an IPP (streaming)

Generates an Ideal Partner Profile based on a previously generated ICP. The IPP describes the characteristics of partner organizations best positioned to co-sell, co-market, or deliver services to your ideal customer. The response streams in the AI SDK text stream format. POST /api/ai/ipp

Body parameters

icp
object
required
A complete ICPResult object. Pass the assembled ICP output from POST /api/ai/icp directly.
domain
string
Your company’s domain. When omitted, the server derives the domain from your session email address.

Streaming response

The streamed payload assembles to an IPPResult JSON object:
partnerTypes
string[]
Recommended partner type categories (e.g. "System Integrators", "ISVs").
customerSegments
string[]
Customer segments the ideal partner typically serves.
customerVerticals
string[]
Industry verticals the ideal partner operates in.
geographies
string[]
Geographic markets where the ideal partner has reach.
technicalCapabilities
string[]
Technical skills or platform expertise the partner should have.
partnerGoals
string[]
What the ideal partner is trying to achieve through the partnership.

Example

curl --request POST \
  --url "https://app.partneros.com/api/ai/ipp" \
  --header "Content-Type: application/json" \
  --header "Cookie: session_token=<your-session-token>" \
  --data '{
    "icp": {
      "industry": "Enterprise SaaS",
      "verticals": ["HR Tech"],
      "companySize": "200-2000 employees",
      "revenue": "$20M-$500M",
      "geographies": ["North America"],
      "goals": ["Reduce employee churn"],
      "businessImplications": ["High cost of manual HR processes"],
      "buyingIntentSignals": ["Hiring for HR transformation roles"],
      "techStack": ["Workday", "Salesforce"],
      "painPoints": ["Fragmented HR data"],
      "personas": [{ "role": "CPO", "description": "Owns workforce strategy." }]
    },
    "domain": "yourcompany.com"
  }'

Generate partner type recommendations (streaming)

Generates scored partner type recommendations grounded in your organization’s ICP, IPP, and knowledge base. The ICP and IPP must exist in your organization’s strategy cache (generated during onboarding or regenerated via the strategy section). Returns a text stream that assembles to a PartnerTypeResult JSON object. POST /api/ai/strategy/partner-types

Body parameters

namespace
string
default:"production"
Knowledge base namespace to use for retrieval grounding. Use "staging" for non-production testing.

Streaming response

partnerTypes
object[]
required
Array of scored partner type recommendations, ordered by score descending.

Example

curl --request POST \
  --url "https://app.partneros.com/api/ai/strategy/partner-types" \
  --header "Content-Type: application/json" \
  --header "Cookie: session_token=<your-session-token>" \
  --data '{ "namespace": "production" }'
This endpoint returns 422 Unprocessable Entity if no ICP or IPP is found for your organization. Complete the strategy onboarding in the PartnerOS web app first.

Generate partner suggestions (streaming)

Generates partner company suggestions grounded in your knowledge base, tailored to a specific prospect’s company name, industry, and pain points. Useful for building “recommended partners” features or prospect-facing match tools. POST /api/ai/partner-suggestions

Body parameters

company_name
string
Name of the prospect company you are seeking partners for.
industry
string
Industry of the prospect company.
pain_points
string[]
Array of known pain points the prospect is experiencing.
namespace
string
default:"production"
Knowledge base namespace. Use "staging" for non-production environments.

Streaming response

The streamed plain-text payload assembles to a JSON array of partner suggestion objects. Each object describes a recommended partner type and rationale grounded in your knowledge base content.

Example

curl --request POST \
  --url "https://app.partneros.com/api/ai/partner-suggestions" \
  --header "Content-Type: application/json" \
  --header "Cookie: session_token=<your-session-token>" \
  --data '{
    "company_name": "Bright Logistics Inc",
    "industry": "Supply Chain & Logistics",
    "pain_points": [
      "Manual shipment tracking",
      "No real-time carrier visibility",
      "Disconnected warehouse management"
    ],
    "namespace": "production"
  }'

Generate an executive summary (async)

Enqueues an AI-generated executive summary or review report for your partner ecosystem. The report is generated asynchronously by a background worker. This endpoint returns immediately with a reportId and HTTP 202 so you can begin polling the SSE stream for progress. POST /api/ai/strategy/executive-summary/generate

Body parameters

orgName
string
required
Your organization’s display name, used in the generated report.
domain
string
required
Your organization’s domain, used for context grounding.
reportType
string
default:"executive-summary"
Type of report to generate. One of "executive-summary", "annual-review", or "quarterly-review".
filters
object
Optional partner filter criteria to scope the report to a subset of your partner ecosystem.
filterFingerprint
string
Optional fingerprint string identifying the filter combination. Used for deduplication.

Response fields

reportId
string
required
UUID of the executive summary report row. Use this with the SSE stream endpoint to monitor progress.
jobId
string
Background job ID. May be null if a generation job was already in flight.
status
string
required
Initial status: "running" when enqueued, or "running" with inFlight: true when an existing job was already active.
inFlight
boolean
true when an existing in-flight job was returned rather than a new one being enqueued. The reportId in this case is the active job’s report.

Example

curl --request POST \
  --url "https://app.partneros.com/api/ai/strategy/executive-summary/generate" \
  --header "Content-Type: application/json" \
  --header "Cookie: session_token=<your-session-token>" \
  --data '{
    "orgName": "Acme Corp",
    "domain": "acmecorp.com",
    "reportType": "quarterly-review",
    "filters": {
      "partnerTypes": ["System Integrators & VARs", "ISV & Technology Alliances"],
      "regions": ["North America"]
    }
  }'

Stream executive summary progress (SSE)

Opens a Server-Sent Events stream that pushes real-time progress updates as the executive summary report is generated section by section. Connect to this endpoint immediately after receiving a reportId from the generate endpoint. GET /api/ai/strategy/executive-summary/stream

Query parameters

reportId
string
required
UUID of the executive summary report to stream, as returned by the generate endpoint.

SSE events

EventPayloadDescription
section.completed{ reportId, sectionId, payload, sectionGeneratedAt }Emitted each time a new report section (or an updated partial) is available.
job.completed{ reportId }Emitted when all sections are generated and the report status is "completed". Stream closes after this event.
job.failed{ reportId, errorMessage }Emitted if generation fails or the 5-minute hard timeout expires.
:hb(none)Heartbeat comment emitted every 15 seconds.

Example

curl --request GET \
  --url "https://app.partneros.com/api/ai/strategy/executive-summary/stream?reportId=rpt_01hx..." \
  --header "Accept: text/event-stream" \
  --header "Cookie: session_token=<your-session-token>"
The stream has a 5-minute hard timeout. If the background worker takes longer than 5 minutes (due to retries or queue delays), the stream emits job.failed with errorMessage: "stream-timeout". The worker may still complete in the background — check the report’s status after a short wait.

Chat with Nelson (streaming)

Sends a multi-turn conversation to Nelson, PartnerOS’s AI assistant, and streams the response in the UI message stream protocol. This format is compatible with the @ai-sdk/react useChat hook for building in-app chat interfaces. POST /api/ai/chat

Body parameters

messages
object[]
required
Array of conversation messages. Must contain at least one message.
currentRoute
string
The user’s current app route (e.g. "/partners"). Nelson uses this to provide context-aware answers when the user refers to “this page” or “where I am”.

Streaming response

The response body uses the UI message stream protocol. Consume it with useChat from @ai-sdk/react, or parse the stream manually using the standard data stream part format.
This endpoint uses the UI message stream protocol, not the plain text stream protocol. Do not attempt to parse it as raw JSON. If you are building a custom client, use the @ai-sdk/react useChat hook or parse each SSE data line according to the data stream part format.

Example

curl --request POST \
  --url "https://app.partneros.com/api/ai/chat" \
  --header "Content-Type: application/json" \
  --header "Cookie: session_token=<your-session-token>" \
  --data '{
    "messages": [
      {
        "role": "user",
        "content": "Which of my partners have the highest fit score this quarter?"
      }
    ],
    "currentRoute": "/partners"
  }'