Get a presigned upload URL for a feedback attachment (MNE-1659)
curl --request POST \
--url https://api.mnemom.ai/v1/feedback/attachments/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 13107200
}
'import requests
url = "https://api.mnemom.ai/v1/feedback/attachments/presign"
payload = { "size_bytes": 13107200 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 13107200})
};
fetch('https://api.mnemom.ai/v1/feedback/attachments/presign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/feedback/attachments/presign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'size_bytes' => 13107200
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/feedback/attachments/presign"
payload := strings.NewReader("{\n \"size_bytes\": 13107200\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))
}HttpResponse<String> response = Unirest.post("https://api.mnemom.ai/v1/feedback/attachments/presign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"size_bytes\": 13107200\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/feedback/attachments/presign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"size_bytes\": 13107200\n}"
response = http.request(request)
puts response.read_body{
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_url": "<string>",
"method": "PUT",
"headers": {},
"expires_in": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Feedback
Get a presigned upload URL for a feedback attachment (MNE-1659)
Issues a presigned R2 PUT URL for a screenshot/screen-recording attachment and records a pending feedback_attachments row for it — the client uploads the byt…
POST
/
feedback
/
attachments
/
presign
Get a presigned upload URL for a feedback attachment (MNE-1659)
curl --request POST \
--url https://api.mnemom.ai/v1/feedback/attachments/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size_bytes": 13107200
}
'import requests
url = "https://api.mnemom.ai/v1/feedback/attachments/presign"
payload = { "size_bytes": 13107200 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({size_bytes: 13107200})
};
fetch('https://api.mnemom.ai/v1/feedback/attachments/presign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/feedback/attachments/presign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'size_bytes' => 13107200
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/feedback/attachments/presign"
payload := strings.NewReader("{\n \"size_bytes\": 13107200\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))
}HttpResponse<String> response = Unirest.post("https://api.mnemom.ai/v1/feedback/attachments/presign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"size_bytes\": 13107200\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/feedback/attachments/presign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"size_bytes\": 13107200\n}"
response = http.request(request)
puts response.read_body{
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"upload_url": "<string>",
"method": "PUT",
"headers": {},
"expires_in": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
BearerAuthApiKeyAuthCookieAuth
Supabase JWT token in Authorization: Bearer header
Body
application/json
MIME type of the attachment. Must match migration 397's feedback_attachments_content_type_ck exactly.
Available options:
image/png, image/jpeg, image/webp, video/webm, video/mp4 Declared size in bytes; 25MB cap. Advisory only — R2 does not enforce this against the actual PUT.
Required range:
1 <= x <= 26214400Response
Presigned upload URL issued.
Pass this in POST /feedback's attachment_ids to bind it.
Presigned R2 PUT URL. PUT the raw bytes here directly.
Allowed value:
"PUT"Headers the client must send with the PUT (Content-Type).
Show child attributes
Show child attributes
Seconds until the presigned URL expires.