Custom Fields

Get all custom fields

get

/custom-fields

Authorizations
Query parameters
object_typestringrequired

The object type of the custom fields. Can be "account", "issue", or "contact".

Responses
curl -L \
  --url 'https://api.usepylon.com/custom-fields?object_type=text' \
  --header 'Authorization: Bearer JWT'
{
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text",
  "data": [
    {
      "created_at": "text",
      "default_value": "text",
      "description": "text",
      "id": "text",
      "is_read_only": true,
      "label": "text",
      "object_type": "text",
      "select_metadata": {
        "options": [
          {
            "label": "text",
            "slug": "text"
          }
        ]
      },
      "slug": "text",
      "source": "text",
      "type": "text",
      "updated_at": "text",
      "default_values": [
        "text"
      ]
    }
  ]
}

Get a custom field by its ID

get

/custom-fields/{id}

Authorizations
Path parameters
idstringrequired

The ID of the custom field.

Responses
curl -L \
  --url 'https://api.usepylon.com/custom-fields/{id}' \
  --header 'Authorization: Bearer JWT'
{
  "data": {
    "created_at": "text",
    "default_value": "text",
    "description": "text",
    "id": "text",
    "is_read_only": true,
    "label": "text",
    "object_type": "text",
    "select_metadata": {
      "options": [
        {
          "label": "text",
          "slug": "text"
        }
      ]
    },
    "slug": "text",
    "source": "text",
    "type": "text",
    "updated_at": "text",
    "default_values": [
      "text"
    ]
  },
  "request_id": "text"
}

Create a custom field

post

/custom-fields

Authorizations
Body
default_valuestring

The default value for single-valued custom fields.

descriptionstring

The description of the custom field.

labelstringrequired

The label of the custom field.

object_typestringrequired

The object type of the custom field. Can be "account", "issue", or "contact"

slugstring

The slug of the custom field.

typestringrequired

The type of the custom field. Can be one of text, number, decimal, boolean, date, datetime, user, url, select, or multiselect.

default_valuesstring[]

The default values for multi-valued custom fields.

select_optionsobject[]

The list options of the select custom field. This is only present for select and multiselect custom fields.

Responses
curl -L \
  --request POST \
  --url 'https://api.usepylon.com/custom-fields' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{"label":"text","object_type":"text","type":"text","default_values":[null],"select_options":[{}]}'
{
  "data": {
    "created_at": "text",
    "default_value": "text",
    "description": "text",
    "id": "text",
    "is_read_only": true,
    "label": "text",
    "object_type": "text",
    "select_metadata": {
      "options": [
        {
          "label": "text",
          "slug": "text"
        }
      ]
    },
    "slug": "text",
    "source": "text",
    "type": "text",
    "updated_at": "text",
    "default_values": [
      "text"
    ]
  },
  "request_id": "text"
}

Update a custom field

patch

/custom-fields/{id}

Authorizations
Path parameters
idstringrequired

The ID of the custom field.

Body
default_valuestring

The default value for single-valued custom fields.

descriptionstring

The description of the custom field.

labelstring

The label of the custom field.

slugstring

The slug of the custom field.

default_valuesstring[]

The default values for multi-valued custom fields.

select_optionsobject[]

The list options of the select custom field. This is only present for select and multiselect custom fields.

Responses
curl -L \
  --request PATCH \
  --url 'https://api.usepylon.com/custom-fields/{id}' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{"default_values":[null],"select_options":[{}]}'
{
  "data": {
    "created_at": "text",
    "default_value": "text",
    "description": "text",
    "id": "text",
    "is_read_only": true,
    "label": "text",
    "object_type": "text",
    "select_metadata": {
      "options": [
        {
          "label": "text",
          "slug": "text"
        }
      ]
    },
    "slug": "text",
    "source": "text",
    "type": "text",
    "updated_at": "text",
    "default_values": [
      "text"
    ]
  },
  "request_id": "text"
}

Last updated

Was this helpful?