Start a screenshot upload
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"filename": "<string>",
"byteSize": 5242880,
"name": "<string>",
"width": 5000,
"height": 5000,
"markers": [
{
"stringId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"filePath": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filename: '<string>',
byteSize: 5242880,
name: '<string>',
width: 5000,
height: 5000,
markers: [
{
stringId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
key: '<string>',
filePath: '<string>'
}
]
})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots"
payload = {
"filename": "<string>",
"byteSize": 5242880,
"name": "<string>",
"width": 5000,
"height": 5000,
"markers": [
{
"stringId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"filePath": "<string>"
}
]
}
headers = {
"x-api-key": "<api-key>",
"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://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots"
payload := strings.NewReader("{\n \"filename\": \"<string>\",\n \"byteSize\": 5242880,\n \"name\": \"<string>\",\n \"width\": 5000,\n \"height\": 5000,\n \"markers\": [\n {\n \"stringId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"key\": \"<string>\",\n \"filePath\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}{
"screenshot": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filename": "<string>",
"contentType": "image/png",
"status": "upload_pending",
"width": 123,
"height": 123,
"imageUrl": "<string>",
"figmaUrl": "<string>",
"markers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"screenshotId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stringId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"filePath": "<string>",
"marker": {
"left": 50,
"top": 50,
"width": 99,
"height": 99
},
"source": "manual"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"upload": {
"url": "<string>",
"method": "PUT",
"headers": {},
"expiresAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Screenshots
Start a screenshot upload
Requires strings:write. Native projects only. Returns a screenshot in upload_pending and a time-limited PUT URL. PUT the image bytes (PNG, JPEG, or WebP, 1 byte to 10 MB) with the returned headers, then call finalize. Object storage must be configured or the service returns 503 screenshot_storage_unavailable. Optional markers attach keys before the image is ready. Figma fields are read-only.
POST
https://public-api.hyperlocalise.com
/
v1
/
projects
/
{projectId}
/
screenshots
Start a screenshot upload
curl --request POST \
--url https://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"filename": "<string>",
"byteSize": 5242880,
"name": "<string>",
"width": 5000,
"height": 5000,
"markers": [
{
"stringId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"filePath": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filename: '<string>',
byteSize: 5242880,
name: '<string>',
width: 5000,
height: 5000,
markers: [
{
stringId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
key: '<string>',
filePath: '<string>'
}
]
})
};
fetch('https://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots"
payload = {
"filename": "<string>",
"byteSize": 5242880,
"name": "<string>",
"width": 5000,
"height": 5000,
"markers": [
{
"stringId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"filePath": "<string>"
}
]
}
headers = {
"x-api-key": "<api-key>",
"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://public-api.hyperlocalise.com/v1/projects/{projectId}/screenshots"
payload := strings.NewReader("{\n \"filename\": \"<string>\",\n \"byteSize\": 5242880,\n \"name\": \"<string>\",\n \"width\": 5000,\n \"height\": 5000,\n \"markers\": [\n {\n \"stringId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"key\": \"<string>\",\n \"filePath\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}{
"screenshot": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"filename": "<string>",
"contentType": "image/png",
"status": "upload_pending",
"width": 123,
"height": 123,
"imageUrl": "<string>",
"figmaUrl": "<string>",
"markers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"screenshotId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stringId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"filePath": "<string>",
"marker": {
"left": 50,
"top": 50,
"width": 99,
"height": 99
},
"source": "manual"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"upload": {
"url": "<string>",
"method": "PUT",
"headers": {},
"expiresAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"details": {}
}Body
application/json
Was this page helpful?

