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

# Update an identity

> Updates specific fields of an existing identity. Only the fields provided in the request body will be updated.



## OpenAPI

````yaml patch /v2/identities/{id}
openapi: 3.1.0
info:
  title: orq.ai API
  version: '2.0'
  description: orq.ai API documentation
servers:
  - url: https://api.orq.ai
security:
  - ApiKey: []
tags:
  - name: Guardrail Rules
  - name: Policies
  - name: Routing Rules
  - name: Files
    description: File upload and retrieval operations.
  - name: FilesService
  - name: Projects
    description: Projects organize resources within a workspace
  - name: ProjectsService
  - name: Skills
    description: >-
      Skills are modular instructions you can use to codify processes and
      conventions
  - name: SkillsService
  - name: Responses
  - description: >-
      Run agents on a cadence — cron, interval, or one-off. Minimum firing
      interval is 1 hour.
    name: Agent Schedules
  - name: Reporting
    description: >-
      GenAI reporting API over canonical analytics rollups. Accepts a metric
      name, time range, grain, group-by, and filters; returns a typed time
      series and optional totals.
  - name: ReportingService
    description: |-
      ReportingService exposes a single QueryReport RPC that maps allowlisted
       analytics payloads onto safe rollup queries. Callers never send SQL;
       the backend picks the rollup family and grain from the metric
       catalogue, the requested range, and the requested grouping.
externalDocs:
  url: https://docs.orq.ai
  description: orq.ai Documentation
paths:
  /v2/identities/{id}:
    patch:
      tags:
        - Identities
      summary: Update an identity
      description: >-
        Updates specific fields of an existing identity. Only the fields
        provided in the request body will be updated.
      operationId: UpdateIdentity
      parameters:
        - schema:
            type: string
            description: Unique identity id or external id
          required: true
          description: Unique identity id or external id
          name: id
          in: path
      requestBody:
        description: Identity fields to update
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Display name or nickname of the contact user. This is
                    typically shown in user interfaces.
                  example: Jane Smith
                email:
                  type:
                    - string
                    - 'null'
                  format: email
                  description: Email address of the contact user
                  example: jane.smith@example.com
                avatar_url:
                  type:
                    - string
                    - 'null'
                  format: uri
                  description: URL linking to the contact user's avatar image
                  example: https://example.com/avatars/jane-smith.jpg
                tags:
                  type: array
                  items:
                    type: string
                  description: >-
                    Array of tags associated with the contact. Useful for
                    organizing and filtering contacts by categories,
                    departments, or custom classifications.
                  example:
                    - premium
                    - beta-user
                    - enterprise
                metadata:
                  type: object
                  additionalProperties: {}
                  description: >-
                    Additional custom metadata associated with the contact as
                    key-value pairs. Use this to store any extra information
                    specific to your application.
                  example:
                    department: Engineering
                    role: Senior Developer
                    subscription_tier: premium
                    last_login: '2024-01-15T10:30:00Z'
      responses:
        '200':
          description: Updated identity
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    format: ulid
                    description: >-
                      Unique ULID (Universally Unique Lexicographically Sortable
                      Identifier) for the contact
                    example: contact_01ARZ3NDEKTSV4RRFFQ69G5FAV
                  external_id:
                    type: string
                    minLength: 1
                    maxLength: 120
                    description: >-
                      Unique string value to identify the contact user in the
                      customer's system. This should be the same ID you use in
                      your system to reference this user.
                    example: user_12345
                  display_name:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Display name or nickname of the contact user. This is
                      typically shown in user interfaces.
                    example: Jane Smith
                  email:
                    type:
                      - string
                      - 'null'
                    format: email
                    description: Email address of the contact user
                    example: jane.smith@example.com
                  avatar_url:
                    type:
                      - string
                      - 'null'
                    format: uri
                    description: URL linking to the contact user's avatar image
                    example: https://example.com/avatars/jane-smith.jpg
                  tags:
                    type: array
                    items:
                      type: string
                    description: >-
                      Array of tags associated with the contact. Useful for
                      organizing and filtering contacts by categories,
                      departments, or custom classifications.
                    example:
                      - premium
                      - beta-user
                      - enterprise
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: >-
                      Additional custom metadata associated with the contact as
                      key-value pairs. Use this to store any extra information
                      specific to your application.
                    example:
                      department: Engineering
                      role: Senior Developer
                      subscription_tier: premium
                      last_login: '2024-01-15T10:30:00Z'
                  created:
                    anyOf:
                      - format: date-time
                        type: string
                      - format: date-time
                        type: string
                    default: '2026-05-14T21:19:47.506Z'
                    readOnly: true
                    format: date-time
                    description: The date and time the resource was created
                  updated:
                    anyOf:
                      - type: string
                        format: date-time
                        default: '2026-05-14T21:19:47.508Z'
                      - format: date-time
                        type: string
                    readOnly: true
                    format: date-time
                    description: The date and time the resource was last updated
                required:
                  - _id
                  - external_id
              example:
                id: contact_01ARZ3NDEKTSV4RRFFQ69G5FAV
                external_id: user_12345
                display_name: Jane Smith-Wilson
                email: jane.smith-wilson@example.com
                avatar_url: https://example.com/avatars/jane-smith.jpg
                tags:
                  - premium
                  - beta-user
                  - enterprise
                metadata:
                  department: Engineering
                  role: Senior Developer
                  subscription_tier: enterprise
                  last_updated: '2024-01-15T10:30:00Z'
                created: '2024-01-15T10:30:00Z'
                updated: '2024-01-16T14:45:00Z'
        '404':
          description: Identity not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                required:
                  - message
      x-code-samples:
        - lang: typescript
          label: Node.js
          source: |-
            import { Orq } from "@orq-ai/node";

            const orq = new Orq({
              apiKey: process.env["ORQ_API_KEY"]
            });

            const updatedIdentity = await orq.identities.update("user_12345", {
              displayName: "Jane Smith-Wilson",
              tags: ["premium", "beta-user", "enterprise"],
              metadata: {
                department: "Engineering",
                role: "Senior Developer",
                subscriptionTier: "enterprise"
              }
            });

            console.log(updatedIdentity);
        - lang: python
          label: Python
          source: |-
            from orq_ai_sdk import Orq
            import os

            orq = Orq(api_key=os.getenv("ORQ_API_KEY"))

            updated_identity = orq.identities.update(
                "user_12345",
                display_name="Jane Smith-Wilson",
                tags=["premium", "beta-user", "enterprise"],
                metadata={
                    "department": "Engineering",
                    "role": "Senior Developer",
                    "subscription_tier": "enterprise"
                }
            )

            print(updated_identity)
components:
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````