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

# Update a custom type

> Replaces a custom type's schema. Admin-only — core types are immutable and return 400. Re-runs the registration-time correctness rails (semver diff, inheritance check, field-name validation). The diff between the prior and new version sets the required version bump; mismatched bumps reject with `400 version_bump_mismatch`. See [Authoring types — semver diff](/concepts/authoring-types#server-side-semver-diff).



## OpenAPI

````yaml /openapi.json put /types/{id}
openapi: 3.1.0
info:
  title: Marfa API
  version: 4.2.0
  description: Typed data layer for structured personal data
servers: []
security: []
paths:
  /types/{id}:
    put:
      tags:
        - Types
      summary: Update a custom type
      description: >-
        Replaces a custom type's schema. Admin-only — core types are immutable
        and return 400. Re-runs the registration-time correctness rails (semver
        diff, inheritance check, field-name validation). The diff between the
        prior and new version sets the required version bump; mismatched bumps
        reject with `400 version_bump_mismatch`. See [Authoring types — semver
        diff](/concepts/authoring-types#server-side-semver-diff).
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                nullable: true
      responses:
        '200':
          description: Custom type updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: object
                    properties:
                      id:
                        type: string
                      label:
                        type: string
                      description:
                        type: string
                      parent:
                        type: string
                      fields:
                        type: object
                        additionalProperties:
                          nullable: true
                      version:
                        type: number
                      display_hints:
                        type: object
                        properties:
                          title_field:
                            type: string
                          body_field:
                            type: string
                      version_policy:
                        type: object
                        properties:
                          recent_days:
                            type: number
                          daily_snapshot_days:
                            type: number
                          weekly_snapshot_days:
                            type: number
                          max_versions:
                            type: number
                      merge_policy:
                        type: object
                        properties:
                          fields:
                            type: object
                            additionalProperties:
                              type: string
                              enum:
                                - last_writer_wins
                                - keep_both_copies
                          default:
                            type: string
                            enum:
                              - last_writer_wins
                              - keep_both_copies
                    required:
                      - id
                      - fields
                      - version
                required:
                  - type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - unauthorized
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: Type not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - type_not_found
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or OAuth Token
      description: Pass an API key (marfa_k1_...) or OAuth access token (marfa_at_...)

````