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.
There is no type definition for the
custom_fieldsproperty in the v2 API typesAddPersonRequestandUpdatePersonRequest, 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/personsit's also missing from "Body parameters". Other endpoints, such asPOST /api/v2/organizationsdo listcustom_fieldsunder "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.