Skip to content

System API ​

Administrators. Version and one-click updates (signed releases from REPLORA_UPDATE_FEED).

All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.

MethodPathWhat it does
GET/brandingThe installation's logo and favicon, light and dark mode (administrators)
POST/branding/{kind}Uploads a logo or favicon (administrators)
DELETE/branding/{kind}Removes a logo or favicon (administrators)
GET/systemVersion, edition, the remembered latest release and what one-click updates need (administrators)
GET/system/healthThe service status: the last run of every check (run now when there is none yet), and maintenance mode (administrators)
POST/system/healthRuns every service check now (10 per minute)
PUT/system/maintenanceTurns maintenance mode on (with an optional message) or off. Administrators keep using the dashboard and can sign in; recording, surveys, A/B tests and webhooks keep working.
GET/system/licenseThe purchase code this site runs with (shortened), its plan and support end, and the modules it brings (missing or from another version).
PUT/system/licenseChecks a purchase code with the license server for this site's address and saves it; missing or older modules are downloaded (signed pack). The SaaS edition accepts only SaaS codes. 6 per minute.
POST/system/checkAsks the release feed now (6 per minute)
POST/system/updateInstalls the latest release's files (signature checked, current files backed up)
POST/system/upgradeFinishes an update (missing modules from the license server, migrations, upgrade steps, caches) and answers what ran
POST/system/rollbackPuts the previous version's files back (database changes stay)

GET /branding ​

The installation's logo and favicon, light and dark mode (administrators)

Public addresses of the uploaded pictures (null = the built-in mark; a missing dark version means the light one is used in dark mode too). Also in the dashboard's boot data.

Responses ​

  • 200 — OK
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
Response fields
FieldTypeRequiredDescription
dataobject
data.logostring, nullableLogo for light backgrounds.
data.logo_darkstring, nullableLogo for dark backgrounds (the sidebar, dark mode).
data.faviconstring, nullable
data.favicon_darkstring, nullableFavicon when the browser is in dark mode.
bash
curl -X GET "https://your-site.com/api/v1/branding" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /branding/{kind} ​

Uploads a logo or favicon (administrators)

PNG, JPEG or WebP up to 2 MB (never SVG). The server re-encodes it as PNG; logos are scaled to at most 320 px high, favicons made 192 × 192 px. Replaces the previous picture of that kind.

Parameters ​

NameInTypeRequiredDescription
kindpathstringyesOne of: logo, logo_dark, favicon, favicon_dark.

Request body ​

multipart/form-data, required

FieldTypeRequiredDescription
filestring (binary)yes

Responses ​

  • 200 — The pictures now.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.logostring, nullableLogo for light backgrounds.
data.logo_darkstring, nullableLogo for dark backgrounds (the sidebar, dark mode).
data.faviconstring, nullable
data.favicon_darkstring, nullableFavicon when the browser is in dark mode.
bash
curl -X POST "https://your-site.com/api/v1/branding/{kind}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -F "file=…"

DELETE /branding/{kind} ​

Removes a logo or favicon (administrators)

Parameters ​

NameInTypeRequiredDescription
kindpathstringyesOne of: logo, logo_dark, favicon, favicon_dark.

Responses ​

  • 200 — The pictures now.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
Response fields
FieldTypeRequiredDescription
dataobject
data.logostring, nullableLogo for light backgrounds.
data.logo_darkstring, nullableLogo for dark backgrounds (the sidebar, dark mode).
data.faviconstring, nullable
data.favicon_darkstring, nullableFavicon when the browser is in dark mode.
bash
curl -X DELETE "https://your-site.com/api/v1/branding/{kind}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /system ​

Version, edition, the remembered latest release and what one-click updates need (administrators)

Responses ​

  • 200 — The installation's state.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
Response fields
FieldTypeRequiredDescription
dataobject
data.versionstringVersion of the files.
data.data_versionstring, nullableVersion the database belongs to.
data.editionstringOne of: single, saas.
data.phpstring
data.pendingbooleanAn update waits to be finished (POST /system/upgrade).
data.downgradebooleanThe files are older than the data.
data.feedbooleanA release feed is configured.
data.releaseobject, nullable
data.release.versionstring
data.release.released_atstring, nullable
data.release.notesstring
data.update_availableboolean
data.one_clickobject
data.one_click.possibleboolean
data.one_click.problemstring, nullable
data.backupsinteger
bash
curl -X GET "https://your-site.com/api/v1/system" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /system/health ​

The service status: the last run of every check (run now when there is none yet), and maintenance mode (administrators)

Responses ​

  • 200 — Checks with their status (ok, warn, fail, off) and a sentence each; maintenance mode.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
Response fields
FieldTypeRequiredDescription
dataobject
data.checked_atstring (date-time)
data.statusstringThe worst of the checks. One of: ok, warn, fail, off.
data.checksobject[]
data.checks[].idstring
data.checks[].labelstring
data.checks[].statusstringOne of: ok, warn, fail, off.
data.checks[].detailstring
data.checks[].msintegerHow long the check took.
data.maintenanceobject
data.maintenance.onboolean
data.maintenance.sincestring (date-time), nullable
data.maintenance.messagestring, nullable
bash
curl -X GET "https://your-site.com/api/v1/system/health" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /system/health ​

Runs every service check now (10 per minute)

Responses ​

  • 200 — The fresh checks.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
Response fields
FieldTypeRequiredDescription
dataobject
data.checked_atstring (date-time)
data.statusstringThe worst of the checks. One of: ok, warn, fail, off.
data.checksobject[]
data.checks[].idstring
data.checks[].labelstring
data.checks[].statusstringOne of: ok, warn, fail, off.
data.checks[].detailstring
data.checks[].msintegerHow long the check took.
data.maintenanceobject
data.maintenance.onboolean
data.maintenance.sincestring (date-time), nullable
data.maintenance.messagestring, nullable
bash
curl -X POST "https://your-site.com/api/v1/system/health" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

PUT /system/maintenance ​

Turns maintenance mode on (with an optional message) or off. Administrators keep using the dashboard and can sign in; recording, surveys, A/B tests and webhooks keep working.

Request body ​

application/json, required

FieldTypeRequiredDescription
onbooleanyes
messagestring, nullableShown on the maintenance page. At most 500 characters.

Responses ​

  • 200 — The new state; bypass is Laravel's bypass path when turned on.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 —
Response fields
FieldTypeRequiredDescription
dataobject
data.onboolean
data.sincestring (date-time), nullable
data.messagestring, nullable
data.bypassstring, nullable
bash
curl -X PUT "https://your-site.com/api/v1/system/maintenance" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"on":true,"message":"text"}'

GET /system/license ​

The purchase code this site runs with (shortened), its plan and support end, and the modules it brings (missing or from another version).

Responses ​

  • 200 — The license state.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
Response fields
FieldTypeRequiredDescription
dataobject
data.codestring, nullableThe saved purchase code shortened, e.g. 1a2b…5e6f; null when none is saved.
data.planstring, nullablesingle or saas
data.verified_atstring (date-time), nullable
data.checked_atstring (date-time), nullable
data.supported_untilstring (date-time), nullable
data.requiredbooleanFalse for builds that bundle every module and may run without a code.
data.modulesobject
data.modules.missingstring[]
data.modules.outdatedstring[]
bash
curl -X GET "https://your-site.com/api/v1/system/license" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

PUT /system/license ​

Checks a purchase code with the license server for this site's address and saves it; missing or older modules are downloaded (signed pack). The SaaS edition accepts only SaaS codes. 6 per minute.

Request body ​

application/json, required

FieldTypeRequiredDescription
purchase_codestringyesAt most 200 characters.

Responses ​

  • 200 — The new state; restart when modules were just installed (reload the dashboard to run them).
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 —
Response fields
FieldTypeRequiredDescription
dataobject
data.codestring, nullableThe saved purchase code shortened, e.g. 1a2b…5e6f; null when none is saved.
data.planstring, nullablesingle or saas
data.verified_atstring (date-time), nullable
data.checked_atstring (date-time), nullable
data.supported_untilstring (date-time), nullable
data.requiredbooleanFalse for builds that bundle every module and may run without a code.
data.modulesobject
data.modules.missingstring[]
data.modules.outdatedstring[]
data.restartboolean
bash
curl -X PUT "https://your-site.com/api/v1/system/license" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"purchase_code":"text"}'

POST /system/check ​

Asks the release feed now (6 per minute)

Responses ​

  • 200 — The state with the latest release.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 502 — The release feed could not be read; message says why.
Response fields
FieldTypeRequiredDescription
dataobject
data.versionstringVersion of the files.
data.data_versionstring, nullableVersion the database belongs to.
data.editionstringOne of: single, saas.
data.phpstring
data.pendingbooleanAn update waits to be finished (POST /system/upgrade).
data.downgradebooleanThe files are older than the data.
data.feedbooleanA release feed is configured.
data.releaseobject, nullable
data.release.versionstring
data.release.released_atstring, nullable
data.release.notesstring
data.update_availableboolean
data.one_clickobject
data.one_click.possibleboolean
data.one_click.problemstring, nullable
data.backupsinteger
bash
curl -X POST "https://your-site.com/api/v1/system/check" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /system/update ​

Installs the latest release's files (signature checked, current files backed up)

The data side is finished by POST /system/upgrade in the next request (restart is true), so the new code runs it.

Responses ​

  • 200 — The files are in place.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 — Up to date, or the release can't be installed here; message says why. Nothing was changed.
Response fields
FieldTypeRequiredDescription
dataobject
data.fromstring
data.tostring
data.restartboolean
bash
curl -X POST "https://your-site.com/api/v1/system/update" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /system/upgrade ​

Finishes an update (missing modules from the license server, migrations, upgrade steps, caches) and answers what ran

Responses ​

  • 200 — Done; or only restart: true when the new version's modules were just installed: call again, the next request runs them and finishes.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 — A downgrade, another update running, modules that can't be fetched (no or refused purchase code), or a failing migration or step; message says which.
Response fields
FieldTypeRequiredDescription
dataobject
data.fromstring, nullable
data.tostring
data.migrationsstring[]
data.stepsstring[]
data.restartboolean
bash
curl -X POST "https://your-site.com/api/v1/system/upgrade" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /system/rollback ​

Puts the previous version's files back (database changes stay)

Responses ​

  • 200 — The previous files are back.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 422 — There is no backup.
Response fields
FieldTypeRequiredDescription
dataobject
data.versionstring
data.restartboolean
bash
curl -X POST "https://your-site.com/api/v1/system/rollback" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Replora: see what your visitors see.