# Is it possible to have mutliple templates defined for a single Notefile

**URL:** <https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342>\
**Category:** Notecard API\
**Created:** [October 22, 2025, 11:22am UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342 "2025-10-22T11:22:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/jakov/32/1714_2.png) [@Jakov](https://discuss.blues.com/u/Jakov)\
**Post date:** [October 22, 2025, 11:22am UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342/1 "2025-10-22T11:22:44Z")

</div>

Hi,

recently I was wondering if the design of Note Templates allows for multiple templates to be assigned for a given Notefile.  
My initial picture of note rejection mechanism on a templated notefile, was that more than one template can be provided in order to expand the range of possible note’ body json structures.

On the other hand, is it possible to somehow omit a whole JSON object, within a given note body?  
Since, given how note structure tracks `omitempty` property, for what is considered a default value of a field’ [subtype](https://dev.blues.io/notecard/notecard-walkthrough/low-bandwidth-design/#understanding-template-data-types), this could allow a sender to work with more variety.  
I can imagine specifying this property for a given JSON object either when registering a template, or just some kind of a rule across the all `note.add` ( `body` field) requests.

But, the whole purpose of templates, as I understand it, was to guide a design where each note would be relatively fixed length (or at least define an upper bound), in order to guarantee robust storage allocation.

---

<div class="post-metadata">

**Author:** ![Jakov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/jakov/32/1714_2.png) [@Jakov](https://discuss.blues.com/u/Jakov)\
**Post date:** [October 22, 2025, 11:31am UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342/3 "2025-10-22T11:31:13Z")

</div>

Also, given this paragraph is a bit ambiguous:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/blues/original/2X/a/a314445e2fe50fda6f538018c48c756f3d976568.png)  
Are the old templates accessible or applied somehow? Is the Notecard API implying that we need to erase previous templates for a given file, with `note.template` request where `file` is specified, but `body` left out.  
Also, was ‘numerous Notefile templates (\>25)’ meant for a given file at the give time, or for a given file across all time (but only one template active on that file), or for any notefiles across all time (or one time).

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [October 22, 2025, 8:34pm UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342/5 "2025-10-22T20:34:26Z")

</div>

Hi @Jakov,

I’m not sure if you saw my initial reply, but I just deleted it as it was actually incorrect. To be clear, each Notefile can only be associated with one template. Now, within that one template you do have some flexibility. For example, you can create a relatively complicated `body` that includes all sorts of data types (including arrays), but then only include the data you need in subsequent `note.add` requests.

```auto
{
  "req": "note.template",
  "file": "readings.qo",
  "port": 50,
  "body": {
    "new_vals": true,
    "temperature": 14.1,
    "humidity": 11,
    "pump_state": "4",
    "array_vals": [true, 14.1, 11, "4"]
  }
}

```

However, what you can’t do is use a JSON object in a templated Note. You’d be better served by using a standard (non-templated) Note.

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![Jakov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/jakov/32/1714_2.png) [@Jakov](https://discuss.blues.com/u/Jakov)\
**Post date:** [October 23, 2025, 1:04pm UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342/6 "2025-10-23T13:04:54Z")

</div>

Thank you Rob,

That makes sense, I’d just need your advice for managing these three [usage scenarios](https://dev.blues.io/starnote/starnote-best-practices/#usage-scenarios)

- “I want this Note to be synced regardless of RAT in use (cellular, Wi-Fi, or satellite).”
- “I only want this (large) Note to be synced when using non-NTN communications (e.g. cellular or Wi-Fi).”
- “I only want this (small) Note to be synced when using NTN communications (e.g. satellite).”

It is recommended to keep them managed in **separate** notefiles?

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [October 23, 2025, 2:09pm UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342/7 "2025-10-23T14:09:10Z")

</div>

Hi @Jakov,

I would definitely use separate Notefiles for these scenarios, especially because:

1. You can have separate templates for each (and you **must** use templated Notes for NTN communications anyway).
2. There are significant data storage and [cellular data usage](https://dev.blues.io/notecard/notecard-walkthrough/low-bandwidth-design/#data-usage-estimates) advantages when using templated Notefiles.
3. It also gives you some additional flexibility for routing (you can choose to route/not route data by Notefile name).

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![Jakov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/jakov/32/1714_2.png) [@Jakov](https://discuss.blues.com/u/Jakov)\
**Post date:** [October 23, 2025, 2:25pm UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342/8 "2025-10-23T14:25:34Z")

</div>

Right, but I was thinking along the line of using one notefile but change schema just-in-time preemptively before transitioning between the given three scenarios mentioned above.  
But that just seems like a wasteful anti-pattern.

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [October 23, 2025, 2:32pm UTC](https://discuss.blues.com/t/is-it-possible-to-have-mutliple-templates-defined-for-a-single-notefile/3342/9 "2025-10-23T14:32:42Z")

</div>

Hi @Jakov,

Yeah don’t do that! Templates are meant to be created once and only once for a given Notefile. When you create additional templates for the same Notefile, you’re effectively wasting resources by allocating additional storage unnecessarily on the Notecard.

Rob
