> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opennous.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Set the ICP

> Set or replace the ICP from markdown. The first time, Nous translates the text into a scoring model with an LLM. Weights and rules you write are read as hints for that translation. An existing model is kept, and `model.status` is `exists`. On a workspace that uses its own scorer, the text is saved for agents to read, no model is built, and `model.status` is `external_scorer`.

Sets the ICP from markdown. Write who the buyer is and who is not a fit. The first time, OpenNous translates the text into a scoring model with an LLM, so [score](/public-api/score) works right away. Weights or rules you write are hints for that translation. The model itself is what scores.

Sending again replaces the text. An existing model is kept, and `model.status` is `exists`. To sharpen the model, [train it on closed deals](/public-api/icp/train).

If the workspace [uses its own scorer](/public-api/icp/scorer), the text is saved for agents to read and no model is built. `model.status` is `external_scorer`.


## OpenAPI

````yaml PUT /v2/icp
openapi: 3.1.0
info:
  title: OpenNous REST API
  version: 2.0.0
  description: >-
    Read and write the OpenNous revenue context graph over HTTP. Authenticate
    with a workspace API key.
servers:
  - url: https://api.opennous.cloud
    description: OpenNous Cloud
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: People
  - name: Accounts
  - name: Deals
  - name: Notes
  - name: Attention
  - name: Insights
  - name: Enrich & score
  - name: Organization
  - name: Workflows
  - name: Webhooks
    description: >-
      Subscribe to events and have them pushed to your own stack, with the
      account record attached.
  - name: Usage
paths:
  /v2/icp:
    put:
      tags:
        - Organization
      summary: Set the ICP
      description: >-
        Set or replace the ICP from markdown. The first time, Nous translates
        the text into a scoring model with an LLM. Weights and rules you write
        are read as hints for that translation. An existing model is kept, and
        `model.status` is `exists`. On a workspace that uses its own scorer, the
        text is saved for agents to read, no model is built, and `model.status`
        is `external_scorer`.
      operationId: setIcp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - body_md
              properties:
                body_md:
                  type: string
                file_path:
                  type: string
                  description: The repo file the ICP lives in, if any.
            example:
              body_md: |
                # ICP

                ## Buyer
                VP Sales or CRO at a B2B SaaS company with 50 to 500 employees.
              file_path: context/icp.md
      responses:
        '200':
          description: The saved ICP and the model result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  icp:
                    type:
                      - object
                      - 'null'
                    properties:
                      body_md:
                        type: string
                      title:
                        type:
                          - string
                          - 'null'
                      source:
                        type:
                          - string
                          - 'null'
                        enum:
                          - nous
                          - claude_code
                          - null
                      file_path:
                        type:
                          - string
                          - 'null'
                      version:
                        type:
                          - integer
                          - 'null'
                      synced_at:
                        type:
                          - string
                          - 'null'
                      updated_at:
                        type:
                          - string
                          - 'null'
                  model:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - created
                          - exists
                          - no_icp_memory
                          - translation_failed
                          - build_failed
                          - external_scorer
                      signals:
                        type: array
                        items:
                          type: object
              example:
                icp:
                  body_md: |-
                    # ICP
                    ...
                  title: ICP
                  source: claude_code
                  file_path: context/icp.md
                  version: 1
                  synced_at: null
                  updated_at: '2026-09-30T10:00:00Z'
                model:
                  status: created
                  signals: []
        '400':
          description: '`body_md` is missing or empty.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: body_md_required
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/UpgradeRequired'
        '403':
          $ref: '#/components/responses/ReadOnlyKey'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Error:
      type: object
      description: >-
        Every error response. `error` is a stable machine code. Some errors add
        fields such as `detail`, `supported`, `max`, or `reason`.
      required:
        - error
      properties:
        error:
          type: string
          description: Machine-readable error code.
        detail:
          type: string
          description: Human-readable explanation, when there is one.
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing, unknown, or expired API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: api_key_required
              value:
                error: api_key_required
            invalid:
              summary: invalid_api_key
              value:
                error: invalid_api_key
            expired:
              summary: api_key_expired
              value:
                error: api_key_expired
                detail: >-
                  This API key has expired. Create or rotate a key to get a
                  fresh one.
    UpgradeRequired:
      description: The workspace is past its monthly operations limit and grace window.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: upgrade_required
            reason: ops_limit_reached
            current_plan: starter
            upgrade_url: /settings?section=billing
    ReadOnlyKey:
      description: A read-only key called a write endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: read_only_key
            detail: >-
              This API key is read-only — it can read context but cannot record,
              modify, connect, or send. Use a read/write key for write
              operations.
    RateLimited:
      description: More than 600 requests in a minute on this key.
      headers:
        RateLimit-Limit:
          schema:
            type: integer
          description: Requests allowed per window.
        RateLimit-Remaining:
          schema:
            type: integer
          description: Requests left in the window.
        RateLimit-Reset:
          schema:
            type: integer
          description: Seconds until the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: rate_limited
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Workspace API key. Create one in **Settings → API keys**.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: The same key, sent as a header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.