https://rlxapi.relaxad.sodra.io/v1
A valid API key must be sent in the Authorization header with every request. For example:
curl https://rlxapi.relaxad.sodra.io/v1/me \
-H "Authorization: Bearer <api_key>"
API keys can be created under team settings in Relaxad.
Team
Campaigns
Images
Labels
Data points
Get team info
curl https://rlxapi.relaxad.sodra.io/v1/me \
-H "Authorization: Bearer <api_key>"
{
"meta": {
"took": 2
},
"data": {
"id": "1e423b96-23a5-4633-882c-e7abae9afad3",
"name": "My current team"
}
}
List campaigns
curl https://rlxapi.relaxad.sodra.io/v1/campaigns \
-H "Authorization: Bearer <api_key>"
{
"meta": {
"took": 196,
"total": 900,
"page": {
"number": 1,
"size": 10,
"totalPages": 90
}
},
"data": [
{
"id": "a1ed35e5-b8cd-4fbf-a29d-b4959ee1a565",
"name": "Afghanistan City Facebook",
"type": "facebook",
"status": "removed",
"created": "2021-09-29T12:02:01.152Z",
"lastModified": "2021-09-29T13:09:28.609Z",
"lastReleased": "2021-09-29T13:09:30.616Z",
"lastSynced": "2021-10-01T08:21:13.138Z"
},
…
]
}
filter[query] string
– Filter campaigns on query
filter[type] string
– Filter campaigns on type
filter[status] string
– Filter campaigns on status
filter[label] string
– Filter campaigns on label
page[number] integer default 1
– Result page number
page[size] integer default 10
– Number of campaigns per page
sort string default created
– Property to sort on
List images
curl https://rlxapi.relaxad.sodra.io/v1/images \
-H "Authorization: Bearer <api_key>"
{
"meta": {
"took": 4,
"total": 1,
"page": {
"number": 1,
"size": 10,
"totalPages": 1
}
},
"data": [
{
"id": "6cae7ef6-7179-4fe4-aae7-6817667bb465",
"url": "https://storage.googleapis.com/relaxad/bd649bfedf8b2a31040684de5f8db8cb.jpg",
"width": 1600,
"height": 1114,
"bytes": 202693,
"contentType": "image/jpeg",
"labels": ["monkey", "cute"],
"comment": "A cute monkey",
"created": "2024-09-09T08:28:24.447332Z"
},
…
]
}
filter[label] string
– Filter images on label
filter[comment] string
– Filter images on comment
filter[contentType] string
– Filter images on content type
page[number] integer default 1
– Result page number
page[size] integer default 10
– Number of images per page
sort string default name
– Property to sort on
Create new image from URL
curl -X POST https://rlxapi.relaxad.sodra.io/v1/images \
-H "Authorization: Bearer <api_key>" \
-d "url=https://cdn.britannica.com/06/150806-050-6AE99C98/Proboscis-monkey.jpg" \
-d "label=monkey" \
-d "label=cute" \
-d "comment=A cute monkey"
{
"meta": {
"took": 363
},
"data": {
"id": "ca7a549e-64bf-44e2-95d1-8e6a98daace2",
"url": "https://storage.googleapis.com/relaxad/bd649bfedf8b2a31040684de5f8db8cb.jpg",
"width": 1600,
"height": 1114,
"bytes": 202693,
"contentType": "image/jpeg",
"labels": ["monkey", "cute"],
"comment": "A cute monkey",
"created": "2024-09-09T08:26:26.162443Z"
}
}
Create new image from local file (requires Content-Type: multipart/form-data)
curl -v -X POST "https://rlxapi.relaxad.sodra.io/v1/images" \
-H "Authorization: Bearer <api_key>" \
-F "file=@monkey.jpg" \
-F "label=monkey" \
-F "label=cute" \
-F "comment=A cute monkey"
{
"meta": {
"took": 363
},
"data": {
"id": "ca7a549e-64bf-44e2-95d1-8e6a98daace2",
"url": "https://storage.googleapis.com/relaxad/bd649bfedf8b2a31040684de5f8db8cb.jpg",
"width": 1600,
"height": 1114,
"bytes": 202693,
"contentType": "image/jpeg",
"labels": ["monkey", "cute"],
"comment": "A cute monkey",
"created": "2024-09-09T08:26:26.162443Z"
}
}
url string required
– URL to the image
label string[]
– A label to add to the image
comment string
– A comment to add to the image
Upload a zip file with images and metadata (requires Content-Type: multipart/form-data)
curl -v -X POST "https://rlxapi.relaxad.sodra.io/v1/images/zip" \
-H "Authorization: Bearer <api_key>" \
-F "file=@image.zip"
{
"meta": {
"took": 363
"errors": []
},
"data": [{
"id": "ca7a549e-64bf-44e2-95d1-8e6a98daace2",
"url": "https://storage.googleapis.com/relaxad/bd649bfedf8b2a31040684de5f8db8cb.jpg",
"width": 1600,
"height": 1114,
"bytes": 202693,
"contentType": "image/jpeg",
"labels": ["monkey", "cute"],
"comment": "A cute monkey",
"created": "2024-09-09T08:26:26.162443Z"
},
…
]
}
The zip file should contain images and an optional metadata.json with labels and comments for one or more image.
Download example zip file: images.zip
The format of the json file should be:
[
{
"filename": "aditya-saxena-PDTB9aSavn4-unsplash.jpg",
"labels": ["food", "drinks"],
"comment": "A hand and freedom fries"
},
{
"filename": "alin-gavriliuc-eRSqX5Vz1g0-unsplash.jpg",
"labels": ["facebook", "drinks"],
"comment": "A green drink"
},
{
"filename": "lala-azizli-JrkpM4LvkFQ-unsplash.jpg",
"labels": ["coffee"]
}
]
Update labels and comment for image
Add label to image
Delete label
List data points
curl https://rlxapi.relaxad.sodra.io/v1/data-points \
-H "Authorization: Bearer <api_key>"
{
"meta": {
"took": 10
},
"data": [
{
"id": "a1ed35e5-b8cd-4fbf-a29d-b4959ee1a565",
"name": "Sales",
"value": 12000,
"lastModified": "2025-05-15T13:09:28.609Z"
},
…
]
}
Create new data point
curl -X POST https://rlxapi.relaxad.sodra.io/v1/data-points \
-H "Authorization: Bearer <api_key>" \
-d "name=Another data point&value=99"
{
"meta": {
"took": 10
},
"data": {
"id": "ca7a549e-64bf-44e2-95d1-8e6a98daace2",
"name": "Another data point",
"value": 99,
"lastModified": "2025-05-15T14:00:00.000Z"
}
}
Update existing data point
curl -X PATCH https://rlxapi.relaxad.sodra.io/v1/data-points/ca7a549e-64bf-44e2-95d1-8e6a98daace2 \
-H "Authorization: Bearer <api_key>" \
-d "value=150"
{
"meta": {
"took": 10
},
"data": {
"id": "ca7a549e-64bf-44e2-95d1-8e6a98daace2",
"name": "Another data point",
"value": 150,
"lastModified": "2025-05-15T14:05:00.000Z"
}
}
Delete data point
curl -X DELETE https://rlxapi.relaxad.sodra.io/v1/data-points/ca7a549e-64bf-44e2-95d1-8e6a98daace2 \
-H "Authorization: Bearer <api_key>"
{
"meta": {
"took": 3
}
}