Skip to content

v2: Missing types for custom_fields property in PersonsApi #690

Description

@JulienZD

There is no type definition for the custom_fields property in the v2 API types AddPersonRequest and UpdatePersonRequest, causing TypeScript to report a type error.

The v2 API does support custom fields on persons (I verified that it creates and updates a custom field on a person). I currently just ignore the TS error with @ts-expect-error, but it'd be nice if the types are updated.

It seems that the underlying issue is that the v2 OpenAPI spec is missing the field as well. If you look at the documentation for POST /api/v2/persons it's also missing from "Body parameters". Other endpoints, such as POST /api/v2/organizations do list custom_fields under "Body parameters".

I couldn't find a better place to report the issue regarding the OpenAPI spec, so I'm just putting it here in the hopes that it'll be fixed upstream.

Activity

  1. pkat commented on Jan 26, 2026

    @pkat

    We have also run into this problem. It would be great if the spec and types can get updated.

  2. siirimangus commented on Feb 6, 2026

    @siirimangus
    Contributor

    Hey, @JulienZD and @pkat, thank you for reporting this. The issue is now fixed in version 31.3.0. The public docs are also updated, the custom_fields was missing from Person and also from Product entities:

    POST /api/v2/persons
    PATCH /api/v2/persons/{id}
    POST /api/v2/products
    PATCH /api/v2/products/{id}

    I will close the issue, in case of any further problems, feel free to open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions