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
Metrics
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
Get aggregated campaign metrics
curl "https://rlxapi.relaxad.sodra.io/v1/metrics?fromDate=2025-05-01&toDate=2025-05-15" \
-H "Authorization: Bearer <api_key>"
{
"meta": {
"took": 4,
"fromDate": "2025-05-01",
"toDate": "2025-05-15"
},
"data": {
"impressions": 12450,
"clicks": 823,
"conversions": 97,
"cost": 18250,
"reach": 10890
}
}
fromDate date
– Include metrics from this date, formatted as YYYY-MM-DD
toDate date
– Include metrics through this date, formatted as YYYY-MM-DD
interval string
– Date interval. One of: today, yesterday, last7days, last14days, last30days, this-week, last-week, this-month, last-month, this-year, last-year, lifetime. Overrides fromDate and toDate
filter[type] string
– Filter metrics by campaign type. Multiple types can be comma-separated
filter[campaignId] string
– Filter metrics by campaign ID. Multiple IDs can be comma-separated
Get campaign metrics per campaign, as a summary over the period or day by day. Same columns as the campaign export in Relaxad.
curl "https://rlxapi.relaxad.sodra.io/v1/reports?mode=daily&fromDate=2025-05-01&toDate=2025-05-15&include=feedEntries" \
-H "Authorization: Bearer <api_key>"
{
"meta": {
"took": 12,
"mode": "daily",
"fromDate": "2025-05-01",
"toDate": "2025-05-15",
"total": 8,
"page": {
"number": 1,
"size": 100,
"totalPages": 1
}
},
"data": [
{
"date": "2025-05-01",
"campaignId": "8bb2be00-22fa-4549-831d-56da31d2f1cd",
"name": "Product Sales Google Shopping",
"type": "google-shopping",
"status": "running",
"labels": ["Summer"],
"bidStrategy": "target-cpa",
"dailyBudget": 30,
"historicalBudget": 30,
"budgetLevel": 0.42,
"currentBidTarget": 10,
"historicalBidTarget": 9.84,
"impressions": 1830,
"viewability": 100,
"reach": 0,
"frequency": 0,
"clicks": 36,
"ctr": 0.0197,
"leads": 0,
"conversions": 2,
"viewConversions": 0,
"clickConversions": 0,
"conversionAdjustmentFactor": 1,
"adjustedConversions": 2,
"cpc": 0.35,
"cpm": 6.89,
"adjustedCpm": 6.89,
"cpa": 6.3,
"cost": 12.6,
"unitContribution": 40,
"contribution": 80,
"conversionValue": 310,
"shortTermContribution": 80,
"longTermContribution": 120,
"roas": 6.35,
"coas": 6.35,
"shortTermRoasMultiplier": 1,
"longTermRoasMultiplier": 1.5,
"shortTermRoas": 6.35,
"longTermRoas": 9.52,
"lastModified": "2025-05-14T05:34:53.035Z",
"lastSynced": "2025-05-14T05:38:57.929Z",
"feedEntries": [
{
"id": "Alicante",
"currentBidTarget": 12.66,
"historicalBidTarget": 12.75,
"impressions": 655,
"clicks": 166,
"cost": 664.07,
"contribution": 818.2,
"roas": 1.23,
…
},
…
]
},
…
]
}
With mode=summary there is one row per campaign for the whole period and no date. dailyBudget is then the campaign’s daily budget now, and historicalBudget the sum of its daily budgets over the period. With mode=daily there is one row per campaign and day, with zeros on days the campaign has no metrics; dailyBudget is the budget it had that day. Rows are sorted by date and then campaign name.
Unit contribution, bid targets and adjustment factors are null where there is nothing to report.
Get the same report as a CSV or Excel file with format=csv or format=xlsx. The file has the layout of the campaign export in Relaxad: a row per campaign and, with include=feedEntries, a row per feed entry under it, where the campaign’s own row has Campaign_summary as feed entry ID. A file holds every campaign the filters select, so page[number] and page[size] are not used.
curl -o relaxad_data.xlsx "https://rlxapi.relaxad.sodra.io/v1/reports?mode=daily&fromDate=2025-05-01&toDate=2025-05-07&include=feedEntries&format=xlsx" \
-H "Authorization: Bearer <api_key>"
With include=feedEntries each row also has the campaign’s feed entries over the same period, or on the same day in a daily report, with the same metrics as the campaign. feedEntries is left out where the campaign has none. Feed entries make the request slower.
mode string default summary
– summary or daily
format string default json
– json, csv or xlsx
include string
– feedEntries, to add each campaign’s feed entries to its rows
fromDate date
– Include metrics from this date, formatted as YYYY-MM-DD. Required for mode=daily and include=feedEntries, unless interval is given
toDate date
– Include metrics through this date, formatted as YYYY-MM-DD. Defaults to today for mode=daily and include=feedEntries
interval string
– Date interval. One of: today, yesterday, last7days, last14days, last30days, this-week, last-week, this-month, last-month, this-year, last-year, lifetime (not with mode=daily or include=feedEntries). Overrides fromDate and toDate
filter[campaignId] string
– Filter on campaign ID. Multiple IDs can be comma-separated
filter[query] string
– Filter campaigns on name
filter[type] string
– Filter campaigns on type. Multiple types can be comma-separated
filter[status] string
– Filter campaigns on status. Multiple statuses can be comma-separated
filter[label] string
– Filter campaigns on label
page[number] integer default 1
– Result page number. Pages are counted in campaigns: a page of a daily report holds every day of its campaigns
page[size] integer default 100
– Number of campaigns per page. A daily report can hold at most 100 000 rows (campaigns × days)
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
}
}