---
title: "Update a saved agent"
method: PATCH
path: "/table-enrichments/saved-agents/{saved_agent_id}/"
tags: ["table-enrichments"]
---

# Update a saved agent

`PATCH /table-enrichments/saved-agents/{saved_agent_id}/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/table-enrichments/saved-agents/{saved_agent_id}/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Partially update a saved agent. Columns pointing at it pick the change up on their next run. `favorite` stars or unstars it for the person asking alone, and is refused from an API key.

## Path parameters

- `saved_agent_id` string, uuid, required

## Request body

- SavedAgentUpdateSchema: A partial saved-agent update; absent fields keep their value.
  - `allow_fetch` boolean, nullable
  - `allow_find_email` boolean, nullable: Switch the work-email tool on or off; switching it on is refused when the supplier is not available to this organisation.
  - `allow_linkedin_profile` boolean, nullable: Switch the LinkedIn-profile tool on or off; switching it on is refused when the supplier is not available to this organisation.
  - `allow_search` boolean, nullable
  - `description` string, nullable
  - `effort` 'low' | 'standard' | 'high': How hard the Agent works on each row. Named levels rather than raw step counts: the level is the user-facing contract, and what each level buys (step and page budgets) is a product decision the loop maps internally. Re-tuning budgets never invalidates stored columns.
  - `favorite` boolean, nullable: Star the agent for the person asking, or unstar it. A star is one person's own and never versions; refused from an API key, which has no person.
  - `granted_verbs` string[], nullable: The workspace actions the agent may apply without asking, as verb keys (see GET /assistant/verbs/). Send null to fall back to the workspace defaults; an empty list switches every action off. A send is refused. The agent's table runs take an allowed action themselves, without a card.
  - `icon` string, nullable
  - `inputs` AgentInputSchema[], nullable
    - `id` string, uuid, required
    - `name` string, required
  - `model_key` string, nullable
  - `name` string, nullable
  - `output_schema` union
    - EnrichmentOutputFieldsInput: The fields-mode output shape: repeatable named typed fields. The default is Clay's: one text field named ``response``.
      - `fields` EnrichmentOutputField[]
        - `choices` string[], nullable: The fixed option list for a select field; None elsewhere.
        - `description` string, nullable: Shown to the model: what this field should contain.
        - `field_type` 'text' | 'paragraph' | 'url' | 'email' | 'image_url' | 'person' | 'select' | 'number' | 'decimal' | 'currency' | 'checkbox' | 'date' | 'multi_select' | 'list' | 'object': The type a user picks for a table column. Ordered as the picker shows them, which is also the order the groups below run in: text-ish, then numeric, then choice, then structured.
        - `name` string, required
      - `mode` 'fields'
    - EnrichmentOutputRawSchema: The advanced output shape: a raw strict-mode JSON schema, verbatim. Held to every strict-mode constraint at SAVE time by the service layer. The shape is stored exactly as authored, and validation failures name the exact violated rule rather than surfacing at run time.
      - `json_schema` object, required: A strict-mode JSON schema with an object root.
      - `mode` 'json_schema'
  - `prompt` AgentPromptTemplateInput: A saved agent's prompt: literal text with references between the runs. The same convention every other stored prompt in the product uses (``EnrichmentPromptTemplate`` for columns, template segments for sequences): identity-keyed segments, so renaming what a reference points at never rewrites the prompt. Structurally parallel to the enrichment template rather than importing it: an agent prompt references INPUTS, an enrichment prompt references COLUMNS, and the import hierarchy keeps the two domains apart.
    - `segments` union[]
      - union
        - AgentPromptTextSegment: A literal run of prompt text.
          - `text` string, required
          - `type` 'text'
        - AgentPromptInputRefSegment: A reference to one declared input, resolved per row at run time.
          - `input_id` string, uuid, required
          - `type` 'input_ref'
        - AgentPromptContextRefSegment: A reference to the org's business context, resolved per org.
          - `section` 'all' | 'company' | 'icp' | 'personas' | 'signals' | 'social_proof': One section of the org's AI business context a prompt can reference. ``ALL`` is the whole context document; the rest are its named sections.
          - `type` 'context_ref'
  - `use_business_context` boolean, nullable
  - `use_row_context` boolean, nullable

## Response `200`

Successful Response

- SavedAgentReadSchema: One org-level saved agent as the editor, picker and library render it.
  - `allow_fetch` boolean, required
  - `allow_find_email` boolean: Whether a run may buy a work email from the product's data suppliers while it researches, paid from the run's research budget.
  - `allow_linkedin_profile` boolean: Whether a run may read a LinkedIn profile through the product's data suppliers while it researches, paid from the run's research budget.
  - `allow_search` boolean, required
  - `created_at` string, date-time, required
  - `current_version` integer, required
  - `description` string, nullable, required
  - `effort` 'low' | 'standard' | 'high', required: How hard the Agent works on each row. Named levels rather than raw step counts: the level is the user-facing contract, and what each level buys (step and page budgets) is a product decision the loop maps internally. Re-tuning budgets never invalidates stored columns.
  - `favorite` boolean, required: Whether the person asking starred this agent. A star is one person's own, so a teammate's list differs; always false for an API key.
  - `granted_verbs` string[], nullable: The workspace actions this agent may apply without asking, as verb keys (see GET /assistant/verbs/). Null means the workspace defaults apply. The agent's table runs take an allowed action themselves, without a card.
  - `icon` string, nullable, required
  - `id` string, uuid, required
  - `inputs` AgentInputSchema[], required
    - `id` string, uuid, required
    - `name` string, required
  - `is_template` boolean
  - `last_viewed_at` string, date-time, nullable: When the person asking last opened this agent; null when they never have, and always for an API key.
  - `model_key` string, nullable, required
  - `name` string, required
  - `output_schema` union, required
    - EnrichmentOutputFieldsOutput: The fields-mode output shape: repeatable named typed fields. The default is Clay's: one text field named ``response``.
      - `fields` EnrichmentOutputField[]
        - `choices` string[], nullable: The fixed option list for a select field; None elsewhere.
        - `description` string, nullable: Shown to the model: what this field should contain.
        - `field_type` 'text' | 'paragraph' | 'url' | 'email' | 'image_url' | 'person' | 'select' | 'number' | 'decimal' | 'currency' | 'checkbox' | 'date' | 'multi_select' | 'list' | 'object': The type a user picks for a table column. Ordered as the picker shows them, which is also the order the groups below run in: text-ish, then numeric, then choice, then structured.
        - `name` string, required
      - `mode` 'fields'
    - EnrichmentOutputRawSchema: The advanced output shape: a raw strict-mode JSON schema, verbatim. Held to every strict-mode constraint at SAVE time by the service layer. The shape is stored exactly as authored, and validation failures name the exact violated rule rather than surfacing at run time.
      - `json_schema` object, required: A strict-mode JSON schema with an object root.
      - `mode` 'json_schema'
  - `owner_display_name` string, nullable
  - `owner_user_id` string, nullable, required
  - `prompt` AgentPromptTemplateOutput, required: A saved agent's prompt: literal text with references between the runs. The same convention every other stored prompt in the product uses (``EnrichmentPromptTemplate`` for columns, template segments for sequences): identity-keyed segments, so renaming what a reference points at never rewrites the prompt. Structurally parallel to the enrichment template rather than importing it: an agent prompt references INPUTS, an enrichment prompt references COLUMNS, and the import hierarchy keeps the two domains apart.
    - `segments` union[]
      - union
        - AgentPromptTextSegment: A literal run of prompt text.
          - `text` string, required
          - `type` 'text'
        - AgentPromptInputRefSegment: A reference to one declared input, resolved per row at run time.
          - `input_id` string, uuid, required
          - `type` 'input_ref'
        - AgentPromptContextRefSegment: A reference to the org's business context, resolved per org.
          - `section` 'all' | 'company' | 'icp' | 'personas' | 'signals' | 'social_proof': One section of the org's AI business context a prompt can reference. ``ALL`` is the whole context document; the rest are its named sections.
          - `type` 'context_ref'
  - `updated_at` string, date-time, required
  - `use_business_context` boolean, required
  - `use_row_context` boolean, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Saved agent not found
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
