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

# Rename a client fact

> Renames one of the firm's own facts. Only the label changes; the key, type and single are fixed. Redbark's facts cannot be changed (builtin_locked). A label or instruction that asks for a tax file number, an identity document number, a government reference number or medical details is refused (value_never_kept). Only an admin can call this.



## OpenAPI

````yaml /openapi/advisor.json patch /fact_definitions/{fact}
openapi: 3.1.0
info:
  title: Redbark Advisor API
  version: 2.0.0
  description: >-
    Read and write access to one advice firm in Redbark Advisor: clients,
    checklists, documents, money, messages, reports, team and webhooks. Send an
    API key or a connected app’s access token as a bearer token. A credential
    carries scopes, one read and one write per area, and each call says the
    scope it needs. A write scope brings its read scope. Each key may make 120
    requests a minute.
servers:
  - url: https://advisor.redbark.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Firm
    description: The firm, its name and its branding.
  - name: Team
    description: Team members and their roles.
  - name: Clients
    description: Clients, their people and portal invites.
  - name: Checklists
    description: Checklist templates, the checklists sent to clients and their answers.
  - name: Documents
    description: Documents clients upload and the details read from them.
  - name: Money
    description: Bank connections, accounts, balances and transactions.
  - name: Document types
    description: Document types, their fields and the client facts they fill.
  - name: Messages
    description: Messages between the firm and clients.
  - name: Reports
    description: Reports exported for clients.
  - name: Webhooks
    description: Webhook endpoints and their deliveries.
  - name: Webhook events
    description: Events sent to your webhook endpoints.
paths:
  /fact_definitions/{fact}:
    patch:
      tags:
        - Document types
      summary: Rename a client fact
      description: >-
        Renames one of the firm's own facts. Only the label changes; the key,
        type and single are fixed. Redbark's facts cannot be changed
        (builtin_locked). A label or instruction that asks for a tax file
        number, an identity document number, a government reference number or
        medical details is refused (value_never_kept). Only an admin can call
        this.
      operationId: update_fact_definition
      parameters:
        - name: fact
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 60
            description: The fact key, such as firm_bonus, from list_fact_definitions.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  minLength: 1
                  maxLength: 80
              required:
                - label
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactDefinition'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The API key or access token is missing, wrong, expired or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            subscription_required: the firm has no active subscription, so it
            cannot add or invite clients or send checklists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The credential lacks the scope this call needs, the call is for
            admins only, or the member it acts as has left the firm.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such resource in this firm.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The resource is in a state that does not allow this, such as an
            archived client, or client_limit_reached: the plan’s 20 active
            clients are in use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: The request body is too large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many requests. See the Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong on our side. Try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth:
            - document_types:write
components:
  schemas:
    FactDefinition:
      type: object
      properties:
        object:
          type: string
          enum:
            - fact_definition
        id:
          anyOf:
            - type: string
            - type: 'null'
          description: Null for a built-in fact.
        key:
          type: string
          description: Such as salary, or firm_ and a slug for a fact the firm made.
        label:
          type: string
        type:
          type: string
          enum:
            - text
            - date
            - amount
          description: text, date (YYYY-MM-DD) or amount (dollars).
        single:
          type: boolean
          description: A client holds one value, so accepting a new one replaces the old.
        origin:
          type: string
          enum:
            - redbark
            - firm
          description: >-
            redbark for Redbark's own, which cannot be changed; firm for the
            firm's own.
        archived:
          type: boolean
          description: Filled from no new document. Values already accepted stay.
        filled_by:
          type: array
          items:
            type: object
            properties:
              type_key:
                type: string
              type_label:
                type: string
              field_key:
                type: string
              field_label:
                type: string
            required:
              - type_key
              - type_label
              - field_key
              - field_label
            additionalProperties: true
          description: The document fields that fill it.
        clients_with_value:
          type: number
          description: Clients holding an accepted value of it.
      required:
        - object
        - id
        - key
        - label
        - type
        - single
        - origin
        - archived
        - filled_by
        - clients_with_value
      additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - api_error
            code:
              type: string
            message:
              type: string
            param:
              anyOf:
                - type: string
                - type: 'null'
            request_id:
              type: string
          required:
            - type
            - code
            - message
            - param
            - request_id
          additionalProperties: true
      required:
        - error
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A firm API key, shown once when it is made, or a connected app’s OAuth
        access token. Each operation lists the scope it needs, such as
        clients:write.

````

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