POST
/
v1
/
s
/
models
/
{modelId}
/
fields
const options = {
  method: 'POST',
  headers: {
    'x-api-key': '<api-key>',
    'x-api-secret': '<api-key>',
    'Content-Type': 'application/json'
  },
  body: '{"key":"<string>","name":"<string>","description":"<string>","type":"text","format":"<string>","unit":"<string>","optionSource":"<string>","options":[{"value":"<string>","name":"<string>"}],"remote":{"key":"<string>","metadata":{}}}'
};

fetch('https://api.runmorph.dev/v1/s/models/{modelId}/fields', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
{
  "key": "<string>",
  "name": "<string>",
  "description": "<string>",
  "type": "text",
  "format": "<string>",
  "unit": "<string>",
  "optionSource": "<string>",
  "options": [
    {
      "value": "<string>",
      "name": "<string>"
    }
  ],
  "isRequired": true,
  "isFieldReadOnly": true,
  "isValueReadOnly": true,
  "isCustom": true,
  "remote": {
    "key": "<string>",
    "metadata": {}
  }
}

Authorizations

x-api-key
string
header
required
x-api-secret
string
header
required

Path Parameters

modelId
enum<string>
required
Available options:
genericCompany,
genericContact,
genericUser,
genericWorkspace,
crmOpportunity,
crmStage,
crmPipeline,
crmEngagement,
telephonyCall,
telephonyCallTranscript,
schedulingEventType,
schedulingSlot,
schedulingEvent,
widgetCardView,
accountingInvoice,
accountingInvoiceLineItem,
accountingInvoiceItem

Body

Response

201
application/json

Created

The response is of type object.