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

# Change a target's profile

> 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.



## OpenAPI

````yaml /openapi.json patch /api/v1/model/{model_id}/profile
openapi: 3.1.0
info:
  title: Enoki External API
  description: >-
    Programmatic API for CI/CD integration. Authenticate with `Authorization:
    Bearer egk_...`.
  version: 0.1.0
servers:
  - url: https://api.enokilabs.ai
    description: Enoki API
security: []
paths:
  /api/v1/model/{model_id}/profile:
    patch:
      tags:
        - target-profile
      summary: Change a target's profile
      description: >-
        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.
      operationId: api_update_target_profile_api_v1_model__model_id__profile_patch
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Bearer token with API key
            title: Authorization
          description: Bearer token with API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiUpdateTargetProfileRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTargetProfileSaved'
        '400':
          description: >-
            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':
          description: No such target, or no profile or dismissal to act on
        '409':
          description: >-
            The profile changed, or was replaced, since the read the change came
            from
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ApiUpdateTargetProfileRequest:
      properties:
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
          description: >-
            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:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Id
          description: >-
            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:
          $ref: '#/components/schemas/ApiTargetProfileChanges'
      additionalProperties: false
      type: object
      required:
        - changes
      title: ApiUpdateTargetProfileRequest
      description: Change content fields of a target's profile by name.
    ApiTargetProfileSaved:
      properties:
        model_id:
          type: string
          title: Model Id
        profile_id:
          type: string
          title: Profile Id
        version:
          type: integer
          title: Version
          description: The profile's version now; send it with the next change.
      type: object
      required:
        - model_id
        - profile_id
        - version
      title: ApiTargetProfileSaved
      description: >-
        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.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApiTargetProfileChanges:
      properties:
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
          description: The agent's system prompt, as it runs. Null removes it.
        purpose:
          anyOf:
            - type: string
            - type: 'null'
          title: Purpose
          description: What the agent is for, in one to three sentences.
        industry:
          anyOf:
            - $ref: '#/components/schemas/Industry'
            - type: 'null'
          description: The agent's industry, one of the listed values.
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/ApiToolChange'
              type: array
            - type: 'null'
          title: Tools
          description: >-
            Every tool the agent can call: its name, what it does, and its
            parameters as an object. Each tool needs its own name.
        forbidden_actions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Forbidden Actions
          description: >-
            What the agent must never do, one action per line, for example
            "Delete payroll runs".
        sensitive_data_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Sensitive Data Types
          description: >-
            Kinds of data the agent handles that need protection, for example
            "salary data".
        forbidden_data:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Forbidden Data
          description: >-
            Kinds of data the agent must never reach, for example "other firms'
            client records".
        example_identifiers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Example Identifiers
          description: >-
            Real identifier values tests may use to reach data, for example a
            client or VAT number.
        user_types:
          anyOf:
            - items:
                $ref: '#/components/schemas/ApiUserTypeChange'
              type: array
            - type: 'null'
          title: User Types
          description: >-
            The kinds of user the agent serves: a name, an access level and an
            optional description. Each user type needs its own name.
        user_access:
          anyOf:
            - type: string
            - type: 'null'
          title: User Access
          description: >-
            What may each type of user see? For example: only their own firm's
            clients, or payroll for HR staff only. Leave it empty when there is
            no evidence; never guess.
        test_account:
          anyOf:
            - type: string
            - type: 'null'
          title: Test Account
          description: >-
            Which user is our test account? For example: a standard accountant
            in one firm, without admin rights. Leave it empty when there is no
            evidence; never guess.
        public_data:
          anyOf:
            - type: string
            - type: 'null'
          title: Public Data
          description: >-
            Which data is public? For example: company registers such as the
            KBO. Leave it empty when there is no evidence; never guess.
        compliance_requirements:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Compliance Requirements
          description: Frameworks the agent must meet, for example "GDPR".
        has_guardrails:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Guardrails
          description: >-
            Whether the agent has guardrails, such as refusing off-topic
            requests.
        multi_agent:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Multi Agent
          description: Whether the agent hands work to other agents. Null when unknown.
        has_persistent_memory:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Persistent Memory
          description: Whether the agent remembers across conversations. Null when unknown.
        forbidden_topics:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Forbidden Topics
          description: >-
            Subjects the agent must not discuss, for example "investment
            advice".
      additionalProperties: false
      type: object
      title: ApiTargetProfileChanges
      description: >-
        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.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Industry:
      type: string
      enum:
        - accounting
        - banking
        - healthcare
        - insurance
        - telecommunications
        - legal
        - support
        - ecommerce
        - tech
        - hr
        - compliance
        - education
        - general
      title: Industry
      description: Industry classification for defense profiles.
    ApiToolChange:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        parameters:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters
      additionalProperties: false
      type: object
      required:
        - name
        - description
      title: ApiToolChange
      description: >-
        A tool as a change sends it; a key it does not know is refused, not
        dropped.
    ApiUserTypeChange:
      properties:
        name:
          type: string
          title: Name
          description: >-
            Role name as the agent refers to it (e.g. 'Junior Accountant', 'HR
            Analyst', 'Admin').
        auth_level:
          type: string
          title: Auth Level
          description: >-
            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:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            One-sentence summary of what this role typically does with the
            agent.
      additionalProperties: false
      type: object
      required:
        - name
        - auth_level
      title: ApiUserTypeChange
      description: >-
        A user type as a change sends it; a key it does not know is refused, not
        dropped.

````

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