How do I get and set custom field values using the agentOS API?
The agentOS API allows you to retrieve and update custom field values on any object (such as a property, tenancy, or landlord) using the Company Controller endpoints available on all V4 tiers, excluding Calmony.
The agentOS API includes endpoints for displaying, retrieving, and setting custom field values. These are available on all V4 tiers via the Company Controller, with the exception of the Calmony tier.
You can explore and test all endpoints using the Swagger Documentation.
Get Custom Field by ObjectID
This endpoint returns all custom fields associated with a specific object, along with their current values.
Request URL:
GET /v4/advertising/{shortName}/company/object/{objectID}/customfield
Required parameters:
| Parameter | Type | Description |
|---|---|---|
| shortName | string (path) | Your unique client short-name |
| objectID | string (path) | The unique Object ID (OID) of the record — this can be a property, tenancy, landlord, or any other object with custom fields |
Example response:
{
"CustomFields": [
{
"ID": "string",
"TabName": "string",
"GroupName": "string",
"FieldName": "string",
"Value": {}
}
]
}
Get Custom Field Value
This endpoint retrieves the value of a specific custom field on an object.
Required parameters:
- shortName
- Object OID
- Field ID — this can be retrieved from the Get Custom Field by ObjectID endpoint above
The response returns the value of the custom field only.
Get & Set Custom Field Value
You can both retrieve and update custom field values via the API. Any changes made through the API will be reflected in agentOS immediately.
To set a custom field value, use the appropriate endpoint in the Company Controller on V4. Changes apply across all V4 tiers, excluding Calmony.
Required parameters:
- shortName
- Object OID
- Field ID — retrieved from the Get Custom Field by ObjectID endpoint
Note: Custom fields must first be created within agentOS before they can be accessed or updated via the API. For guidance on setting up custom fields, see the article How do I add, hide, and rename fields in agentOS?
If you need assistance with the API or custom field configuration, contact support@agentos.com.