TenanciTenanci

Help centerAPI referenceInstallable app

Installable app

A PWA with the customer's brand on each domain.

Get the installable app

GET/domains/{id}/pwadomains:read

Parameters

  • idpath · stringrequired

    Resource id (prj_…, dom_…)

Request

cURL
curl "https://api.tenanci.com/v2/domains/dom_4h7n1q/pwa" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"

Response 200

{
  "enabled": true,
  "settings": {
    "name": "Barbearia do Zé",
    "shortName": "Zé",
    "description": "Agende seu corte",
    "themeColor": "#1f2937",
    "backgroundColor": "#ffffff",
    "display": "standalone",
    "startUrl": "/",
    "lang": "pt-BR",
    "icons": {
      "icon192": "https://assets.tenanci.com/org_5t1v/i192.png",
      "icon512": "https://assets.tenanci.com/org_5t1v/i512.png",
      "maskable": "https://assets.tenanci.com/org_5t1v/mask.png",
      "apple": "https://assets.tenanci.com/org_5t1v/apple.png"
    },
    "prompt": {
      "enabled": true,
      "text": "Instale o app da Barbearia do Zé",
      "delaySeconds": 20
    },
    "offline": true,
    "serviceWorker": true,
    "screenshots": [
      {
        "url": "https://assets.tenanci.com/org_5t1v/tela-agenda.png",
        "width": 1080,
        "height": 1920,
        "formFactor": "narrow",
        "label": "Agenda do dia"
      },
      {
        "url": "https://assets.tenanci.com/org_5t1v/tela-painel.png",
        "width": 1920,
        "height": 1080,
        "formFactor": "wide",
        "label": null
      }
    ]
  }
}

Configure the installable app

PUT/domains/{id}/pwadomains:write

Icons must be https URLs (upload them with POST /assets). In the dashboard, icons and iOS splash screens are generated from the logo. screenshots (optional, up to 8) goes into the manifest and gives Android and desktop Chrome/Edge a richer install dialog with the app's screens: narrow for phones (portrait) and wide for desktop; 320 to 3840 px per side, the longer side at most 2.3 times the shorter one.

Parameters

  • idpath · stringrequired

    Resource id (prj_…, dom_…)

Body

  • enabledboolean
  • settingsobject
    • namestringrequiredmin 1, max 60
    • shortNamestringrequiredmin 1, max 30
    • descriptionstring | nullrequired
    • themeColorstringrequired
    • backgroundColorstringrequired
    • display"standalone" | "fullscreen" | "minimal-ui"required
    • startUrlstringrequired
    • langstring | nullrequired
    • iconsobjectrequired
      • icon192stringrequiredmax 2048
      • icon512stringrequiredmax 2048
      • maskablestringrequiredmax 2048
      • applestringrequiredmax 2048
    • promptobjectrequired
      • enabledbooleanrequired
      • textstring | nullrequired
      • delaySecondsintegerrequired≥ 0, ≤ 600
    • offlinebooleanrequired
    • serviceWorkerbooleanrequired
    • splashobject[]≤ 24 itens
      • widthintegerrequired≥ 320, ≤ 4096
      • heightintegerrequired≥ 320, ≤ 4096
      • ratiointegerrequired≥ 1, ≤ 3
      • urlstringrequiredmax 2048
    • screenshotsobject[]≤ 8 itens
      • urlstringrequiredmax 2048
      • widthintegerrequired≥ 320, ≤ 3840
      • heightintegerrequired≥ 320, ≤ 3840
      • formFactor"narrow" | "wide"required
      • labelstring | nullrequired

Request

cURL
curl -X PUT "https://api.tenanci.com/v2/domains/dom_4h7n1q/pwa" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"settings":{"name":"Barbearia do Zé","shortName":"Zé","description":"Agende seu corte","themeColor":"#1f2937","backgroundColor":"#ffffff","display":"standalone","startUrl":"/","lang":"pt-BR","icons":{"icon192":"https://assets.tenanci.com/org_5t1v/i192.png","icon512":"https://assets.tenanci.com/org_5t1v/i512.png","maskable":"https://assets.tenanci.com/org_5t1v/mask.png","apple":"https://assets.tenanci.com/org_5t1v/apple.png"},"prompt":{"enabled":true,"text":"Instale o app da Barbearia do Zé","delaySeconds":20},"offline":true,"serviceWorker":true,"screenshots":[{"url":"https://assets.tenanci.com/org_5t1v/tela-agenda.png","width":1080,"height":1920,"formFactor":"narrow","label":"Agenda do dia"},{"url":"https://assets.tenanci.com/org_5t1v/tela-painel.png","width":1920,"height":1080,"formFactor":"wide","label":null}]}}'

Response 200

{
  "enabled": true,
  "settings": {
    "name": "Barbearia do Zé",
    "shortName": "Zé",
    "description": "Agende seu corte",
    "themeColor": "#1f2937",
    "backgroundColor": "#ffffff",
    "display": "standalone",
    "startUrl": "/",
    "lang": "pt-BR",
    "icons": {
      "icon192": "https://assets.tenanci.com/org_5t1v/i192.png",
      "icon512": "https://assets.tenanci.com/org_5t1v/i512.png",
      "maskable": "https://assets.tenanci.com/org_5t1v/mask.png",
      "apple": "https://assets.tenanci.com/org_5t1v/apple.png"
    },
    "prompt": {
      "enabled": true,
      "text": "Instale o app da Barbearia do Zé",
      "delaySeconds": 20
    },
    "offline": true,
    "serviceWorker": true,
    "screenshots": [
      {
        "url": "https://assets.tenanci.com/org_5t1v/tela-agenda.png",
        "width": 1080,
        "height": 1920,
        "formFactor": "narrow",
        "label": "Agenda do dia"
      },
      {
        "url": "https://assets.tenanci.com/org_5t1v/tela-painel.png",
        "width": 1920,
        "height": 1080,
        "formFactor": "wide",
        "label": null
      }
    ]
  }
}