Skip to main content
REST API: Custom Traits
Laura Bedoya avatar
Written by Laura Bedoya
Updated over 3 months ago

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 { label, value }[]

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

string

Accepts one of:

users,

accounts, organizations, customObjects, tasks, notes, projects, conversations, or team

Always

customObjectId

string

The Vitally ID of the custom object to retrieve traits for

When model is customObjects

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"
}
]

Did this answer your question?