Mailrelay API Reference

Update a custom field

PATCH /custom_fields/{id}

In order to update an existing custom field option, you must provide the id of the field. If you don't provide an id, it will create a new option.

If you want to remove an option, provide the id and an attribute called _destroy. Example:

[
  {
    id: 9,
    _destroy: true
  }
]

This would remove the custom field option with id 9.

Parameters

NameTypeDescription
id integer ID of the record
label string Label
tag_name string Tag name
required boolean Required
default_value string Default value
custom_field_options_attributes array An array of custom field options. This is required if the field type is select, select_multiple or radio_buttons.

Responses

StatusDescription
200 Success
400 The request is invalid. Check if the field names in the request and the request data is valid.
422 A validation error occurred. Check the response body for more information.
401 The API key wasn't sent or is invalid
500 An internal error happened. Try again later.