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

# Edit profile items [Cloud-only]

> Apply 1–50 edits to one user's profile in a single call.

Each operation carries an `action` (add, update or delete), a `type` (explicit_info or implicit_traits), the item `data`, and an optional `reason`.

Profile is the only memory type this endpoint edits — `memory_type` is pinned to "profile"; every other type is produced by extraction. Operations are reported individually in the response, so some can be rejected while others apply.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/memory/edit
openapi: 3.1.0
info:
  title: EverOS Cloud Memory API
  version: 2.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  contact:
    name: EverMind AI
    email: service@evermind.ai
    url: https://github.com/EverMind-AI/everos-cloud-sdk-python
  description: >-
    Official Python client for the EverOS Cloud Memory API. Add, search,
    retrieve, and manage long-term memory for your AI applications over a typed
    interface (pydantic v2, with full type hints). Install and usage guides:
    https://github.com/EverMind-AI/everos-cloud-sdk-python
servers:
  - url: https://api.evermind.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v2/memory/edit:
    post:
      tags:
        - Memory
      summary: Edit profile items [Cloud-only]
      description: >-
        Apply 1–50 edits to one user's profile in a single call.


        Each operation carries an `action` (add, update or delete), a `type`
        (explicit_info or implicit_traits), the item `data`, and an optional
        `reason`.


        Profile is the only memory type this endpoint edits — `memory_type` is
        pinned to "profile"; every other type is produced by extraction.
        Operations are reported individually in the response, so some can be
        rejected while others apply.
      operationId: editProfile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope_EditData_'
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '403':
          description: >-
            Authenticated but not permitted — either rejected by the auth
            service, or the account's memory API version does not match the
            interface version implied by the path (a v1 account calling an
            /api/v2 route).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit or quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '503':
          description: >-
            The gateway could not reach the authentication service. Transient —
            retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
components:
  schemas:
    EditInput:
      properties:
        app_id:
          type: string
          title: App Id
          default: default
          description: Scope the profile lives in, defaulting to "default".
        project_id:
          type: string
          title: Project Id
          default: default
          description: Second half of the scope, defaulting to "default".
        user_id:
          type: string
          minLength: 1
          title: User Id
          description: The user whose profile is being edited.
        memory_type:
          type: string
          const: profile
          title: Memory Type
          default: profile
          description: Pinned to "profile" — this endpoint edits nothing else.
        operations:
          items:
            oneOf:
              - $ref: '#/components/schemas/AddOperation'
              - $ref: '#/components/schemas/UpdateOperation'
              - $ref: '#/components/schemas/DeleteOperation'
            discriminator:
              propertyName: action
              mapping:
                add: '#/components/schemas/AddOperation'
                delete: '#/components/schemas/DeleteOperation'
                update: '#/components/schemas/UpdateOperation'
          type: array
          maxItems: 50
          minItems: 1
          title: Operations
          description: >-
            1 to 50 edits applied in one call. "add" mints the item id and must
            not carry one; "update" and "delete" require an `item_id` whose
            prefix matches the item type ("ei_" for explicit_info, "it_" for
            implicit_traits). Each operation's outcome is reported separately,
            so one can be rejected while the rest apply.
      additionalProperties: false
      type: object
      required:
        - user_id
        - operations
      title: EditInput
      description: |-
        Bulk profile edit request [Cloud-only].

        Carries 1–50 ``EditOperation`` items targeting a single user's profile.
        ``memory_type`` is pinned to ``"profile"``; ``source`` is server-set and
        not accepted from the client.
      example:
        user_id: user-1
        operations:
          - action: add
            type: explicit_info
            reason: Stated in session-1
            data:
              category: hobby
              description: Enjoys hiking in the mountains
    SuccessEnvelope_EditData_:
      properties:
        request_id:
          type: string
          title: Request Id
          description: Request trace id (peer to data)
        data:
          $ref: '#/components/schemas/EditData'
          description: Endpoint-defined business result
      type: object
      required:
        - request_id
        - data
      title: SuccessEnvelope[EditData]
    GatewayError:
      type: object
      additionalProperties: true
      description: >-
        Gateway error body. NOTE: shape is not yet uniform across auth/quota/
        rate-limit paths — treat fields as best-effort. Commonly includes a
        `code`/`message` (flat) or an `error` object/string with a `message`.
      title: GatewayError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: One entry per field that failed validation.
      type: object
      title: HTTPValidationError
    AddOperation:
      properties:
        reason:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Reason
          description: Why this edit was made, up to 256 characters. Stored with the item.
        action:
          type: string
          const: add
          title: Action
          description: Always "add" for this variant.
        type:
          type: string
          enum:
            - explicit_info
            - implicit_traits
          title: Type
          description: >-
            Which profile item this edit targets — "explicit_info" (a stated
            fact, needing `category` + `description`) or "implicit_traits" (an
            inferred trait, needing `trait` + `description`).
        data:
          anyOf:
            - $ref: '#/components/schemas/ExplicitInfoData'
            - $ref: '#/components/schemas/ImplicitTraitData'
          title: Data
          description: >-
            The item to add. Its required keys depend on `type`; other keys
            (evidence, sources, basis, …) ride through untouched.
      additionalProperties: false
      type: object
      required:
        - action
        - type
        - data
      title: AddOperation
      description: Add a new profile item (``item_id`` forbidden — the server mints it).
    UpdateOperation:
      properties:
        reason:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Reason
          description: Why this edit was made, up to 256 characters.
        action:
          type: string
          const: update
          title: Action
          description: Always "update" for this variant.
        type:
          type: string
          enum:
            - explicit_info
            - implicit_traits
          title: Type
          description: >-
            Which profile item this edit targets — "explicit_info" or
            "implicit_traits". It must match the `item_id` prefix.
        item_id:
          type: string
          title: Item Id
          description: >-
            The item to update. Its prefix must match the item type — "ei_" for
            explicit_info, "it_" for implicit_traits — followed by 24 hex
            characters.
        data:
          anyOf:
            - $ref: '#/components/schemas/ExplicitInfoPatch'
            - $ref: '#/components/schemas/ImplicitTraitPatch'
          title: Data
          description: >-
            Partial patch, shallow-merged into the stored item. At least one of
            the type's own keys must be present.
      additionalProperties: false
      type: object
      required:
        - action
        - type
        - item_id
        - data
      title: UpdateOperation
      description: Update an existing profile item (partial ``data`` shallow-merge).
    DeleteOperation:
      properties:
        reason:
          anyOf:
            - type: string
              maxLength: 256
            - type: 'null'
          title: Reason
          description: Why this edit was made, up to 256 characters.
        action:
          type: string
          const: delete
          title: Action
          description: Always "delete" for this variant.
        type:
          type: string
          enum:
            - explicit_info
            - implicit_traits
          title: Type
          description: >-
            Which profile item this edit targets — "explicit_info" or
            "implicit_traits". It must match the `item_id` prefix.
        item_id:
          type: string
          title: Item Id
          description: >-
            The item to delete. Its prefix must match the item type ("ei_" /
            "it_") followed by 24 hex characters.
      additionalProperties: false
      type: object
      required:
        - action
        - type
        - item_id
      title: DeleteOperation
      description: Delete an existing profile item by ``item_id`` (carries no ``data``).
    EditData:
      properties:
        user_id:
          type: string
          title: User Id
          description: The user whose profile was edited.
        version:
          type: integer
          title: Version
          description: >-
            The profile's version after this edit. It advances every time the
            profile changes.
        applied:
          type: integer
          title: Applied
          description: How many of the submitted operations took effect.
        results:
          items:
            $ref: '#/components/schemas/EditResultItem'
          type: array
          title: Results
          description: >-
            Per-operation outcome, in submission order — check this rather than
            assuming all applied.
        profile:
          additionalProperties: true
          type: object
          title: Profile
          description: >-
            The profile as it stands after the edit, so no follow-up read is
            needed.
      type: object
      required:
        - user_id
        - version
        - applied
      title: EditData
      description: Response payload for a successful profile edit request.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Path to the offending field, from the body root.
        msg:
          type: string
          title: Message
          description: What is wrong with it.
        type:
          type: string
          title: Error Type
          description: Machine-readable validation-error kind.
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ExplicitInfoData:
      properties:
        category:
          type: string
          minLength: 1
          title: Category
          description: What kind of fact this is, e.g. "hobby". Required, non-empty.
        description:
          type: string
          maxLength: 4000
          minLength: 1
          title: Description
          description: The fact itself, up to 4000 characters. Required, non-empty.
      additionalProperties: true
      type: object
      required:
        - category
        - description
      title: ExplicitInfoData
      description: >-
        ``data`` payload for ``add explicit_info`` — ``category`` +
        ``description``

        required (non-empty); other fields (``evidence``, ``sources``, …) pass
        through.
    ImplicitTraitData:
      properties:
        trait:
          type: string
          minLength: 1
          title: Trait
          description: The inferred trait's name. Required, non-empty.
        description:
          type: string
          maxLength: 4000
          minLength: 1
          title: Description
          description: What the trait means and how it shows up, up to 4000 characters.
      additionalProperties: true
      type: object
      required:
        - trait
        - description
      title: ImplicitTraitData
      description: >-
        ``data`` payload for ``add implicit_traits`` — ``trait`` +
        ``description``

        required (non-empty); other fields (``basis``, ``evidence``,
        ``sources``, …)

        pass through.
    ExplicitInfoPatch:
      properties:
        category:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Category
          description: >-
            New category. At least one of `category` / `description` must be
            present.
        description:
          anyOf:
            - type: string
              maxLength: 4000
              minLength: 1
            - type: 'null'
          title: Description
          description: >-
            New text, up to 4000 characters. Fields left out keep their stored
            value.
      additionalProperties: true
      type: object
      title: ExplicitInfoPatch
      description: >-
        ``data`` payload for ``update explicit_info`` — partial; at least one of

        ``category`` / ``description`` (non-empty if present); others pass
        through.
    ImplicitTraitPatch:
      properties:
        trait:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Trait
          description: >-
            New trait name. At least one of `trait` / `description` must be
            present.
        description:
          anyOf:
            - type: string
              maxLength: 4000
              minLength: 1
            - type: 'null'
          title: Description
          description: >-
            New text, up to 4000 characters. Fields left out keep their stored
            value.
      additionalProperties: true
      type: object
      title: ImplicitTraitPatch
      description: >-
        ``data`` payload for ``update implicit_traits`` — partial; at least one
        of

        ``trait`` / ``description`` (non-empty if present); others pass through.
    EditResultItem:
      properties:
        op_index:
          type: integer
          title: Op Index
          description: >-
            Which submitted operation this is, by 0-based position in the
            request.
        action:
          type: string
          title: Action
          description: The action that was attempted — "add", "update" or "delete".
        type:
          type: string
          title: Type
          description: The profile item type it targeted.
        status:
          type: string
          enum:
            - applied
            - rejected
          title: Status
          description: >-
            "applied" or "rejected". A rejected operation does not fail the
            request.
        item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Id
          description: The item that was updated or deleted.
        new_item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: New Item Id
          description: The id minted for an added item — this is how a caller learns it.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Why this operation was rejected, when it was.
      type: object
      required:
        - op_index
        - action
        - type
        - status
      title: EditResultItem
      description: Per-operation outcome returned in ``EditData.results``.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key issued by EverOS, sent as `Authorization: Bearer <api_key>`.'

````

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