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

# Batch update properties

> Set or delete properties for 1 to 100 profiles. Each item has a user_id and the properties of that profile. Each item gets its own result, so one bad item does not fail the batch. The body is at most 200 KB.



## OpenAPI

````yaml /api/openapi.json put /v0/projects/{projectId}/profiles/properties
openapi: 3.1.0
info:
  title: Manalens API
  version: 0.1.0
  description: >-
    The public API of Manalens: event ingestion, profile properties and the
    Query API. Success bodies are the resource, with no envelope. Errors use the
    `Error` format. See https://docs.manalens.dev/api/overview.
servers:
  - url: https://api.manalens.dev
    description: API
  - url: https://events.manalens.dev
    description: Event ingestion
security: []
tags:
  - name: Events
    description: Send website, game and server events
  - name: Profiles
    description: Set and delete profile properties
  - name: Query
    description: Read analytics reports with an API key
paths:
  /v0/projects/{projectId}/profiles/properties:
    put:
      tags:
        - Profiles
      summary: Batch update properties
      description: >-
        Set or delete properties for 1 to 100 profiles. Each item has a user_id
        and the properties of that profile. Each item gets its own result, so
        one bad item does not fail the batch. The body is at most 200 KB.
      operationId: batchUpdateProfileProperties
      parameters:
        - name: projectId
          in: path
          required: true
          description: The project ID
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              minItems: 1
              maxItems: 100
              type: array
              items:
                type: object
                properties:
                  user_id:
                    type: string
                    minLength: 1
                    maxLength: 255
                required:
                  - user_id
                additionalProperties:
                  anyOf:
                    - type: string
                      maxLength: 1024
                    - type: number
                    - type: boolean
                    - type: 'null'
      responses:
        '200':
          description: >-
            At least one item is valid. `results` has one entry per item, in
            request order.
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  failed:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  updated_at:
                    type: string
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        user_id:
                          type: string
                        set:
                          type: array
                          items:
                            type: string
                        deleted:
                          type: array
                          items:
                            type: string
                        error:
                          type: object
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                          required:
                            - code
                            - message
                      required:
                        - index
                required:
                  - updated
                  - failed
                  - updated_at
                  - results
        '400':
          description: >-
            `INVALID_PROPERTIES`: a key, a value or the user ID failed
            validation. Nothing is written.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            `UNAUTHORIZED`: the API key is missing, malformed, unknown or
            revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            `SUBSCRIPTION_REQUIRED`: the workspace has no active subscription or
            trial. `PLAN_UPGRADE_REQUIRED`: API keys need the Scale plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `FORBIDDEN`: the key has no `profiles:write` scope, its creator is
            below editor, or the request came from a browser.
            `WORKSPACE_SUSPENDED`: the workspace is suspended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            `NOT_FOUND`: the key belongs to another project, or the resource
            does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: '`TOO_LARGE`: the body is larger than the limit'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            `TOO_MANY_REQUESTS`: the key or workspace budget is used up.
            `RATE_LIMITED`: the project sent too many server events and profile
            writes this minute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              description: Seconds to wait before a retry
              schema:
                type: integer
        '500':
          description: '`INTERNAL`: an unexpected error. The body has a `request_id`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKey: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: A stable, machine-readable code. Branch on it.
            message:
              type: string
              description: A human-readable text. The wording can change.
            request_id:
              description: 'INTERNAL only: quote it when you contact support'
              type: string
          required:
            - code
            - message
      required:
        - error
      description: >-
        The error format of every endpoint. See
        https://docs.manalens.dev/api/errors.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        An API key (`mana_api_...`) with scopes. It reads reports and writes
        profile properties.

````

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