Skip to content

Sites API ​

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/sitesThe account's sites, with its limits and use
POST/sitesAdd a site
GET/sites/{site}One site
PATCH/sites/{site}Change a site (every field optional)
DELETE/sites/{site}Delete a site and all its recordings

GET /sites ​

The account's sites, with its limits and use

Ability recordings:read.

Responses ​

  • 200 — Sites (with sessions_count) and the account's limits (null = unlimited).
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].idinteger
data[].namestring
data[].public_keystring
data[].snippetstringThe tracking code to paste into the site's pages.
data[].allowed_domainsstring[]
data[].retention_daysinteger
data[].effective_retention_daysintegerThe site's choice capped by the plan.
data[].is_recordingboolean
data[].spread_quotabooleanSpread the account's monthly session quota over the month (only the elapsed share may be used so far).
data[].asset_rewritesobject[]Replays load asset addresses starting with from from to (pages behind a login, localhost, intranet). Session detail and shared sessions include the site's list. At most 10 items.
data[].asset_rewrites[].fromstring
data[].asset_rewrites[].tostring
data[].privacyobjectRecording rules, applied before anything is stored. The ingest endpoint answers dropped batches with 204 and X-SR-Control: stop (the session is never recorded: excluded IP, sampled out, not started on a recorded page) or pause (this page is never recorded).
data[].privacy.exclude_ipsstring[]Addresses, CIDR ranges (10.0.0.0/8, 2001:db8::/32) or IPv4 patterns (203.0.113.*). At most 100 items.
data[].privacy.sampleinteger% of sessions recorded (each session in or out as a whole). Minimum 1. Maximum 100. Default 100.
data[].privacy.start_pagesobject[]Only visits that start on one of these pages are recorded (empty: all). At most 20 items.
data[].privacy.skip_pagesobject[]Pages never recorded. At most 20 items.
data[].privacy.mask_selectorsstring[]CSS selectors whose text is recorded as *** (applied by the tracker, which fetches them from /c/{key}). At most 30 items.
data[].privacy.block_selectorsstring[]CSS selectors of elements left out of recordings. At most 30 items.
data[].privacy.iframesbooleanRecord frames of other domains into the page around them (rrweb cross-origin iframes; the tracking code must be in the frames too).
data[].privacy.cookie_domainstringOne visitor across this domain's subdomains (e.g. shop.com for www.shop.com and blog.shop.com; one of the site's domains or their parent); empty = each subdomain on its own. The tracker then keeps its visitor facts in one first-party cookie (_sr_v) of that domain.
data[].privacy.unmask_selectorsstring[]CSS selectors of fields whose typed values may be recorded (e.g. a search box). Passwords, payment cards and fields named like secrets stay masked. At most 30 items.
data[].privacy.strip_paramsstring[]Query parameters removed from every recorded address before storage ("*" = the whole query string). At most 50 items.
data[].last_seen_atstring (date-time), nullable
data[].sessions_countinteger
data[].created_atstring (date-time)
metaobject
meta.limitsobject
meta.limits.sitesinteger, nullable
meta.limits.sessions_per_monthinteger, nullable
meta.limits.retention_daysinteger, nullable
meta.sessions_this_monthinteger
meta.retention_choicesinteger[]
bash
curl -X GET "https://your-site.com/api/v1/sites" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /sites ​

Add a site

Ability recordings:write. 403 when the plan's site limit is reached.

Request body ​

application/json, required

FieldTypeRequiredDescription
namestringRequired when creating. At most 120 characters.
allowed_domainsstring[]Host names or URLs; subdomains included; empty = any domain.
retention_daysintegerOne of: 7, 30, 90, 180, 365.
is_recordingboolean
spread_quotaboolean
asset_rewritesobject[]At most 10 items.
asset_rewrites[].fromstring (uri)yes
asset_rewrites[].tostring (uri)yes
privacyobjectRecording rules, applied before anything is stored. The ingest endpoint answers dropped batches with 204 and X-SR-Control: stop (the session is never recorded: excluded IP, sampled out, not started on a recorded page) or pause (this page is never recorded).
privacy.exclude_ipsstring[]Addresses, CIDR ranges (10.0.0.0/8, 2001:db8::/32) or IPv4 patterns (203.0.113.*). At most 100 items.
privacy.sampleinteger% of sessions recorded (each session in or out as a whole). Minimum 1. Maximum 100. Default 100.
privacy.start_pagesobject[]Only visits that start on one of these pages are recorded (empty: all). At most 20 items.
privacy.start_pages[].opstringyesOne of: is, contains, begins, pattern.
privacy.start_pages[].valuestringyesAt most 500 characters.
privacy.skip_pagesobject[]Pages never recorded. At most 20 items.
privacy.skip_pages[].opstringyesOne of: is, contains, begins, pattern.
privacy.skip_pages[].valuestringyesAt most 500 characters.
privacy.mask_selectorsstring[]CSS selectors whose text is recorded as *** (applied by the tracker, which fetches them from /c/{key}). At most 30 items.
privacy.block_selectorsstring[]CSS selectors of elements left out of recordings. At most 30 items.
privacy.iframesbooleanRecord frames of other domains into the page around them (rrweb cross-origin iframes; the tracking code must be in the frames too).
privacy.cookie_domainstringOne visitor across this domain's subdomains (e.g. shop.com for www.shop.com and blog.shop.com; one of the site's domains or their parent); empty = each subdomain on its own. The tracker then keeps its visitor facts in one first-party cookie (_sr_v) of that domain.
privacy.unmask_selectorsstring[]CSS selectors of fields whose typed values may be recorded (e.g. a search box). Passwords, payment cards and fields named like secrets stay masked. At most 30 items.
privacy.strip_paramsstring[]Query parameters removed from every recorded address before storage ("*" = the whole query string). At most 50 items.

Responses ​

  • 201 — The site.
  • 403 — Site limit of the plan reached.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.namestring
data.public_keystring
data.snippetstringThe tracking code to paste into the site's pages.
data.allowed_domainsstring[]
data.retention_daysinteger
data.effective_retention_daysintegerThe site's choice capped by the plan.
data.is_recordingboolean
data.spread_quotabooleanSpread the account's monthly session quota over the month (only the elapsed share may be used so far).
data.asset_rewritesobject[]Replays load asset addresses starting with from from to (pages behind a login, localhost, intranet). Session detail and shared sessions include the site's list. At most 10 items.
data.asset_rewrites[].fromstring
data.asset_rewrites[].tostring
data.privacyobjectRecording rules, applied before anything is stored. The ingest endpoint answers dropped batches with 204 and X-SR-Control: stop (the session is never recorded: excluded IP, sampled out, not started on a recorded page) or pause (this page is never recorded).
data.privacy.exclude_ipsstring[]Addresses, CIDR ranges (10.0.0.0/8, 2001:db8::/32) or IPv4 patterns (203.0.113.*). At most 100 items.
data.privacy.sampleinteger% of sessions recorded (each session in or out as a whole). Minimum 1. Maximum 100. Default 100.
data.privacy.start_pagesobject[]Only visits that start on one of these pages are recorded (empty: all). At most 20 items.
data.privacy.skip_pagesobject[]Pages never recorded. At most 20 items.
data.privacy.mask_selectorsstring[]CSS selectors whose text is recorded as *** (applied by the tracker, which fetches them from /c/{key}). At most 30 items.
data.privacy.block_selectorsstring[]CSS selectors of elements left out of recordings. At most 30 items.
data.privacy.iframesbooleanRecord frames of other domains into the page around them (rrweb cross-origin iframes; the tracking code must be in the frames too).
data.privacy.cookie_domainstringOne visitor across this domain's subdomains (e.g. shop.com for www.shop.com and blog.shop.com; one of the site's domains or their parent); empty = each subdomain on its own. The tracker then keeps its visitor facts in one first-party cookie (_sr_v) of that domain.
data.privacy.unmask_selectorsstring[]CSS selectors of fields whose typed values may be recorded (e.g. a search box). Passwords, payment cards and fields named like secrets stay masked. At most 30 items.
data.privacy.strip_paramsstring[]Query parameters removed from every recorded address before storage ("*" = the whole query string). At most 50 items.
data.last_seen_atstring (date-time), nullable
data.sessions_countinteger
data.created_atstring (date-time)
bash
curl -X POST "https://your-site.com/api/v1/sites" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","allowed_domains":["text"],"retention_days":7,"is_recording":true,"spread_quota":true,"asset_rewrites":[{"from":"https://example.com","to":"https://example.com"}],"privacy":{"exclude_ips":["text"],"sample":100,"start_pages":[{}],"skip_pages":[{}],"mask_selectors":["text"],"block_selectors":["text"],"iframes":true,"cookie_domain":"text","unmask_selectors":["text"],"strip_params":["text"]}}'

GET /sites/{site} ​

One site

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Responses ​

  • 200 — The site.
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.namestring
data.public_keystring
data.snippetstringThe tracking code to paste into the site's pages.
data.allowed_domainsstring[]
data.retention_daysinteger
data.effective_retention_daysintegerThe site's choice capped by the plan.
data.is_recordingboolean
data.spread_quotabooleanSpread the account's monthly session quota over the month (only the elapsed share may be used so far).
data.asset_rewritesobject[]Replays load asset addresses starting with from from to (pages behind a login, localhost, intranet). Session detail and shared sessions include the site's list. At most 10 items.
data.asset_rewrites[].fromstring
data.asset_rewrites[].tostring
data.privacyobjectRecording rules, applied before anything is stored. The ingest endpoint answers dropped batches with 204 and X-SR-Control: stop (the session is never recorded: excluded IP, sampled out, not started on a recorded page) or pause (this page is never recorded).
data.privacy.exclude_ipsstring[]Addresses, CIDR ranges (10.0.0.0/8, 2001:db8::/32) or IPv4 patterns (203.0.113.*). At most 100 items.
data.privacy.sampleinteger% of sessions recorded (each session in or out as a whole). Minimum 1. Maximum 100. Default 100.
data.privacy.start_pagesobject[]Only visits that start on one of these pages are recorded (empty: all). At most 20 items.
data.privacy.skip_pagesobject[]Pages never recorded. At most 20 items.
data.privacy.mask_selectorsstring[]CSS selectors whose text is recorded as *** (applied by the tracker, which fetches them from /c/{key}). At most 30 items.
data.privacy.block_selectorsstring[]CSS selectors of elements left out of recordings. At most 30 items.
data.privacy.iframesbooleanRecord frames of other domains into the page around them (rrweb cross-origin iframes; the tracking code must be in the frames too).
data.privacy.cookie_domainstringOne visitor across this domain's subdomains (e.g. shop.com for www.shop.com and blog.shop.com; one of the site's domains or their parent); empty = each subdomain on its own. The tracker then keeps its visitor facts in one first-party cookie (_sr_v) of that domain.
data.privacy.unmask_selectorsstring[]CSS selectors of fields whose typed values may be recorded (e.g. a search box). Passwords, payment cards and fields named like secrets stay masked. At most 30 items.
data.privacy.strip_paramsstring[]Query parameters removed from every recorded address before storage ("*" = the whole query string). At most 50 items.
data.last_seen_atstring (date-time), nullable
data.sessions_countinteger
data.created_atstring (date-time)
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

PATCH /sites/{site} ​

Change a site (every field optional)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Request body ​

application/json

FieldTypeRequiredDescription
namestringRequired when creating. At most 120 characters.
allowed_domainsstring[]Host names or URLs; subdomains included; empty = any domain.
retention_daysintegerOne of: 7, 30, 90, 180, 365.
is_recordingboolean
spread_quotaboolean
asset_rewritesobject[]At most 10 items.
asset_rewrites[].fromstring (uri)yes
asset_rewrites[].tostring (uri)yes
privacyobjectRecording rules, applied before anything is stored. The ingest endpoint answers dropped batches with 204 and X-SR-Control: stop (the session is never recorded: excluded IP, sampled out, not started on a recorded page) or pause (this page is never recorded).
privacy.exclude_ipsstring[]Addresses, CIDR ranges (10.0.0.0/8, 2001:db8::/32) or IPv4 patterns (203.0.113.*). At most 100 items.
privacy.sampleinteger% of sessions recorded (each session in or out as a whole). Minimum 1. Maximum 100. Default 100.
privacy.start_pagesobject[]Only visits that start on one of these pages are recorded (empty: all). At most 20 items.
privacy.start_pages[].opstringyesOne of: is, contains, begins, pattern.
privacy.start_pages[].valuestringyesAt most 500 characters.
privacy.skip_pagesobject[]Pages never recorded. At most 20 items.
privacy.skip_pages[].opstringyesOne of: is, contains, begins, pattern.
privacy.skip_pages[].valuestringyesAt most 500 characters.
privacy.mask_selectorsstring[]CSS selectors whose text is recorded as *** (applied by the tracker, which fetches them from /c/{key}). At most 30 items.
privacy.block_selectorsstring[]CSS selectors of elements left out of recordings. At most 30 items.
privacy.iframesbooleanRecord frames of other domains into the page around them (rrweb cross-origin iframes; the tracking code must be in the frames too).
privacy.cookie_domainstringOne visitor across this domain's subdomains (e.g. shop.com for www.shop.com and blog.shop.com; one of the site's domains or their parent); empty = each subdomain on its own. The tracker then keeps its visitor facts in one first-party cookie (_sr_v) of that domain.
privacy.unmask_selectorsstring[]CSS selectors of fields whose typed values may be recorded (e.g. a search box). Passwords, payment cards and fields named like secrets stay masked. At most 30 items.
privacy.strip_paramsstring[]Query parameters removed from every recorded address before storage ("*" = the whole query string). At most 50 items.

Responses ​

  • 200 — The site.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.namestring
data.public_keystring
data.snippetstringThe tracking code to paste into the site's pages.
data.allowed_domainsstring[]
data.retention_daysinteger
data.effective_retention_daysintegerThe site's choice capped by the plan.
data.is_recordingboolean
data.spread_quotabooleanSpread the account's monthly session quota over the month (only the elapsed share may be used so far).
data.asset_rewritesobject[]Replays load asset addresses starting with from from to (pages behind a login, localhost, intranet). Session detail and shared sessions include the site's list. At most 10 items.
data.asset_rewrites[].fromstring
data.asset_rewrites[].tostring
data.privacyobjectRecording rules, applied before anything is stored. The ingest endpoint answers dropped batches with 204 and X-SR-Control: stop (the session is never recorded: excluded IP, sampled out, not started on a recorded page) or pause (this page is never recorded).
data.privacy.exclude_ipsstring[]Addresses, CIDR ranges (10.0.0.0/8, 2001:db8::/32) or IPv4 patterns (203.0.113.*). At most 100 items.
data.privacy.sampleinteger% of sessions recorded (each session in or out as a whole). Minimum 1. Maximum 100. Default 100.
data.privacy.start_pagesobject[]Only visits that start on one of these pages are recorded (empty: all). At most 20 items.
data.privacy.skip_pagesobject[]Pages never recorded. At most 20 items.
data.privacy.mask_selectorsstring[]CSS selectors whose text is recorded as *** (applied by the tracker, which fetches them from /c/{key}). At most 30 items.
data.privacy.block_selectorsstring[]CSS selectors of elements left out of recordings. At most 30 items.
data.privacy.iframesbooleanRecord frames of other domains into the page around them (rrweb cross-origin iframes; the tracking code must be in the frames too).
data.privacy.cookie_domainstringOne visitor across this domain's subdomains (e.g. shop.com for www.shop.com and blog.shop.com; one of the site's domains or their parent); empty = each subdomain on its own. The tracker then keeps its visitor facts in one first-party cookie (_sr_v) of that domain.
data.privacy.unmask_selectorsstring[]CSS selectors of fields whose typed values may be recorded (e.g. a search box). Passwords, payment cards and fields named like secrets stay masked. At most 30 items.
data.privacy.strip_paramsstring[]Query parameters removed from every recorded address before storage ("*" = the whole query string). At most 50 items.
data.last_seen_atstring (date-time), nullable
data.sessions_countinteger
data.created_atstring (date-time)
bash
curl -X PATCH "https://your-site.com/api/v1/sites/{site}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","allowed_domains":["text"],"retention_days":7,"is_recording":true,"spread_quota":true,"asset_rewrites":[{"from":"https://example.com","to":"https://example.com"}],"privacy":{"exclude_ips":["text"],"sample":100,"start_pages":[{}],"skip_pages":[{}],"mask_selectors":["text"],"block_selectors":["text"],"iframes":true,"cookie_domain":"text","unmask_selectors":["text"],"strip_params":["text"]}}'

DELETE /sites/{site} ​

Delete a site and all its recordings

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Responses ​

  • 204 — Deleted.
  • 404 — Missing, or another account's.
bash
curl -X DELETE "https://your-site.com/api/v1/sites/{site}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Replora: see what your visitors see.