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

# Update a person's profile

> Sets the profile of an existing person (for a new one, send `profile` with the event): email, name, picture, handles, language. Left out is kept, null clears. In `handles` an entry replaces that platform's, null removes it. `profile: null` erases all. [People](/guides/people#a-persons-profile)



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/users/{id}
openapi: 3.1.0
info:
  title: Lurk API
  version: 1.0.0
  description: Events in, rules decide, units change, receipts out.
servers:
  - url: https://api.getlurk.com
security: []
tags:
  - name: events
    description: Send what your users do. Lurk runs your live rules on each event.
    x-group: Events
    x-displayName: Events
  - name: units
    description: What people collect and hold, and their balances.
    x-group: Units
    x-displayName: Units
  - name: rules
    description: What Lurk does when an event comes in. A person takes a rule live.
    x-group: Rules
    x-displayName: Rules
  - name: activity
    description: A receipt for every change, with why it happened.
    x-group: Receipts
    x-displayName: Receipts
  - name: users
    description: The people your events are about.
    x-group: People
    x-displayName: People
  - name: webhook_endpoints
    description: Where Lurk sends signed notices of what changed.
    x-group: Webhooks
    x-displayName: Webhooks
  - name: known_values
    description: The properties of your own events whose values Lurk remembers.
    x-group: Known values
    x-displayName: Known values
  - name: feedback
    description: Tell the Lurk team about a bug, a gap or an idea.
    x-group: Feedback
    x-displayName: Feedback
  - name: annotations
    description: >-
      Short notes on a day of the project, such as a release or a campaign
      start.
    x-group: Annotations
    x-displayName: Annotations
  - name: trusted_issuers
    description: The sign-in providers a project trusts for its app's users.
    x-group: Trusted issuers
    x-displayName: Trusted issuers
  - name: client_events
    description: The events a signed-in device may send, and their caps.
    x-group: Client events
    x-displayName: Client events
  - name: issuer_identities
    description: Which person each sign-in subject is bound to.
    x-group: Issuer identities
    x-displayName: Issuer identities
  - name: proposals
    description: Changes an agent or Lurky asks for and a person approves or declines.
    x-group: Proposals
    x-displayName: Proposals
  - name: holds
    description: Changes a rule parked for a person to give or refuse.
    x-group: Holds
    x-displayName: Holds
  - name: audiences
    description: The groups of people that rules can read.
    x-group: Audiences
    x-displayName: Audiences
  - name: budgets
    description: What each live rule's budgets have given in the window they are in now.
    x-group: Budgets
    x-displayName: Budgets
  - name: templates
    description: Kits that add units and rules to a project in one go.
    x-group: Templates
    x-displayName: Templates
  - name: views
    description: Saved questions about a project, with their answers.
    x-group: Views
    x-displayName: Views
  - name: integrations
    description: Every way events reach Lurk or state leaves it, and the state of each.
    x-group: Integrations
    x-displayName: Integrations
  - name: projects
    description: Where units, rules and events live. An organization can have several.
    x-group: Projects
    x-displayName: Projects
  - name: clocks
    description: A test project's clock, which can be moved to try schedules and expiries.
    x-group: Clocks
    x-displayName: Clocks
paths:
  /v1/users/{id}:
    patch:
      tags:
        - users
      summary: Update a person's profile
      description: >-
        Sets the profile of an existing person (for a new one, send `profile`
        with the event): email, name, picture, handles, language. Left out is
        kept, null clears. In `handles` an entry replaces that platform's, null
        removes it. `profile: null` erases all.
        [People](/guides/people#a-persons-profile)
      operationId: users.update
      parameters:
        - schema:
            type: string
            description: >-
              A usr_… ID, or your own identifier for them. The person must exist
              already: an event makes them (or send `profile` with that event)
          required: true
          description: >-
            A usr_… ID, or your own identifier for them. The person must exist
            already: an event makes them (or send `profile` with that event)
          name: id
          in: path
        - schema:
            type: string
            description: W3C Trace Context; joins your trace to ours
          required: false
          description: W3C Trace Context; joins your trace to ours
          name: traceparent
          in: header
        - schema:
            type: string
            minLength: 1
            maxLength: 255
            description: A retry with the same key and body returns the first response
          required: true
          description: A retry with the same key and body returns the first response
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                profile:
                  type:
                    - object
                    - 'null'
                  properties:
                    email:
                      type:
                        - string
                        - 'null'
                      maxLength: 254
                      format: email
                      description: Lurk keeps it lowercase. Null clears it
                    name:
                      type:
                        - string
                        - 'null'
                      minLength: 1
                      maxLength: 100
                      pattern: >-
                        ^(?![\s\S]*<[A-Za-z!/?])[^\u0000-\u001f\u007f-\u009f‪-‮⁦-⁩]*$
                      description: Plain text, 1 to 100 characters. Null clears it
                    avatar_url:
                      type:
                        - string
                        - 'null'
                      maxLength: 2048
                      pattern: ^https:\/\/[^/?#@\s]+(?:[/?#]\S*)?$
                      description: >-
                        An https:// link, at most 2048 characters. Null clears
                        it
                    handles:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/HandleChange'
                      description: >-
                        By platform: an entry sets that platform's handle, null
                        removes it, and platforms left out are kept. A person
                        has handles on at most 10 platforms
                    locale:
                      type:
                        - string
                        - 'null'
                      maxLength: 35
                      pattern: ^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8}){0,4}$
                      description: 'A BCP 47 tag: en, en-GB. Null clears it'
                  additionalProperties: false
                  description: >-
                    What to change in their profile. `null` erases the whole
                    profile
                  examples:
                    - email: ana@example.com
                      name: Ana Lima
                      handles:
                        x:
                          handle: ana_lima
                      locale: pt-BR
              required:
                - profile
              additionalProperties: false
      responses:
        '200':
          description: Update a person's profile
          headers:
            Request-Id:
              schema:
                type: string
                description: Quote this when you contact support
              required: true
              description: Quote this when you contact support
            traceparent:
              schema:
                type: string
                description: W3C Trace Context for this call, in the caller's trace
              required: true
              description: W3C Trace Context for this call, in the caller's trace
            RateLimit:
              schema:
                type: string
                description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
              required: true
              description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
            RateLimit-Policy:
              schema:
                type: string
                description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
              required: true
              description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EndUserDetail'
        '404':
          description: >-
            - `not_found`: Check the ID or key, and that you are in the right
            project. Each project is separate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            - `conflict`: Nothing was changed. The thing it names is in a state
            that does not allow this (such as a person merged into another). Do
            what the message says, then send it again.

            - `idempotency_conflict`: You used an idempotency key with a
            different request. Use a new key for a new request; reuse a key only
            to retry the same one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            - `validation_failed`: Nothing was changed. Fix what the message
            says is wrong (the field is named in `param` when there is one) and
            send the request again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many requests. Wait `Retry-After` seconds.
          headers:
            Request-Id:
              schema:
                type: string
                description: Quote this when you contact support
              required: true
              description: Quote this when you contact support
            traceparent:
              schema:
                type: string
                description: W3C Trace Context for this call, in the caller's trace
              required: true
              description: W3C Trace Context for this call, in the caller's trace
            RateLimit:
              schema:
                type: string
                description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
              required: true
              description: The tightest limit now, e.g. `"ingest-key";r=5999;t=42`
            RateLimit-Policy:
              schema:
                type: string
                description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
              required: true
              description: Its quota and window, e.g. `"ingest-key";q=6000;w=60`
            Retry-After:
              schema:
                type: string
                description: Seconds to wait
              required: true
              description: Seconds to wait
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    HandleChange:
      type:
        - object
        - 'null'
      properties:
        handle:
          type: string
          pattern: ^@?[A-Za-z0-9_][A-Za-z0-9_.@-]{0,99}$
          description: The username, with or without the @ (Lurk drops it)
        account_id:
          type:
            - string
            - 'null'
          pattern: ^[A-Za-z0-9_.:-]{1,64}$
          description: >-
            The platform's own ID for the account, when you know it (X's numeric
            user ID). Left out is null: an entry replaces what Lurk kept for
            that platform
      required:
        - handle
      additionalProperties: false
    EndUserDetail:
      type: object
      properties:
        id:
          type: string
          description: The usr_… ID
        external_id:
          type: string
          description: 'The brand''s own identifier: an email, a user ID'
        created_at:
          type: string
          format: date-time
          description: When Lurk first heard of them
        last_active_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When they last did something, to the hour. Null until an event
            arrives after Lurk started keeping it
        status:
          $ref: '#/components/schemas/PersonStatus'
        balances:
          type: array
          items:
            $ref: '#/components/schemas/UnitBalance'
          description: What they hold now. Units at 0 are left out
        profile:
          $ref: '#/components/schemas/PersonProfile'
        blocked_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When a member blocked this person; null when not blocked. Blocks
            apply where device sign-in is switched on.
        blocked_by:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              pattern: ^mem_[0-7][0-9a-hjkmnp-tv-z]{25}$
              description: A member ID, starting with `mem_`.
            name:
              type: string
              description: The member's display name.
          required:
            - id
            - name
          description: >-
            The member who blocked them; null when not blocked. Blocks apply
            where device sign-in is switched on.
        erased_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Not available yet. When the person was erased. Null for everyone
            else. From then on external_id is a random value starting erased:,
            the brand's old identifier means a new person, and nothing can be
            added to this one
        timezone:
          type:
            - string
            - 'null'
          description: Their own time zone, when they have one; else the project's applies
        receipts:
          type: integer
          minimum: 0
          description: How many receipts they have
        last_receipt_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When their most recent receipt was made. Null when they have none
      required:
        - id
        - external_id
        - created_at
        - last_active_at
        - status
        - balances
        - profile
        - blocked_at
        - blocked_by
        - timezone
        - receipts
        - last_receipt_at
      examples:
        - id: usr_01m2ayvr9gf8e89t8f5cbx71b0
          external_id: ana@example.com
          created_at: '2026-09-12T14:03:10.000Z'
          last_active_at: '2026-11-04T09:00:00.000Z'
          status: returning
          balances:
            - unit: points
              amount: 169
          profile:
            email: ana@example.com
            name: Ana Lima
            avatar_url: null
            handles:
              x:
                handle: ana_lima
                account_id: null
            locale: pt-BR
            updated_at: '2026-10-29T16:20:05.000Z'
          blocked_at: null
          blocked_by: null
          erased_at: null
          timezone: America/Sao_Paulo
          receipts: 2
          last_receipt_at: '2026-11-04T09:12:44.000Z'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: integer
            code:
              type: string
              enum:
                - invalid_json
                - invalid_key
                - forbidden
                - approval_required
                - not_found
                - idempotency_conflict
                - conflict
                - unblock_clock_reversed
                - insufficient_balance
                - reference_used
                - validation_failed
                - rate_limited
                - internal
                - unavailable
            message:
              type: string
            param:
              type: string
            next_step:
              type: string
              description: >-
                What to do about this kind of error, in one sentence. Always
                sent by current servers
            request_id:
              type: string
            doc_url:
              type: string
              format: uri
          required:
            - status
            - code
            - message
            - request_id
            - doc_url
      required:
        - error
    PersonStatus:
      type: string
      enum:
        - new
        - returning
        - lapsing
      description: >-
        new: first heard of within the project's `new_for_days`. lapsing: older
        than that, and nothing from them for `lapsing_after_days`. returning:
        everyone else
    UnitBalance:
      type: object
      properties:
        unit:
          type: string
          pattern: ^[a-z][a-z0-9_-]{0,63}$
          description: The unit's key
        amount:
          type: integer
          description: How much of the unit they hold
      required:
        - unit
        - amount
    PersonProfile:
      type: object
      properties:
        email:
          type:
            - string
            - 'null'
          maxLength: 254
          format: email
          description: Their email, lowercase. Search finds it, whole
        name:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 100
          pattern: ^(?![\s\S]*<[A-Za-z!/?])[^\u0000-\u001f\u007f-\u009f‪-‮⁦-⁩]*$
          description: 'The name to show them by: Ana Lima, or their X display name'
        avatar_url:
          type:
            - string
            - 'null'
          maxLength: 2048
          pattern: ^https:\/\/[^/?#@\s]+(?:[/?#]\S*)?$
          description: >-
            A picture of them, https only. Lurk never fetches it; the dashboard
            shows it
        handles:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/PersonHandle'
          description: >-
            Their usernames, by platform: `{ x: { handle: 'ana', account_id:
            '12' } }`. Empty when none. Search finds each, whole, with or
            without the @
        locale:
          type:
            - string
            - 'null'
          maxLength: 35
          pattern: ^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8}){0,4}$
          description: Their language, as a BCP 47 tag
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the profile last changed. Null when nothing was ever set
      required:
        - email
        - name
        - avatar_url
        - handles
        - locale
        - updated_at
      description: >-
        What you told Lurk about them. Kept sealed; nothing in it is verified by
        Lurk, and rules do not read it. Every field is null (handles empty)
        until you set it
    PersonHandle:
      type: object
      properties:
        handle:
          type: string
          pattern: ^[A-Za-z0-9_][A-Za-z0-9_.@-]{0,99}$
          description: >-
            The username, without the @, in the case you sent. Search ignores
            case
        account_id:
          type:
            - string
            - 'null'
          pattern: ^[A-Za-z0-9_.:-]{1,64}$
          description: >-
            The platform's own ID for the account, when you know it (X's numeric
            user ID). It stays the same when the username changes. Kept sealed
            and not searchable
      required:
        - handle
        - account_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A project key (Developers → API keys). Keep it on your server, not in an
        app.

````

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