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

# Update multiple people

> Updates name, birth date, visibility, favorite status, or thumbnail on multiple people in one transactional call. Each item carries the target person id and the per-person change — different fields can be changed on different people in the same request. Atomic: a duplicate id, an unknown or inaccessible id, or any per-item failure rejects the whole batch and writes nothing.

Items apply in request order, and each rename is checked against the names left by earlier items: swapping two people's names, or giving two people the same name, returns 409. Renaming to another record's name in the same library, including hidden people, also returns 409. Names ignore case and surrounding whitespace; retrying the same collision does not resolve it.

`update_person` edits a single person.



## OpenAPI

````yaml https://api.gumnut.ai/openapi.json post /api/people/bulk-update
openapi: 3.1.0
info:
  title: Gumnut API
  description: >-
    The Gumnut API manages photo and video libraries: upload and organize
    assets, search by content, group detected faces into people, and curate
    albums and stacks.


    Headless clients authenticate by sending either a Gumnut API key
    (`apikey_...`) or an OAuth access token as a Bearer token in the
    `Authorization` header. The Gumnut web and mobile apps sign in with a
    first-party session (Clerk session JWT) instead, which is also the only
    credential that can manage API keys and library sharing.
  contact:
    name: Gumnut
    url: https://www.gumnut.ai/contact
  version: 1.0.0
servers:
  - url: https://api.gumnut.ai
    description: Production
security:
  - apiKeyAuth: []
  - oauthJwtAuth: []
tags:
  - name: assets
    description: >-
      Photos and videos in a library: upload, list and filter, update metadata,
      trash and restore.
  - name: search
    description: >-
      Content-based search over a library's assets, with album, person, date,
      and location filters.
  - name: albums
    description: User-curated collections of assets.
  - name: album-assets
    description: Link records connecting albums to their member assets.
  - name: stacks
    description: >-
      Groups of related shots of the same moment, presented as a single unit
      with a cover asset.
  - name: people
    description: Named people, each built from clustered faces.
  - name: faces
    description: Detected faces and their assignment to people.
  - name: libraries
    description: Top-level containers that own assets, albums, people, and everything else.
  - name: library-invitations
    description: First-party invitation management and admission for photo libraries.
  - name: events
    description: Change-event feed for keeping client state in sync.
  - name: tasks
    description: Status of background processing tasks.
  - name: users
    description: The authenticated user's profile.
  - name: api-keys
    description: >-
      Create and manage Gumnut API keys. Requires a first-party Gumnut app
      session — API keys and OAuth tokens cannot manage credentials.
  - name: oauth
    description: OAuth flow endpoints for obtaining and refreshing access tokens.
  - name: server
    description: Service health.
paths:
  /api/people/bulk-update:
    post:
      tags:
        - people
      summary: Update multiple people
      description: >-
        Updates name, birth date, visibility, favorite status, or thumbnail on
        multiple people in one transactional call. Each item carries the target
        person id and the per-person change — different fields can be changed on
        different people in the same request. Atomic: a duplicate id, an unknown
        or inaccessible id, or any per-item failure rejects the whole batch and
        writes nothing.


        Items apply in request order, and each rename is checked against the
        names left by earlier items: swapping two people's names, or giving two
        people the same name, returns 409. Renaming to another record's name in
        the same library, including hidden people, also returns 409. Names
        ignore case and surrounding whitespace; retrying the same collision does
        not resolve it.


        `update_person` edits a single person.
      operationId: bulk_update_people
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdatePeopleRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdatePeopleResponse'
        '401':
          description: Missing, invalid, or expired credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The credentials are valid but not authorized for this operation —
            for example an API key whose action or library scope excludes it, or
            a credential type this operation does not accept.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Name is already in use Clerk sign-in could not be associated with
            the existing account. Resolve the identity conflict before retrying
            sign-in; repeated requests with unchanged verification and identity
            state will not resolve it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: >-
            Rate limit exceeded, or too many of your requests are already in
            progress. Retry after the interval in the `Retry-After` header.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Authentication provider temporarily unavailable. Retry sign-in
            later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BulkUpdatePeopleRequest:
      properties:
        updates:
          items:
            $ref: '#/components/schemas/BulkUpdatePersonItem'
          type: array
          maxItems: 200
          minItems: 1
          title: Updates
          description: >-
            List of per-person updates. Each item carries the target person id
            and the change to apply to it; different fields can be changed on
            different people in the same request. Up to 200 items per request.
      type: object
      required:
        - updates
      title: BulkUpdatePeopleRequest
      description: Bulk-update request body — heterogeneous per-person changes in one call.
    BulkUpdatePeopleResponse:
      properties: {}
      type: object
      title: BulkUpdatePeopleResponse
      description: Empty acknowledgment returned by `bulk_update_people`.
      x-stainless-empty-object: true
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        detail:
          title: Detail
          type: string
          description: Human-readable explanation of the error.
      required:
        - detail
    UnprocessableEntityResponse:
      title: UnprocessableEntityResponse
      type: object
      properties:
        detail:
          title: Detail
          description: >-
            A semantic validation message or structured request-validation
            errors.
          oneOf:
            - type: string
              description: Human-readable semantic validation message.
            - type: array
              items:
                $ref: '#/components/schemas/ValidationError'
              description: Structured request-validation errors.
      required:
        - detail
    BulkUpdatePersonItem:
      properties:
        id:
          type: string
          title: Id
          description: Person ID (with the `person_` prefix) to apply this change to.
        change:
          $ref: '#/components/schemas/PersonUpdate'
          description: >-
            The change to apply to this person. Same shape as the body of the
            single-person `update_person` endpoint — same fields, same
            validation; omitted fields are unchanged.
      type: object
      required:
        - id
        - change
      title: BulkUpdatePersonItem
      description: One person update in a bulk request.
    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
    PersonUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
          description: >-
            New display name; must not be blank. Surrounding whitespace is
            trimmed. Omit to leave unchanged; pass `null` to clear the name.
        birth_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Birth Date
          description: New birth date (ISO 8601 date). Omit to leave unchanged.
        is_hidden:
          type: boolean
          title: Is Hidden
          description: Hide or unhide this person. Omit to leave unchanged.
        is_favorite:
          type: boolean
          title: Is Favorite
          description: Mark or unmark this person as a favorite. Omit to leave unchanged.
        thumbnail_face_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail Face Id
          description: >-
            New thumbnail face ID for this person. Omit to leave unchanged.
            Enumerate a person's faces with `list_faces` and `person_id`.
      type: object
      title: PersonUpdate
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Gumnut API key (`apikey_...`) sent as a Bearer token in the
        `Authorization` header. Create and manage keys in the Gumnut app, or
        with the API key endpoints while signed in to it.
    oauthJwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Short-lived JWT obtained from the OAuth token exchange, sent as a Bearer
        token in the `Authorization` header.

````

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