Skip Navigation
Expand
Custom fields in REST API
Answer ID 11152   |   Last Review Date 10/11/2019

How do I create and update custom fields using the REST API?

Environment:

Connect REST API

Resolution:

URL syntax and body used for REST API requests involving custom fields can be made in two ways.

This first way applies to when accessing only custom fields(s) for an object. In this case the request URL includes the customFields sub-resource:
 
https://[site/interface domain]/services/rest/connect/v1.4/[object type containing custom field(s)]/[id of object]/customFields/
 
and is used with a request body such as this (notice quotes around the value since this is a text field):
 
{
    "c": {         
    "csg_level": "sample text"       
    }     
}
 
Custom fields can be accessed along with other fields in an object also. In this case the request URL does not include the customFields sub-resource:
 
https://[site/interface domain]/services/rest/connect/v1.4/[object type containing custom field(s)]/[id of object]
 
and is used with a request body such as this:
 
{
  customFields": {     
    "c": {         
    "csg_level": "sample text"       
    }     
  }
}

For further details please see the Manage Custom Objects section within the API documentation.


Available Languages for this Answer:

Notify Me
The page will refresh upon submission. Any pending input will be lost.