Messages
Set typing
Protocols: Linked Device API
Required scope: messages:write
POST
/
messaging
/
{session}
/
messages
/
typing
Set typing
curl --request POST \
--url https://api.polymorfa.com/messaging/{session}/messages/typing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"id": "pmfa_lid_123456789",
"phoneNumber": "+15550001111"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({conversation: {id: 'pmfa_lid_123456789', phoneNumber: '+15550001111'}})
};
fetch('https://api.polymorfa.com/messaging/{session}/messages/typing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/messaging/{session}/messages/typing"
payload = { "conversation": {
"id": "pmfa_lid_123456789",
"phoneNumber": "+15550001111"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/messaging/{session}/messages/typing"
payload := strings.NewReader("{\n \"conversation\": {\n \"id\": \"pmfa_lid_123456789\",\n \"phoneNumber\": \"+15550001111\"\n }\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))
}false{
"success": true,
"data": {
"status": "<string>"
}
}{
"success": true,
"data": {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"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"
}{
"error": {
"type": "upstream_error",
"code": "upstream_failure",
"message": "The messaging provider could not complete the request.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#upstream-failure"
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "A required service is unavailable. Check completion before repeating a write.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#service-unavailable"
}{
"error": {
"type": "api_error",
"code": "result_unknown",
"message": "The result was not obtained before the deadline. Check completion before repeating a write.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#result-unknown"
}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.
Body
application/json
Public conversation identifier or E.164 phone number.
Accepted alternatives
| Alternative | Accepted input |
|---|---|
| Alternative 1 | Required fields: id |
| Alternative 2 | Required fields: phoneNumber |
- Option 1
- Option 2
Show child attributes
Show child attributes
Typing state to publish for the target conversation.
Allowed values
| Value | Meaning |
|---|---|
typing | Typing. |
recording | Recording. |
paused | Paused. |
Available options:
typing, recording, paused ⌘I
Set typing
curl --request POST \
--url https://api.polymorfa.com/messaging/{session}/messages/typing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"id": "pmfa_lid_123456789",
"phoneNumber": "+15550001111"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({conversation: {id: 'pmfa_lid_123456789', phoneNumber: '+15550001111'}})
};
fetch('https://api.polymorfa.com/messaging/{session}/messages/typing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/messaging/{session}/messages/typing"
payload = { "conversation": {
"id": "pmfa_lid_123456789",
"phoneNumber": "+15550001111"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/messaging/{session}/messages/typing"
payload := strings.NewReader("{\n \"conversation\": {\n \"id\": \"pmfa_lid_123456789\",\n \"phoneNumber\": \"+15550001111\"\n }\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))
}false{
"success": true,
"data": {
"status": "<string>"
}
}{
"success": true,
"data": {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"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"
}{
"error": {
"type": "upstream_error",
"code": "upstream_failure",
"message": "The messaging provider could not complete the request.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#upstream-failure"
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "A required service is unavailable. Check completion before repeating a write.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#service-unavailable"
}{
"error": {
"type": "api_error",
"code": "result_unknown",
"message": "The result was not obtained before the deadline. Check completion before repeating a write.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#result-unknown"
}