Skip to main content

Vitally's HTTPS Analytics API - Custom Object Instances

Create or update your Custom Object Instances in Vitally using the /customobjectinstance API endpoint

Written by Ray
Updated today

Replace {subdomain} in the endpoint below with your Vitally subdomain.

You can find your subdomain in the URL used to log into Vitally (i.e., https://yoursubdomain.vitally.io

Relationship between a Custom Object and a Custom Object Instance

A Custom Object is a record type in Vitally tied to an Account or Organization that you define, like Deals or Opportunities.

A Custom Object Instance (COI) is one actual record of that type. If Deals is your Custom Object, then "Q1 Renewal – Acme Co" is a Custom Object Instance. It's a single, specific Custom Object record.

Create / Update a Custom Object Instance

This endpoint will create or update a Custom Object Instance in Vitally based on the externalId parameter.

Headers

Name

Type

Description

Content-Type*

string

Set to application/json

Authorization*

string

Set to Basic [YOUR_API_TOKEN]

Request Body

Name

Type

Description

externalId*

string

Required The unique ID of this custom object instance record in your system

customObjectId*

string

Required The ID of the Custom Object this instance belongs to (e.g., Deal or Opportunity)

The Custom Object ID can be found by referencing the ID in the URL when viewing the Custom Object settings in-app under Settings > Custom Objects > select your Custom Object.

name

string

Name of the Custom Object Instance

accountId

string

Required if organizationId is not included.

This should match the accountId you send in your account request

organizationId

string

Required if accountId is not included.

traits*

object

Required, but can be passed as an empty object "traits": {}

A JSON object containing the traits of this Custom Object Instance.

timestamp

string

Required if messageId is not included. An ISO 8601 UTC date string - i.e. '2018-01-01T00:00:00Z' - for the Custom Object Instance was created. If timestamp is not included, it will default to the time the API server receives your message.

messageId

string

Required if timestamp is not included. A unique ID for this message, used to de-duplicate messages. We recommend sending messageId, but if it is not included and timestamp is included, it will be set to a hash of the message.

200 When your Custom Object Instance is created/updated, you'll receive

{"message":"Success."}

Example

An example curl request creating a Custom Object Instance would look like:

curl -X POST https://{subdomain}.api.vitally.io/analytics/v1/customobjectinstance \
-H "Authorization: Basic [your token]" \
-H "Content-Type: application/json" \
-d '{
"externalId": "coi-789xyz",
"customObjectId": "2a3a47e7-459e-440e-b9d3-9fc1b11f233e",
"name": "Q1 Pulse Check",
"accountId": "8643da72-4eb4-44e0-a29e-9afc06748349",
"traits": {
"vitally.custom.pulse": "Green",
"vitally.custom.riskLevel": "Low"
},
"timestamp": "2026-04-06T00:54:13.058Z"
}'
Did this answer your question?