---
title: "Change a target's profile"
method: PATCH
path: "/api/v1/model/{model_id}/profile"
tags: ["target-profile"]
---

# Change a target's profile

`PATCH /api/v1/model/{model_id}/profile`

## Request

- Base URL: `https://api.enokilabs.ai`
- URL: `https://api.enokilabs.ai/api/v1/model/{model_id}/profile`
- Auth: none declared

Change content fields by name in `changes`. A field left out stays as it is; null empties text that may be empty and sets multi_agent or has_persistent_memory back to unknown. A list is replaced whole. Only what the change alters becomes the customer's, and it applies at once. Send the profile_id and version from the last read; leave both out to create the profile of a target that has none. Ids, who wrote what and dismissals cannot be written, and a value that still holds an [UNTRUSTED:…] fence is refused. Answers with the profile's id and new version; read the profile for its content.

## Path parameters

- `model_id` string, required

## Headers

- `Authorization` string, nullable: Bearer token with API key

## Request body

- ApiUpdateTargetProfileRequest: Change content fields of a target's profile by name.
  - `version` integer, nullable: The version the change starts from, from the last read. Leave it and profile_id out only to create the profile of a target that has none.
  - `profile_id` string, nullable: The profile_id of the last read, sent with the version: a profile deleted and made again starts its versions over, so the pair names the copy the change was built from.
  - `changes` ApiTargetProfileChanges, required: Content fields to change, by name: every field auto-discovery merges. A field left out stays as it is. Null empties text that may be empty (system_prompt, user_access, test_account, public_data) and sets multi_agent or has_persistent_memory back to unknown; any other field needs a value. A list is replaced whole, so send every item to keep. Only what the change alters becomes the customer's.
    - `system_prompt` string, nullable: The agent's system prompt, as it runs. Null removes it.
    - `purpose` string, nullable: What the agent is for, in one to three sentences.
    - `industry` 'accounting' | 'banking' | 'healthcare' | 'insurance' | 'telecommunications' | 'legal' | 'support' | 'ecommerce' | 'tech' | 'hr' | 'compliance' | 'education' | 'general': Industry classification for defense profiles.
    - `tools` ApiToolChange[], nullable: Every tool the agent can call: its name, what it does, and its parameters as an object. Each tool needs its own name.
      - `name` string, required
      - `description` string, required
      - `parameters` object, nullable
    - `forbidden_actions` string[], nullable: What the agent must never do, one action per line, for example "Delete payroll runs".
    - `sensitive_data_types` string[], nullable: Kinds of data the agent handles that need protection, for example "salary data".
    - `forbidden_data` string[], nullable: Kinds of data the agent must never reach, for example "other firms' client records".
    - `example_identifiers` string[], nullable: Real identifier values tests may use to reach data, for example a client or VAT number.
    - `user_types` ApiUserTypeChange[], nullable: The kinds of user the agent serves: a name, an access level and an optional description. Each user type needs its own name.
      - `name` string, required: Role name as the agent refers to it (e.g. 'Junior Accountant', 'HR Analyst', 'Admin').
      - `auth_level` string, required: Access tier for this role. Use one of: 'public' (no account, e.g. an anonymous visitor), 'user' (an ordinary signed-in end user), 'staff' (works for the company running the agent, e.g. a support rep or a manager), 'admin' (manages the tenant's configuration or users), 'superadmin' (runs the whole platform, across tenants). Pick the closest match if the agent does not use these exact labels.
      - `description` string, nullable: One-sentence summary of what this role typically does with the agent.
    - `user_access` string, nullable: What may each type of user see? For example: customers see only their own orders, and support staff see every customer's. Leave it empty when there is no evidence; never guess.
    - `test_account` string, nullable: Which user is our test account? For example: a standard user in one organisation, without admin rights. Leave it empty when there is no evidence; never guess.
    - `public_data` string, nullable: Which data is public? For example: public registers, or the published product catalogue. Leave it empty when there is no evidence; never guess.
    - `compliance_requirements` string[], nullable: Frameworks the agent must meet, for example "GDPR".
    - `has_guardrails` boolean, nullable: Whether the agent has guardrails, such as refusing off-topic requests.
    - `multi_agent` boolean, nullable: Whether the agent hands work to other agents. Null when unknown.
    - `has_persistent_memory` boolean, nullable: Whether the agent remembers across conversations. Null when unknown.
    - `forbidden_topics` string[], nullable: Subjects the agent must not discuss, for example "investment advice".

## Response `200`

Successful Response

- ApiTargetProfileSaved: What a change answers: which profile, and the version it is at now. Not the content: a key allowed to write is not always allowed to read, and the content is one read away for a key that is.
  - `model_id` string, required
  - `profile_id` string, required
  - `version` integer, required: The profile's version now; send it with the next change.

## Other responses

- `400`: A field is not content, needs a value, holds a fence, or holds a value that cannot be stored: too long, empty, a NUL character, a second item under one name, or more than the profile's size limit leaves room for
- `404`: No such target, or no profile or dismissal to act on
- `409`: The profile changed, or was replaced, since the read the change came from
- `422`: Validation Error

---

[API](https://skmtc.dev/enokilabs/apis/enoki-external-api.md) · [All operations](https://skmtc.dev/enokilabs/apis/enoki-external-api/llms.txt) · [OpenAPI document](https://skmtc.dev/enokilabs/apis/enoki-external-api/revisions/9b13fb6ab124?raw)
