ModernLoop Internal API
Apipylon

Create a Pylon custom field definition (POST /custom-fields)

Write operation: mutates state in the upstream service.

curl -X POST "https://api.modernloop.dev/rest/v1/pylon/custom-fields" \  -H "Authorization: Bearer $MLOOP_INTERNAL_MCP_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "label": "string",    "type": "text",    "object_type": "account"  }'
{  "data": {    "id": "string",    "slug": "string",    "label": "string",    "description": "string",    "type": "string",    "object_type": "string",    "source": "string",    "is_read_only": true,    "default_value": "string",    "default_values": [      "string"    ],    "created_at": "string",    "updated_at": "string",    "number_metadata": {      "currency": "string",      "decimal_places": 0,      "duration_display_format": "string",      "duration_input_unit": "string",      "format": "string"    },    "select_metadata": {      "options": [        {          "label": "string",          "slug": "string"        }      ]    }  },  "request_id": "string"}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}
{  "error": {    "code": "string",    "message": "string",    "upstreamStatus": 0  }}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

label*string
Length1 <= length
type*string

Value in

  • "text"
  • "number"
  • "decimal"
  • "boolean"
  • "date"
  • "datetime"
  • "user"
  • "url"
  • "select"
  • "multiselect"
object_type*string

Value in

  • "account"
  • "issue"
  • "contact"
  • "task"
  • "project"
  • "meeting"
  • "opportunity"
slug?string
description?string
default_value?string
default_values?array<string>
select_options?array<>

Response Body

application/json

application/json

application/json

application/json

application/json