Edit a pending thread message
curl --request PATCH \
--url https://api.matrices.com/v1/threads/{threadId}/queue/{inputId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"text": "<string>",
"type": "text"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: [{text: '<string>', type: 'text'}]})
};
fetch('https://api.matrices.com/v1/threads/{threadId}/queue/{inputId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/threads/{threadId}/queue/{inputId}"
payload = { "content": [
{
"text": "<string>",
"type": "text"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/queue/{inputId}"
payload := strings.NewReader("{\n \"content\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"content": [
{
"text": "<string>",
"type": "text"
}
],
"id": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"submitMode": "queue",
"turnId": "<string>",
"principal": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Messages
Edit a pending thread message
PATCH
/
v1
/
threads
/
{threadId}
/
queue
/
{inputId}
Edit a pending thread message
curl --request PATCH \
--url https://api.matrices.com/v1/threads/{threadId}/queue/{inputId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"text": "<string>",
"type": "text"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: [{text: '<string>', type: 'text'}]})
};
fetch('https://api.matrices.com/v1/threads/{threadId}/queue/{inputId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.matrices.com/v1/threads/{threadId}/queue/{inputId}"
payload = { "content": [
{
"text": "<string>",
"type": "text"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.matrices.com/v1/threads/{threadId}/queue/{inputId}"
payload := strings.NewReader("{\n \"content\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}{
"content": [
{
"text": "<string>",
"type": "text"
}
],
"id": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"submitMode": "queue",
"turnId": "<string>",
"principal": {
"id": "<string>",
"type": "user",
"identity": "<string>",
"origin": {
"provider": "slack",
"senderId": "<string>",
"tenantId": "<string>",
"channelId": "<string>",
"messageId": "<string>",
"threadId": "<string>"
}
}
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}{
"error": "<string>",
"message": "<string>",
"attemptsRemaining": 123,
"code": "<string>",
"retryAfterSeconds": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Ordered message content, bounded to 512 KiB of encoded JSON. At most 20 image blocks are permitted and image IDs must be unique within the message.
Required array length:
1 - 40 elements- Option 1
- Option 2
Show child attributes
Show child attributes
Response
Updated pending message.
Ordered message content, bounded to 512 KiB of encoded JSON. At most 20 image blocks are permitted and image IDs must be unique within the message.
Required array length:
1 - 40 elements- Option 1
- Option 2
Show child attributes
Show child attributes
Available options:
queue, steer, interrupt Show child attributes
Show child attributes