API Reference
Cancel follow up
Requires crm:followups:write.
POST
/
crm
/
follow-ups
/
{followUpId}
/
cancel
Cancel follow up
curl --request POST \
--url https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedbackReason": "<string>"
}
'import requests
url = "https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel"
payload = { "feedbackReason": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({feedbackReason: '<string>'})
};
fetch('https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel', 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://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feedbackReason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel"
payload := strings.NewReader("{\n \"feedbackReason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"feedbackReason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feedbackReason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"followUp": {
"followUpId": "<string>",
"leadId": "<string>",
"status": "<string>",
"mode": "<string>",
"opportunityId": "<string>",
"conversationId": "<string>",
"channel": "<string>",
"reasonCode": "<string>",
"reasonText": "<string>",
"reason": "<string>",
"messageDraft": "<string>",
"draftStatus": "<string>",
"dueAt": "<string>",
"expiresAt": "<string>",
"sentAt": "<string>",
"replyId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}Autorizaciones
Server-side tenant-scoped credential created from Build > API Keys.
Parámetros de ruta
Required string length:
1 - 200Cuerpo
application/json
Maximum string length:
40Respuesta
Success
Show child attributes
Show child attributes
⌘I
Cancel follow up
curl --request POST \
--url https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedbackReason": "<string>"
}
'import requests
url = "https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel"
payload = { "feedbackReason": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({feedbackReason: '<string>'})
};
fetch('https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel', 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://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'feedbackReason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel"
payload := strings.NewReader("{\n \"feedbackReason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"feedbackReason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.visitoai.com/m2m/v1/crm/follow-ups/{followUpId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feedbackReason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"followUp": {
"followUpId": "<string>",
"leadId": "<string>",
"status": "<string>",
"mode": "<string>",
"opportunityId": "<string>",
"conversationId": "<string>",
"channel": "<string>",
"reasonCode": "<string>",
"reasonText": "<string>",
"reason": "<string>",
"messageDraft": "<string>",
"draftStatus": "<string>",
"dueAt": "<string>",
"expiresAt": "<string>",
"sentAt": "<string>",
"replyId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}{
"error": {
"code": "M2M_AUTH_INSUFFICIENT_SCOPE",
"message": "M2M credential does not have required scope.",
"details": {
"requiredScopes": [
"conversations:write"
],
"missingScopes": [
"conversations:write"
]
}
}
}