# SmartREST template doesn't apply

**URL:** <https://community.cumulocity.com/t/smartrest-template-doesnt-apply/498>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [May 6, 2019, 2:06pm UTC](https://community.cumulocity.com/t/smartrest-template-doesnt-apply/498 "2019-05-06T14:06:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Stets](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@Alexander\_Stets](https://community.cumulocity.com/u/Alexander_Stets)\
**Post date:** [May 6, 2019, 2:06pm UTC](https://community.cumulocity.com/t/smartrest-template-doesnt-apply/498/1 "2019-05-06T14:06:15Z")

</div>

I have a custom template with id 222.  
I have created a new device MQTTBoxDevice using MQTTBox.  
I subscribed the error topic s/e

I tried to send message 222,45  
And I received error message: “40,222,No static template for this message id”

I tried to create template 10,333,POST,MEASUREMENT,c8y\_TemperatureMeasurement,c8y\_TemperatureMeasurement.T.value,NUMBER,  
But I received folow message agan: “40,10,No static template for this message id”

At the same time a static template (for example 211) works well.

Why is Cumulocity trying to find a static template instead of my own template?  
Why can’t Cumulocity find a static template 10?  
How can I create template and send message using this template?

---

<div class="post-metadata">

**Author:** ![Michael\_Welsing](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Michael\_Welsing](https://community.cumulocity.com/u/Michael_Welsing)\
**Post date:** [May 7, 2019, 11:12am UTC](https://community.cumulocity.com/t/smartrest-template-doesnt-apply/498/2 "2019-05-07T11:12:02Z")

</div>

Hi Alexander,

to use custom templates instead of static templates you need to address them in the mqtt topic.

Please see [https://cumulocity.com/guides/reference/smartrest-two/](https://cumulocity.com/guides/device-sdk/mqtt#smartrest-2) for more informations on that.

The standard topic you should use is s/uc/  
where is replaced with your template’s ID.

best regards  
Michael

---

<div class="post-metadata">

**Author:** ![Alexander\_Stets](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@Alexander\_Stets](https://community.cumulocity.com/u/Alexander_Stets)\
**Post date:** [May 7, 2019, 1:37pm UTC](https://community.cumulocity.com/t/smartrest-template-doesnt-apply/498/3 "2019-05-07T13:37:04Z")

</div>

Thank you!

It is working.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [April 2, 2021, 3:42pm UTC](https://community.cumulocity.com/t/smartrest-template-doesnt-apply/498/4 "2021-04-02T15:42:44Z")

</div>


