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

# Update a profile custom field

> Updates a definition. Requires an admin application key (tenant-scoped, created by an owner or admin) or a dashboard user token. Writes by a user token require an owner or admin.



## OpenAPI

````yaml /api-reference/admin-api.json patch /v2/organizations/{orgId}/profile-custom-fields/{profileCustomFieldId}
openapi: 3.0.0
info:
  version: 1.0.0
  title: MinervaAI Admin API
  description: Admin endpoints for the Minerva application suite.
servers:
  - url: https://admin-api.gominerva.com
    description: The instance of admin-api to send the Swagger test requests to
security:
  - ApiKeyAuth: []
tags: []
paths:
  /v2/organizations/{orgId}/profile-custom-fields/{profileCustomFieldId}:
    patch:
      tags:
        - Profile Custom Fields
      summary: Update a profile custom field
      description: >-
        Updates a definition. Requires an admin application key (tenant-scoped,
        created by an owner or admin) or a dashboard user token. Writes by a
        user token require an owner or admin.
      parameters:
        - in: path
          name: orgId
          required: true
          schema:
            type: string
          description: >-
            The organization (tenant) id. Must equal the tenant of the admin
            key.
        - in: path
          name: profileCustomFieldId
          required: true
          schema:
            type: string
          description: The profile custom field id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileCustomFieldUpdateRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantConfigRecordResponse'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            No credentials were sent; the API key was revoked, has expired, or
            its application is deactivated (`API-key authentication was
            denied.`); the key is not an admin application key (standard keys
            and keys that are not application keys are refused); it belongs to
            another organization; or its creator is no longer an owner or admin.
            For a user token, the user is not a member, or is not an owner or
            admin on a write.
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: >-
            The workspace or record is not in this organization, or the
            application API key (`mrva-…`) is unknown (`API-key authentication
            was denied.`).
          content:
            text/plain:
              schema:
                type: string
        '503':
          description: >-
            The authentication service is temporarily unavailable
            (`Authentication service is unavailable.`). Nothing was changed;
            retry with backoff.
          content:
            text/plain:
              schema:
                type: string
      security:
        - AdminApiKeyAuth: []
        - UserTokenAuth: []
components:
  schemas:
    ProfileCustomFieldUpdateRequest:
      type: object
      description: >-
        At least one member is required. `key` and `type` are immutable: a
        changed value is 409. `archived` archives or restores the definition.
      additionalProperties: false
      minProperties: 1
      properties:
        key:
          type: string
          maxLength: 64
          description: >-
            Derived from `label` when omitted. Human keys are slugified ("Loan
            Number" → loan_number); `$` and `.` are rejected.
        label:
          type: string
          minLength: 1
          maxLength: 120
        description:
          type: string
          maxLength: 1000
        type:
          type: string
          enum:
            - text
            - number
            - date
            - boolean
            - enum
            - json
          description: Case-insensitive; stored lowercased.
        required:
          type: boolean
        enumValues:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/ProfileCustomFieldEnumValue'
        searchable:
          type: boolean
        displayInList:
          type: boolean
        priority:
          type: integer
          minimum: 0
          maximum: 1000000
        archived:
          type: boolean
    TenantConfigRecordResponse:
      type: object
      description: >-
        Envelope `{ data: { id, ... } }` carrying the requested
        tenant-configuration record(s).
      additionalProperties: true
      properties:
        data:
          type: object
          additionalProperties: true
    ApiError:
      type: object
      description: Standard API error response
      properties:
        status:
          type: number
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Error message
          example: Bad request
        code:
          type: string
          description: Error code
          example: VALIDATION_ERROR
      required:
        - status
        - message
    ProfileCustomFieldEnumValue:
      type: object
      additionalProperties: false
      properties:
        value:
          type: string
          maxLength: 64
          description: The stored slug. Derived from `label` when omitted.
        label:
          type: string
          maxLength: 120
        order:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Admin API key for authentication. Manage API keys in the Minerva
        dashboard under Administration > Developers.
    AdminApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        An admin application key: `Authorization: Api-Key <token>` (or legacy
        `x-api-key`). Only tenant owners and admins can create one. Standard
        keys are refused with 403 on workspace management and tenant
        configuration routes.
    UserTokenAuth:
      type: apiKey
      in: header
      name: x-user-token
      description: Firebase user token for authentication

````

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