The Custom Trait object
Property | Description |
id | Vitally's unique ID for the trait |
createdAt | Datetime the trait was created |
label | The user-facing label/name for the trait |
path | The path (or key) to use when setting this trait via the API |
type | The data type of the trait (e.g. string, datetime, etc) |
options | If applicable, an array of any of the traits configured options |
Replace {subdomain}
in the endpoints below with your Vitally subdomain.
You can find your subdomain in the URL used to log into Vitally (i.e., https://yoursubdomain.vitally.io
List Custom Traits GET
US Data Center (default):
https://{subdomain}.rest.vitally.io/resources/customFields
EU Data Center:
https://rest.vitally-eu.io/resources/customFields
All returned traits ordered alphabetically by label.
List Custom Traits By Model GET
US Data Center (default):
https://{subdomain}.rest.vitally.io/resources/customFields?model={model}
EU Data Center:
https://rest.vitally-eu.io/resources/customFields?model={model}
Params
Property | Type | Description | Required |
model |
| Accepts one of:
| Always |
customObjectId |
| The Vitally ID of the custom object to retrieve traits for | When |
All returned traits are ordered alphabetically by label.
Example Request
GET https://{subdomain}.rest.vitally.io/resources/customFields?model=users
GET https://{subdomain}.rest.vitally.io/resources/customFields?model=customObjects&customObjectId=XXXX
Example Response
[
{
"label": "Next step",
"type": "textarea",
"createdAt": "2020-12-11T20:16:27.370Z",
"path": "vitally.custom.nextSteps"
}
]