TenanciTenanci

Central de ajudaReferência da APIProjetos

Projetos

O app de origem e a verificação de propriedade.

Listar projetos

GET/projectsdomains:read

Requisição

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

Resposta 200

{
  "items": [
    {
      "id": "prj_8f3k2m",
      "name": "Barbearias",
      "originUrl": "https://app.agendafacil.com",
      "extraOrigins": [],
      "status": "active",
      "ownership": {
        "verified": true,
        "verifiedAt": "2026-10-01T14:03:11.000Z",
        "record": {
          "type": "TXT",
          "name": "_tenanci-verify.agendafacil.com",
          "value": "q3Zt9vXk2LwP8mR4sN7aB1cD5eF6gH0j"
        }
      },
      "spa": {
        "mode": "mask",
        "initialRouteVar": false
      },
      "blockedPaths": [],
      "tenantSecret": true,
      "tailorkitViewerHost": null,
      "platform": "bubble",
      "legacyId": null,
      "createdAt": "2026-10-01T13:58:40.000Z",
      "updatedAt": "2026-10-01T14:03:11.000Z"
    }
  ]
}

Criar projeto

POST/projectsdomains:write

Um projeto é o seu app (a origem). Depois de criar, publique o TXT de ownership.record no DNS da origem e chame a verificação.

Corpo

  • namestringobrigatóriomax 120

    Nome do projeto.

  • originUrlstringobrigatóriomin 3, max 2048

    Endereço do app (ex.: https://app.agendafacil.com).

Requisição

cURL
curl -X POST "https://api.tenanci.com/v2/projects" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"name":"Barbearias","originUrl":"https://app.agendafacil.com"}'

Resposta 201

{
  "id": "prj_8f3k2m",
  "name": "Barbearias",
  "originUrl": "https://app.agendafacil.com",
  "extraOrigins": [],
  "status": "pending_verification",
  "ownership": {
    "verified": false,
    "verifiedAt": null,
    "record": {
      "type": "TXT",
      "name": "_tenanci-verify.agendafacil.com",
      "value": "q3Zt9vXk2LwP8mR4sN7aB1cD5eF6gH0j"
    }
  },
  "spa": {
    "mode": "mask",
    "initialRouteVar": false
  },
  "blockedPaths": [],
  "tenantSecret": true,
  "tailorkitViewerHost": null,
  "platform": "bubble",
  "legacyId": null,
  "createdAt": "2026-10-01T13:58:40.000Z",
  "updatedAt": "2026-10-01T14:03:11.000Z"
}

Ver projeto

GET/projects/{id}domains:read

Parâmetros

  • idpath · stringobrigatório

    Id do recurso (prj_…, dom_…)

Requisição

cURL
curl "https://api.tenanci.com/v2/projects/prj_8f3k2m" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"

Resposta 200

{
  "id": "prj_8f3k2m",
  "name": "Barbearias",
  "originUrl": "https://app.agendafacil.com",
  "extraOrigins": [],
  "status": "active",
  "ownership": {
    "verified": true,
    "verifiedAt": "2026-10-01T14:03:11.000Z",
    "record": {
      "type": "TXT",
      "name": "_tenanci-verify.agendafacil.com",
      "value": "q3Zt9vXk2LwP8mR4sN7aB1cD5eF6gH0j"
    }
  },
  "spa": {
    "mode": "mask",
    "initialRouteVar": false
  },
  "blockedPaths": [],
  "tenantSecret": true,
  "tailorkitViewerHost": null,
  "platform": "bubble",
  "legacyId": null,
  "createdAt": "2026-10-01T13:58:40.000Z",
  "updatedAt": "2026-10-01T14:03:11.000Z"
}

Alterar projeto

PATCH/projects/{id}domains:write

Parâmetros

  • idpath · stringobrigatório

    Id do recurso (prj_…, dom_…)

Corpo

  • namestringmax 120
  • originUrlstringmax 2048

    Trocar a origem exige verificar de novo.

  • extraOriginsstring[]≤ 50 itens

    Outros hosts que o app usa (CDN, API) e que o edge pode servir em /__external__/.

  • spaMode"mask" | "redirect"

    Apps SPA: mask (mantém o endereço) ou redirect.

  • spaInitialRouteVarboolean

    Envia a rota inicial ao app quando uma rota é reescrita (Flutter e afins).

  • blockedPathsstring[]≤ 100 itens

    Caminhos bloqueados em todos os domínios (404).

Requisição

cURL
curl -X PATCH "https://api.tenanci.com/v2/projects/prj_8f3k2m" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"blockedPaths":["/admin","/wp-login.php"]}'

Resposta 200

{
  "id": "prj_8f3k2m",
  "name": "Barbearias",
  "originUrl": "https://app.agendafacil.com",
  "extraOrigins": [],
  "status": "active",
  "ownership": {
    "verified": true,
    "verifiedAt": "2026-10-01T14:03:11.000Z",
    "record": {
      "type": "TXT",
      "name": "_tenanci-verify.agendafacil.com",
      "value": "q3Zt9vXk2LwP8mR4sN7aB1cD5eF6gH0j"
    }
  },
  "spa": {
    "mode": "mask",
    "initialRouteVar": false
  },
  "blockedPaths": [],
  "tenantSecret": true,
  "tailorkitViewerHost": null,
  "platform": "bubble",
  "legacyId": null,
  "createdAt": "2026-10-01T13:58:40.000Z",
  "updatedAt": "2026-10-01T14:03:11.000Z"
}

Apagar projeto

DELETE/projects/{id}domains:write

Apaga também os domínios do projeto.

Parâmetros

  • idpath · stringobrigatório

    Id do recurso (prj_…, dom_…)

Requisição

cURL
curl -X DELETE "https://api.tenanci.com/v2/projects/prj_8f3k2m" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"

Resposta 204

Sucesso

Verificar a propriedade da origem

POST/projects/{id}/verifydomains:write

Confere o TXT no DNS da origem. Pode chamar de novo até dar verified: true.

Parâmetros

  • idpath · stringobrigatório

    Id do recurso (prj_…, dom_…)

Requisição

cURL
curl -X POST "https://api.tenanci.com/v2/projects/prj_8f3k2m/verify" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"

Resposta 200

{
  "verified": true,
  "recordName": "_tenanci-verify.agendafacil.com",
  "expected": "q3Zt9vXk2LwP8mR4sN7aB1cD5eF6gH0j",
  "found": [
    "q3Zt9vXk2LwP8mR4sN7aB1cD5eF6gH0j"
  ]
}

Detectar a plataforma do app

POST/projects/{id}/platform/detectdomains:write

Lê a origem e identifica Bubble, FlutterFlow, WeWeb, Softr, Lovable, Bolt…

Parâmetros

  • idpath · stringobrigatório

    Id do recurso (prj_…, dom_…)

Requisição

cURL
curl -X POST "https://api.tenanci.com/v2/projects/prj_8f3k2m/platform/detect" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"

Resposta 200

{
  "platform": "bubble",
  "why": "Script do Bubble na página inicial"
}

Escolher a plataforma do app

PUT/projects/{id}/platformdomains:write

Parâmetros

  • idpath · stringobrigatório

    Id do recurso (prj_…, dom_…)

Corpo

  • platformstringobrigatóriomax 20

    bubble, flutterflow, weweb, softr, lovable, bolt, other…

Requisição

cURL
curl -X PUT "https://api.tenanci.com/v2/projects/prj_8f3k2m/platform" \
  -H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"platform":"flutterflow"}'

Resposta 200

{
  "platform": "flutterflow",
  "why": null
}