Help centerAPI referenceTailorKit
TailorKit
Per-domain branding and visual tweaks: draft, publishing and versions.
Get draft, published version and history
/domains/{id}/tailorkitdomains:readReturns the current draft, the live document, the latest versions (up to 50) and the scheduled publish (scheduled, null if none). Rules saved in the old format (v1) come already converted to the v2 document.
Parameters
idpath · stringrequiredDomain id (dom_…)
Request
curl "https://api.tenanci.com/v2/domains/dom_4h7n1q/tailorkit" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"draft": {
"version": 3,
"document": {
"version": 2,
"theme": {
"colors": {
"primary": "#b45309",
"secondary": "#1f2937",
"accent": null,
"background": "#ffffff",
"text": "#111827"
},
"fonts": {
"heading": "Playfair Display",
"body": "Inter"
},
"radius": 8,
"logo": {
"url": "https://assets.tenanci.com/org_5t1v/3n8q.png",
"maxHeight": 48
},
"cssVars": {
"--brand": "#b45309"
},
"logoTargets": []
},
"globalCss": "",
"replacements": [
{
"find": "Agenda Fácil",
"replace": "Barbearia do Zé",
"caseSensitive": false
}
],
"pages": {
"/": {
"css": "",
"rules": [
{
"id": "r_titulo",
"target": {
"tag": "h1",
"id": null,
"testId": null,
"aria": null,
"text": "Agende seu horário",
"css": "main > h1:nth-of-type(1)",
"attrs": {},
"nth": 0
},
"action": {
"type": "setText",
"value": "Agende seu corte na Barbearia do Zé"
},
"devices": [],
"enabled": true,
"note": null
}
]
}
}
},
"updatedAt": "2026-10-15T18:20:00.000Z"
},
"published": {
"version": 2,
"document": {
"version": 2,
"theme": {
"colors": {
"primary": "#b45309",
"secondary": "#1f2937",
"accent": null,
"background": "#ffffff",
"text": "#111827"
},
"fonts": {
"heading": "Playfair Display",
"body": "Inter"
},
"radius": 8,
"logo": {
"url": "https://assets.tenanci.com/org_5t1v/3n8q.png",
"maxHeight": 48
},
"cssVars": {
"--brand": "#b45309"
},
"logoTargets": []
},
"globalCss": "",
"replacements": [],
"pages": {
"/": {
"css": "",
"rules": [
{
"id": "r_titulo",
"target": {
"tag": "h1",
"id": null,
"testId": null,
"aria": null,
"text": "Agende seu horário",
"css": "main > h1:nth-of-type(1)",
"attrs": {},
"nth": 0
},
"action": {
"type": "setText",
"value": "Agende seu corte na Barbearia do Zé"
},
"devices": [],
"enabled": true,
"note": null
}
]
}
}
},
"publishedAt": "2026-10-14T16:00:00.000Z"
},
"history": [
{
"version": 2,
"status": "published",
"publishedAt": "2026-10-14T16:00:00.000Z",
"createdBy": "usr_01J9Z8Q3K4M5N6P7Q8R9S0T1V2"
},
{
"version": 1,
"status": "archived",
"publishedAt": "2026-10-14T12:30:00.000Z",
"createdBy": "usr_01J9Z8Q3K4M5N6P7Q8R9S0T1V2"
}
],
"scheduled": {
"at": "2026-10-20T12:00:00.000Z",
"version": 3,
"by": "usr_01J9Z8Q3K4M5N6P7Q8R9S0T1V2"
}
}Save the draft
/domains/{id}/tailorkit/draftdomains:writeGrowth+Replaces the draft document (creates the draft if there is none). Nothing goes live until you publish. 1 MB limit (400 rules_too_large); an invalid document returns 400 invalid_rules with the problems in details. Older integrations may send { rules: … } in the v1 format, which is converted.
Parameters
idpath · stringrequiredDomain id (dom_…)
Body
documentobjectrequiredTailorKit 2.0 document: theme, global CSS, text replacements, per-page rules, A/B tests and translation.
version2requiredbreakpointsobjecttabletintegerrequired≥ 320, ≤ 2560mobileintegerrequired≥ 240, ≤ 1600
themeobjectrequiredcolorsobjectrequiredprimarystring | nullrequiredsecondarystring | nullrequiredaccentstring | nullrequiredbackgroundstring | nullrequiredtextstring | nullrequired
fontsobjectrequiredheadingstring | nullrequiredbodystring | nullrequired
radiusnumber | nullrequiredlogoobject | nullrequiredurlstringrequiredmax 2048maxHeightintegerrequired≤ 400
cssVarsRecord<string, string>requiredlogoTargetsobject[]required≤ 10 itenstagstringrequiredmax 40idstring | nullrequiredtestIdstring | nullrequiredariastring | nullrequiredtextstring | nullrequiredcssstringrequiredmax 2000attrsRecord<string, string>requirednthinteger | nullrequiredclassesstring[]≤ 6 itens
globalCssstringrequiredmax 50000replacementsobject[]required≤ 200 itensfindstringrequiredmin 1, max 500replacestringrequiredmax 500caseSensitivebooleanrequired
pagesRecord<string, object>requiredexperimentsobject[]≤ 10 itensidstringrequirednamestringrequiredmin 1, max 80status"draft" | "running" | "paused" | "ended"requiredgoalstring | nullrequiredcontrolWeightintegerrequired≥ 0, ≤ 100variantsobject[]required≤ 3 itenskey"b" | "c" | "d"requirednamestringrequiredmin 1, max 60weightintegerrequired≥ 0, ≤ 100pagesRecord<string, object>requiredbrandobject
winner"a" | "b" | "c" | "d" | nullrequiredstartedAtstring | nullrequired
translationobject | nulllangstringrequiredstringsRecord<string, string>required
Request
curl -X PUT "https://api.tenanci.com/v2/domains/dom_4h7n1q/tailorkit/draft" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"document":{"version":2,"theme":{"colors":{"primary":"#b45309","secondary":"#1f2937","accent":null,"background":"#ffffff","text":"#111827"},"fonts":{"heading":"Playfair Display","body":"Inter"},"radius":8,"logo":{"url":"https://assets.tenanci.com/org_5t1v/3n8q.png","maxHeight":48},"cssVars":{"--brand":"#b45309"},"logoTargets":[]},"globalCss":"","replacements":[{"find":"Agenda Fácil","replace":"Barbearia do Zé","caseSensitive":false}],"pages":{"/":{"css":"","rules":[{"id":"r_titulo","target":{"tag":"h1","id":null,"testId":null,"aria":null,"text":"Agende seu horário","css":"main > h1:nth-of-type(1)","attrs":{},"nth":0},"action":{"type":"setText","value":"Agende seu corte na Barbearia do Zé"},"devices":[],"enabled":true,"note":null}]}}}}'Response 200
{
"version": 3
}Schedule the draft's publish
/domains/{id}/tailorkit/scheduledomains:writeGrowth+Publishes the draft at the given time (from 1 minute up to 365 days ahead; otherwise 400 invalid_schedule). Scheduling again replaces the previous schedule. No draft: 400 no_draft.
Parameters
idpath · stringrequiredDomain id (dom_…)
Body
atstringrequiredPublish date and time (ISO 8601, with offset).
Request
curl -X POST "https://api.tenanci.com/v2/domains/dom_4h7n1q/tailorkit/schedule" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"at":"2026-10-20T09:00:00-03:00"}'Response 200
{
"version": 3,
"at": "2026-10-20T12:00:00.000Z"
}Cancel the scheduled publish
/domains/{id}/tailorkit/scheduledomains:writecanceled: false when there was no pending schedule. The draft stays saved.
Parameters
idpath · stringrequiredDomain id (dom_…)
Request
curl -X DELETE "https://api.tenanci.com/v2/domains/dom_4h7n1q/tailorkit/schedule" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"canceled": true
}Publish the draft now
/domains/{id}/tailorkit/publishdomains:writeGrowth+The draft becomes the live version and the previous one goes to history. No draft: 400 no_draft. A pending schedule isn't canceled (if there's no draft at that time, it does nothing).
Parameters
idpath · stringrequiredDomain id (dom_…)
Request
curl -X POST "https://api.tenanci.com/v2/domains/dom_4h7n1q/tailorkit/publish" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"version": 3
}Roll back to a previous version
/domains/{id}/tailorkit/rollback/{version}domains:writeGrowth+Copies the chosen version into a new version and publishes it. The current draft is discarded.
Parameters
idpath · stringrequiredDomain id (dom_…)
versionpath · stringrequiredVersion number (see
history)
Request
curl -X POST "https://api.tenanci.com/v2/domains/dom_4h7n1q/tailorkit/rollback/<version>" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"version": 4
}
