Mailrelay API Reference

Add a new custom field

POST https://{account}/api/v1/custom_fields

Authentication

Requires an API key sent in the X-AUTH-TOKEN header.

Add a new custom field

Parameters

NameTypeRequiredDescription
label string Yes Label
tag_name string Yes Tag name
field_type string Yes Field type
required boolean No Required
default_value string No Default value
custom_field_options_attributes array No An array of custom field options. This is required if the field type is select, select_multiple or radio_buttons.

Responses

StatusDescription
201 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
429 Too many requests. You have exceeded the rate limit, wait and try again later.
500 An internal error happened. Try again later.

Response fields

NameTypeDescription
id integer ID
label string Label
tag_name string Tag name
field_type string Field type
required boolean Required
default_value string Default value
created_at string Created at
updated_at string Updated at
custom_field_options array Custom field options