Skip to main content
Vitally's HTTPS Analytics API - Unlink

Unlink a user from an account using the /unlink API endpoint

Laura Bedoya avatar
Written by Laura Bedoya
Updated over 3 months ago

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

Unlink a user from an account

POST https://{subdomain}.api.vitally.io/analytics/v1/unlink

This endpoint will unlink the user specified by userId from the account specified by accountId in Vitally.

Headers

Name

Type

Description

Content-Type*

string

Set to application/json

Authorization*

string

Set to Basic [YOUR_API_TOKEN]

Request Body

Name

Type

Description

userId*

string

The unique ID of the user in your system

accountId*

string

The unique ID of the account in your system

timestamp

string

Required if messageId is not included. An ISO 8601 UTC date string - i.e. '2018-01-01T00:00:00Z' - for the time the message was sent. 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 message has been validated and accepted by the API you'll receive

{"message":"Success."}

Example

An example curl request describing a Vitally user would look like:

curl -X POST https://{subdomain}.api.vitally.io/analytics/v1/unlink \
-H "Authorization: Basic [your token]" \
-H "Content-Type: application/json" \
-d '{
"userId": "32",
"accountId": "123456",
"messageId": "7ac1c682-a54b-4d0d-9f56-d6d3618f4915",
"timestamp": "2018-05-15T12:31:12.123Z"
}'
Did this answer your question?