Remove the Contact ID - Cognigy Documentation

Remove the Contact ID

API Endpoint

POST /v2.0/profiles/{profileId}/contactids/remove

Request Example in cURL

curl --request POST \
  --url https://api-trial.cognigy.ai/new/v2.0/profiles/{profileId}/contactids/remove \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "contactId": "<string>"
}'

Request Example in Python

import requests

url = "https://api-trial.cognigy.ai/new/v2.0/profiles/{profileId}/contactids/remove"

payload = { "contactId": "<string>" }
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Request Example in JavaScript (Fetch API)

const options = {
  method: 'POST',
  headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({contactId: '<string>'})
};

fetch('https://api-trial.cognigy.ai/new/v2.0/profiles/{profileId}/contactids/remove', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

Response Codes

Headers

Required Header: