Appearance
Download and import a rule template
Use this sample file with You → Install rule update. It uses the same rule-package format that Borderly's importer reads.
Download the Borderly rule template (JSON)
The template adds Example: days in France, a neutral calendar-year tracker. It has a separate example ID, so its first import does not replace any built-in rule. It is a working format example, not a reviewed visa or tax rule. Its source link identifies the country-code standard only.
Import the sample
- Download the JSON file and save it in Files on your iPhone.
- Open Borderly → You → Install rule update.
- Tap Choose local rule package and choose the downloaded file.
- Wait for Rule definitions updated.
- Open You → Active counters → Browse all countries and rules and search for Example: days in France.
- Open it and tap Add active counter. The free plan still allows only one active counter; remove an existing one first or use Pro.
Importing does not activate the counter or upload your history. The importer marks imported definitions independent review pending, even when the file requests a different review status. Your original built-in France tracker remains available.
To stop using the sample, remove its active counter in the rule library. There is no UI for uninstalling an individual imported definition. Re-importing the identical version is rejected as not newer; that is expected.

Adapt the template
The following details are for people preparing a local rule file. You do not need to edit JSON to use Borderly's built-in rules.
| Field | How to use it |
|---|---|
format | Keep borderly-rules-v1. |
publishedAt | Use an ISO date and time, such as 2026-09-11T00:00:00Z. |
definitions | Keep it as a list, even for one definition. |
id and rule.id | Use the same unique identifier in both places. Keep it unchanged for revisions of the same rule. Use a new ID for a separate tracker. |
name, jurisdiction | Set the visible title and country/region label. Update their counterparts inside rule too. |
version, revisionID | Start at 1 for a new ID. For an update, use a strictly higher integer and a matching descriptive revision label. |
effectiveFrom | Use a date already reached. The current importer rejects future-effective definitions. |
sourceTitle, sourceURL | Describe the supporting source and use an HTTPS URL. A valid URL alone does not establish that the rule is correct. |
explanation, method, caveat | Explain what is counted and the important limits. Do not describe a custom tracker as legal approval. |
includedCountryCodes | Use the countries' two-letter codes, such as FR. Do not put country names here. |
category, verification, goal | For a neutral tracker, keep Day tracking, Informational tracker, and informationOnly. |
questions, historyYearsRequired | Keep the sample's empty questions and zero required years for a simple informational tracker. |
limit: 366 in the example is a display value for an informational annual tracker, not an allowed length of stay. Keep the outer structure and the other fields from the sample; the app's decoder expects required fields even when they look like defaults.
Date-window examples
Replace only the window value with one of these shapes when deliberately changing the period:
json
{ "calendarYear": {} }json
{ "rolling": { "days": 365 } }json
{ "financialYear": { "startMonth": 4, "startDay": 1 } }Update the title and method to match your chosen window. Use positive, sensible window lengths. A numeric rule package can describe supported counting parameters; it cannot add a new app workflow or arbitrary legal decision logic. The built-in special questionnaires depend on behavior already in the app.
Import errors and verification
- Not a supported Borderly rule package: check the format and whether you selected a rule package rather than a travel backup.
- Missing a secure official source or valid effective date: check that the source starts with HTTPS and the effective date is not in the future.
- Not newer than the installed revision: increment the version only when intentionally revising that same rule.
- Other decoding errors usually mean a missing field, an incorrectly spelled value, or a date in the wrong format.
The downloaded sample was decoded, accepted, and round-tripped using Borderly's actual Swift rule types and importer. Re-import and invalid-format rejection were also checked. This validates the supplied sample's format; it does not validate legal content you add. The edited-file workflow through the iPhone file picker was not exercised end to end.