Delete a tag
curl --request DELETE \
--url https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Tag deleted successfully!",
"data": {
"data": {
"tag_id": "c9d8e7f6-a5b4-3210-9876-543210fedcba",
"message": "Tag deleted successfully"
}
}
}{
"status": "failure",
"error": "Required parameters missing: tag_id"
}{
"error": "Unauthorized access",
"code": "UNAUTHORIZED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"status": "failure",
"error": "You don't have permission to delete tag!"
}{
"status": "failure",
"error": "Problem encountered while deleting tag!"
}{
"error": "Too many requests, please try again later",
"code": "RATE_LIMIT_EXCEEDED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"error": "Problem encountered while fetching companies!",
"code": "INTERNAL_ERROR",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}Tags
Delete a tag
Permanently deletes a tag from the system. User must have ‘contacts’ access role to delete tags.
DELETE
/
v1
/
delete-tag
/
{company_id}
/
{tag_id}
Delete a tag
curl --request DELETE \
--url https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salescaptain.com/v1/delete-tag/{company_id}/{tag_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Tag deleted successfully!",
"data": {
"data": {
"tag_id": "c9d8e7f6-a5b4-3210-9876-543210fedcba",
"message": "Tag deleted successfully"
}
}
}{
"status": "failure",
"error": "Required parameters missing: tag_id"
}{
"error": "Unauthorized access",
"code": "UNAUTHORIZED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"status": "failure",
"error": "You don't have permission to delete tag!"
}{
"status": "failure",
"error": "Problem encountered while deleting tag!"
}{
"error": "Too many requests, please try again later",
"code": "RATE_LIMIT_EXCEEDED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"error": "Problem encountered while fetching companies!",
"code": "INTERNAL_ERROR",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}Authorizations
Authentication token required for accessing protected endpoints. The token should be obtained from the main SalesCaptain authentication service.
Path Parameters
Unique identifier for the company
Example:
"7f22b96a-f75b-461e-9a1d-b8ff6f53f519"
Unique identifier for the tag to delete
Example:
"c9d8e7f6-a5b4-3210-9876-543210fedcba"
⌘I

