cURL
# Get presigned URL
curl 'https://asset.legitmark.com/intent?sr=8e61c991-553a-4a58-9eb6-561b64c11908&side=ec883c70-f896-47c9-81b6-8d6ff0b5856a.jpg'
# Upload image to the returned presigned URL
curl -X PUT 'PRESIGNED_URL_FROM_ABOVE' \
-H 'Content-Type: image/jpeg' \
--data-binary @interior-size-tag.jpg// Step 1: Get presigned upload URL
const intentRes = await fetch(
'https://asset.legitmark.com/intent?sr=8e61c991-553a-4a58-9eb6-561b64c11908&side=ec883c70-f896-47c9-81b6-8d6ff0b5856a.jpg'
);
const { url } = await intentRes.json();
// Step 2: Upload image directly to S3
await fetch(url, {
method: 'PUT',
body: imageFile,
headers: { 'Content-Type': 'image/jpeg' },
});import requests
url = "https://asset.legitmark.com/intent"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://asset.legitmark.com/intent"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "Pre-signed URL generated successfully.",
"url": "https://s3.us-east-1.amazonaws.com/cdn.legitmark.com/sr/8e61c991-553a-4a58-9eb6-561b64c11908/ec883c70-f896-47c9-81b6-8d6ff0b5856a.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Expires=300&X-Amz-Signature=..."
}{
"success": false,
"error": {
"code": 123,
"timestamp": "2023-11-07T05:31:56Z",
"message": "<string>",
"details": "<string>"
}
}Media Management
Get Upload URL
Generate a pre-signed URL for secure media upload. This endpoint provides direct access to upload URLs for service request images.
Private-CDN organizations must not use this endpoint. It writes to the public bucket. Use Get Batch Upload URLs instead.
Example workflow:
# Step 1: Get pre-signed URL (with required sr and side parameters)
curl --location 'https://asset.legitmark.com/intent?sr=22077e95-b403-41bc-9c9d-ee0243a98fc7&side=3c14e504-8134-11ef-9e85-02d0d7ecc26b.jpg'
# Step 2: Upload to returned URL
curl -X PUT 'RETURNED_PRESIGNED_URL' \
-H 'Content-Type: image/jpeg' \
--data-binary '@image.jpg'
GET
https://asset.legitmark.com
/
intent
cURL
# Get presigned URL
curl 'https://asset.legitmark.com/intent?sr=8e61c991-553a-4a58-9eb6-561b64c11908&side=ec883c70-f896-47c9-81b6-8d6ff0b5856a.jpg'
# Upload image to the returned presigned URL
curl -X PUT 'PRESIGNED_URL_FROM_ABOVE' \
-H 'Content-Type: image/jpeg' \
--data-binary @interior-size-tag.jpg// Step 1: Get presigned upload URL
const intentRes = await fetch(
'https://asset.legitmark.com/intent?sr=8e61c991-553a-4a58-9eb6-561b64c11908&side=ec883c70-f896-47c9-81b6-8d6ff0b5856a.jpg'
);
const { url } = await intentRes.json();
// Step 2: Upload image directly to S3
await fetch(url, {
method: 'PUT',
body: imageFile,
headers: { 'Content-Type': 'image/jpeg' },
});import requests
url = "https://asset.legitmark.com/intent"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://asset.legitmark.com/intent"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "Pre-signed URL generated successfully.",
"url": "https://s3.us-east-1.amazonaws.com/cdn.legitmark.com/sr/8e61c991-553a-4a58-9eb6-561b64c11908/ec883c70-f896-47c9-81b6-8d6ff0b5856a.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Expires=300&X-Amz-Signature=..."
}{
"success": false,
"error": {
"code": 123,
"timestamp": "2023-11-07T05:31:56Z",
"message": "<string>",
"details": "<string>"
}
}Supported File Types
| Extension | MIME Type |
|---|---|
.jpg / .jpeg | image/jpeg |
.png | image/png |
.heic | image/heic |
.dng | image/x-adobe-dng |
The
side parameter must include a file extension (e.g. side-uuid.jpg). Requests without an extension return 400.Private-CDN organizations should call
POST /api/media/signed-urls/ instead. This route writes to the public bucket.Query Parameters
Service request UUID
Side UUID with file extension appended (e.g., {side_uuid}.jpg). The file extension determines the upload content type. Allowed extensions: jpg, jpeg, png, heic, dng