Set custom fields with pkey/generate

Hi,

I am trying to declare required custom fields when generating a key with the JSON API method, but I always get an error.
Here is the JSON object :

{
“api_key”: “MY_API_KEY”,
“cust_field_id[]”: [
300,
302
],
“cust_field_value[]”: [
“Undefined”,
“XXX”
],
“version_id”: “VERSION_ID”
}

Hi always received this reply :
{
“error”: {
“code”: “107”,
“message”: “Missing custom field ids and values!”
},
“success”: false
}

There is no other required custom fields than 300 and 302. Could you help me to find what is wrong ?
Regards,

Hi,

The API does not accept json data, which server language are you using. You can try the php/.net sdk in case you are using any of the two.

Hi,

Sorry I thought that request should be formatted as Json data. Actually it was well working with ‘generate’, ‘id’ and ‘delete’ methods but not when passing custom fields parameters to ‘generate’ method.

Thank you for your help.
Regards,