Safe Mode
Get session safe mode
Protocols: Linked Device API
Required scope: sessions:read
GET
/
messaging
/
{session}
/
safe-mode
Get session safe mode
curl --request GET \
--url https://api.polymorfa.com/messaging/{session}/safe-mode \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/messaging/{session}/safe-mode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/messaging/{session}/safe-mode"
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/messaging/{session}/safe-mode"
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{
"success": true,
"data": {
"session": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project": {
"presence": "dark",
"typing": "off",
"reads": "off",
"pacing": "off",
"onlineStart": 11,
"onlineEnd": 11
},
"override": {
"presence": "inherit",
"typing": "inherit",
"reads": "inherit",
"pacing": "inherit"
},
"effective": {
"presence": "dark",
"typing": "off",
"reads": "off",
"pacing": "off",
"onlineStart": 11,
"onlineEnd": 11
},
"applied": {
"observedAt": "<string>",
"presence": "<string>",
"typing": "<string>",
"reads": "<string>",
"pacing": "<string>"
},
"mismatch": true,
"entitled": true,
"entitlementReason": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "Correct the invalid request field.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-parameter"
}{
"error": {
"type": "authentication_error",
"code": "invalid_credential",
"message": "Supply a valid credential.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-credential"
}{
"error": {
"type": "permission_error",
"code": "permission_denied",
"message": "The credential does not have access to this resource.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#permission-denied"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "The resource is unavailable to this caller.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#resource-not-found"
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected service failure occurred. Keep the request ID for support.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#internal-error"
}Authorizations
Polymorfa organization key (pmfa_ prefix), project token (pmfa_pt_ prefix) where supported, or short-lived client token (pmfa_ct_ prefix). Organization and project keys may be personal or service-account owned and enforce selected action scopes. Organization keys cover the team and its projects; project tokens stay inside one project. Client tokens stay inside their live project and session and enforce their client rules.
Path Parameters
Identifier of the connected Polymorfa session.
Value constraints
| Constraint | Accepted input |
|---|---|
| String length | At least 1 characters |
Minimum string length:
1Response
Project ceiling, number override, the effective policy, and whether the plan includes BanSafe Lite
⌘I
Get session safe mode
curl --request GET \
--url https://api.polymorfa.com/messaging/{session}/safe-mode \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/messaging/{session}/safe-mode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/messaging/{session}/safe-mode"
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/messaging/{session}/safe-mode"
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{
"success": true,
"data": {
"session": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project": {
"presence": "dark",
"typing": "off",
"reads": "off",
"pacing": "off",
"onlineStart": 11,
"onlineEnd": 11
},
"override": {
"presence": "inherit",
"typing": "inherit",
"reads": "inherit",
"pacing": "inherit"
},
"effective": {
"presence": "dark",
"typing": "off",
"reads": "off",
"pacing": "off",
"onlineStart": 11,
"onlineEnd": 11
},
"applied": {
"observedAt": "<string>",
"presence": "<string>",
"typing": "<string>",
"reads": "<string>",
"pacing": "<string>"
},
"mismatch": true,
"entitled": true,
"entitlementReason": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "Correct the invalid request field.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-parameter"
}{
"error": {
"type": "authentication_error",
"code": "invalid_credential",
"message": "Supply a valid credential.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-credential"
}{
"error": {
"type": "permission_error",
"code": "permission_denied",
"message": "The credential does not have access to this resource.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#permission-denied"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "The resource is unavailable to this caller.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#resource-not-found"
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected service failure occurred. Keep the request ID for support.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#internal-error"
}