Products · API reference

dot.json

The fields of dot.json, the file that tells Dash what your dot is and what it may use.

dot.json tells Dash who your dot is and what it's allowed to use. Pages aren't listed here; they live in dot.ts.

Add the $schema line and your editor checks and completes the file as you type:

dot.json
{
  "$schema": "https://unpkg.com/@monimesl/dot-runtime/dot.schema.json",
  "package": "sl.yourcompany.meter",
  "name": "Meter Top-up",
  "version": "1.0.0"
}

A field that isn't in this table fails the build. Project configuration shows the fields in use.

FieldTypeRequiredWhat it is
idstringNoThe ID Monime gives the dot when you register it. Publishing needs it. Payments in a live test work only once the dot is published and this is set.
$schemastringNoThe schema editors use to check and complete this file.
packagestringYesThe dot's package name: a reverse domain name you own, such as "sl.yourcompany.meter". It never changes once the dot is published. Up to 128 characters.
namestringYesThe dot's display name, which Dash shows.
versionstringYesThe dot's version, in semantic versioning (semver.org), such as "1.0.0". Raise it for every release.
permissionsobjectNoWhat the dot may use. Each value is the reason Dash shows the person when it asks.
permissions.accountstringNoWhy the dot needs the person's name, their phone number or email address, and an ID for them that's unique to the dot, from dash.account.signIn().
permissions.camerastringNoWhy the dot needs the camera, to take a photo with dash.media.pickPhoto({ source: 'camera' }) or scan a QR code with dash.media.scanCode().
permissions.photoLibrarystringNoWhy the dot needs the person to choose one of their photos, with dash.media.pickPhoto({ source: 'library' }).
permissions.filesstringNoWhy the dot needs the person to choose a file from their phone, with dash.media.pickFile().
permissions.contactsstringNoWhy the dot needs the person to choose a phone number from their contacts, with dash.contacts.pickPhone().
permissions.remindersstringNoWhy the dot sets reminders with dash.reminders.set(), such as "Remind you when your order is ready". Each brings the person back to one of the dot's pages.
permissions.paymentsstringNoWhy the dot takes payments with dash.payments.request(), such as "Pay for tickets". Monime's review reads it. Dash doesn't ask the person for this permission: they confirm each payment instead. The money goes to the Space that owns the dot.
networkobjectNoWhere the dot may send requests with dash.network. Without it, it may send none.
network.hostsstring[]With networkThe hosts the dot sends requests to and shows pictures from: host names, such as "api.example.com", or "*.example.com" for any of a domain's subdomains, but not the domain itself. At least 1, each up to 253 characters, with no repeats.
dashobjectNoWhat the dot needs from Dash.
dash.minApiVersionstringNoThe oldest Dash API version the dot needs, such as "1.0". It's "1.0" when left out. Raise it when the dot uses a newer call without checking dash.supports(...) first.

Keep reading