Bansafe
Retract ban safe incident
Withdraws a customer report and returns its incident record. Repeating the request returns the closed record. An incident observed from WhatsApp cannot be withdrawn and returns 409 bansafe_incident_not_a_report. An unknown incident returns 404.
Requires a team API key with sessions:manage. Project tokens are not accepted.
POST
/
platform
/
bansafe
/
incidents
/
{incidentId}
/
retract
Retract ban safe incident
curl --request POST \
--url https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract"
req, _ := http.NewRequest("POST", 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))
}false{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": "<string>",
"phoneNumber": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "cap_warning",
"source": "runtime",
"resolution": "<string>",
"ambiguous": true,
"startedAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"closedAt": "2023-11-07T05:31:56Z",
"closedBy": "<string>",
"claimId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>",
"reportedBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}Authorizations
Send your team API key or project token as Authorization: Bearer <token>. The credential must have the required permissions. Project tokens can access only their own project.
Path Parameters
Identifier for the incident.
Response
Success
Structured data carried by this object.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Retract ban safe incident
curl --request POST \
--url https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/bansafe/incidents/{incidentId}/retract"
req, _ := http.NewRequest("POST", 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))
}false{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": "<string>",
"phoneNumber": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "cap_warning",
"source": "runtime",
"resolution": "<string>",
"ambiguous": true,
"startedAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"closedAt": "2023-11-07T05:31:56Z",
"closedBy": "<string>",
"claimId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>",
"reportedBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}