V2 API Validation Error on Organzation Update

I’m getting an error from the V2 API when updating an organization (e.g., PATCH /api/v2/organizations/1653)

The API response is HTTP 400 with the following body:

{“success”:false,“error”:“Validation failed: custom_fields: Expected \u0027string\u0027 as short text custom field value, Expected \u0027string\u0027 as short text custom field value, Expected \u0027string\u0027 as short text custom field value”,“code”:“ERR_SCHEMA_VALIDATION_FAILED”}

I am not sending any null values or empty strings.

  • How do I know which fields are causing this issue? It appears that the API response does not include this information but that seems hard to believe.
  • How do I know which fields require a value? I’ve reviewed the API docs and it isn’t clear if that information is available.

Tyler

Hey!

Thank you for bringing this to our attention, we will look into providing more explicit error responses.

In this case in particular, it seems that you are providing a non-string value to 3 short text (‘varchar’ type) custom fields. Are you perhaps passing the string wrapped in a { value: … } object for these fields instead of a string?

Best regards,

Andreas