List ban safe enforcement
Lists every number Polymorfa is currently restricting, what the restriction blocks, and the exact condition that lifts it.
Requires sessions:read. Project tokens only access resources in their own project.
curl --request GET \
--url https://api.polymorfa.com/platform/bansafe/enforcement \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/platform/bansafe/enforcement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/bansafe/enforcement"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/bansafe/enforcement"
req, _ := http.NewRequest("GET", 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": [
{
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": "<string>",
"phoneNumber": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rung": "none",
"previousRung": "none",
"organizationFloor": "none",
"reason": "<string>",
"source": "automatic",
"throughputPerMinute": 123,
"blocksUnsolicited": true,
"suspended": true,
"health": 50,
"band": "good",
"healthSource": "rules_v1",
"healthEstimatorVersion": "<string>",
"healthModelVersion": "<string>",
"healthEvaluatedAt": "2023-11-07T05:31:56Z",
"healthFeatureCoverage": 0.5,
"healthReliability": "rules_based",
"healthUnavailableReason": "no_active_model",
"healthProbabilities": {
"healthy": 0.5,
"limited": 0.5,
"restricted": 0.5,
"banned": 0.5
},
"mostLikelyHealthState": "healthy",
"healthExplanation": {
"penalties": {
"conduct": 50,
"delivery": 50,
"connection": 50,
"restriction": 50,
"total": 50
},
"factors": [
{
"group": "direct_condition",
"key": "observed_limited",
"penalty": 50,
"observedValue": 123,
"sampleSize": 1
}
],
"measuredGroups": [
"direct_condition"
],
"missingGroups": [
"direct_condition"
]
},
"observedAccountState": {
"state": "healthy",
"observedAt": "2023-11-07T05:31:56Z",
"source": "account_check"
},
"blockingFindings": [
"<string>"
],
"startedAt": "2023-11-07T05:31:56Z",
"eligibleLiftAt": "2023-11-07T05:31:56Z",
"liftRequires": "<string>",
"operatorHold": true,
"appealState": "none",
"state": "applied",
"enforcement": {
"rung": "none",
"previousRung": "none",
"organizationFloor": "none",
"reason": "<string>",
"source": "automatic",
"throughputPerMinute": 123,
"blocksUnsolicited": true,
"suspended": true,
"startedAt": "2023-11-07T05:31:56Z",
"eligibleLiftAt": "2023-11-07T05:31:56Z",
"exitProgress": 1,
"blockingFindings": [
"<string>"
],
"operatorHold": true,
"appealState": "none",
"state": "applied"
}
}
],
"page": {
"nextCursor": "<string>",
"hasMore": true
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}Authorizations
Polymorfa server credential: a scoped pmfa_ organization key, or a pmfa_pt_ project token on project- and session-bound operations inside its exact authenticated project. Keys may be personal or service-account owned. Both enforce selected action scopes; organization keys can address team resources and every project in the organization. Listener and browser client credentials are rejected.
Query Parameters
Identifier of the Polymorfa project that owns this resource.
Specifies rung for this query parameter.
Allowed values
| Value | Meaning |
|---|---|
none | None. |
notify | Notify. |
throttle | Throttle. |
block_cold | Block cold. |
suspend | Suspend. |
none, notify, throttle, block_cold, suspend Specifies cursor for this query parameter.
Specifies limit for this query parameter.
Value constraints
| Constraint | Accepted input |
|---|---|
| Numeric value | 1 through 100 (inclusive) |
1 <= x <= 100curl --request GET \
--url https://api.polymorfa.com/platform/bansafe/enforcement \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/platform/bansafe/enforcement', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/bansafe/enforcement"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/bansafe/enforcement"
req, _ := http.NewRequest("GET", 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": [
{
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session": "<string>",
"phoneNumber": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rung": "none",
"previousRung": "none",
"organizationFloor": "none",
"reason": "<string>",
"source": "automatic",
"throughputPerMinute": 123,
"blocksUnsolicited": true,
"suspended": true,
"health": 50,
"band": "good",
"healthSource": "rules_v1",
"healthEstimatorVersion": "<string>",
"healthModelVersion": "<string>",
"healthEvaluatedAt": "2023-11-07T05:31:56Z",
"healthFeatureCoverage": 0.5,
"healthReliability": "rules_based",
"healthUnavailableReason": "no_active_model",
"healthProbabilities": {
"healthy": 0.5,
"limited": 0.5,
"restricted": 0.5,
"banned": 0.5
},
"mostLikelyHealthState": "healthy",
"healthExplanation": {
"penalties": {
"conduct": 50,
"delivery": 50,
"connection": 50,
"restriction": 50,
"total": 50
},
"factors": [
{
"group": "direct_condition",
"key": "observed_limited",
"penalty": 50,
"observedValue": 123,
"sampleSize": 1
}
],
"measuredGroups": [
"direct_condition"
],
"missingGroups": [
"direct_condition"
]
},
"observedAccountState": {
"state": "healthy",
"observedAt": "2023-11-07T05:31:56Z",
"source": "account_check"
},
"blockingFindings": [
"<string>"
],
"startedAt": "2023-11-07T05:31:56Z",
"eligibleLiftAt": "2023-11-07T05:31:56Z",
"liftRequires": "<string>",
"operatorHold": true,
"appealState": "none",
"state": "applied",
"enforcement": {
"rung": "none",
"previousRung": "none",
"organizationFloor": "none",
"reason": "<string>",
"source": "automatic",
"throughputPerMinute": 123,
"blocksUnsolicited": true,
"suspended": true,
"startedAt": "2023-11-07T05:31:56Z",
"eligibleLiftAt": "2023-11-07T05:31:56Z",
"exitProgress": 1,
"blockingFindings": [
"<string>"
],
"operatorHold": true,
"appealState": "none",
"state": "applied"
}
}
],
"page": {
"nextCursor": "<string>",
"hasMore": true
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>"
},
"data": null,
"docs": "<string>"
}