Star message
Protocols: Linked Device API
Required scope: messages:write
curl --request POST \
--url https://api.polymorfa.com/messaging/{session}/messages/star \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"id": "739182640518203",
"phoneNumber": "<string>",
"bsuid": "<string>",
"username": "<string>"
},
"id": "739182640518203",
"star": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversation: {
id: '739182640518203',
phoneNumber: '<string>',
bsuid: '<string>',
username: '<string>'
},
id: '739182640518203',
star: true
})
};
fetch('https://api.polymorfa.com/messaging/{session}/messages/star', 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/star"
payload = {
"conversation": {
"id": "739182640518203",
"phoneNumber": "<string>",
"bsuid": "<string>",
"username": "<string>"
},
"id": "739182640518203",
"star": True
}
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/star"
payload := strings.NewReader("{\n \"conversation\": {\n \"id\": \"739182640518203\",\n \"phoneNumber\": \"<string>\",\n \"bsuid\": \"<string>\",\n \"username\": \"<string>\"\n },\n \"id\": \"739182640518203\",\n \"star\": true\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": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}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
Public conversation identifier or E.164 phone number.
Accepted alternatives
| Alternative | Accepted input |
|---|---|
| Alternative 1 | Required fields: id |
| Alternative 2 | Required fields: phoneNumber |
| Alternative 3 | Required fields: bsuid |
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Opaque Polymorfa resource ID. Keep this value as a string.
Value constraints
| Constraint | Accepted input |
|---|---|
| Pattern | ^[1-9][0-9]{0,18}$ |
^[1-9][0-9]{0,18}$"739182640518203"
Whether star.
Was this page helpful?
curl --request POST \
--url https://api.polymorfa.com/messaging/{session}/messages/star \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation": {
"id": "739182640518203",
"phoneNumber": "<string>",
"bsuid": "<string>",
"username": "<string>"
},
"id": "739182640518203",
"star": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversation: {
id: '739182640518203',
phoneNumber: '<string>',
bsuid: '<string>',
username: '<string>'
},
id: '739182640518203',
star: true
})
};
fetch('https://api.polymorfa.com/messaging/{session}/messages/star', 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/star"
payload = {
"conversation": {
"id": "739182640518203",
"phoneNumber": "<string>",
"bsuid": "<string>",
"username": "<string>"
},
"id": "739182640518203",
"star": True
}
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/star"
payload := strings.NewReader("{\n \"conversation\": {\n \"id\": \"739182640518203\",\n \"phoneNumber\": \"<string>\",\n \"bsuid\": \"<string>\",\n \"username\": \"<string>\"\n },\n \"id\": \"739182640518203\",\n \"star\": true\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": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}