POST api/v1/bots/thethingsnetworkbots
Create a The Things Network Bot.
Request Information
URI Parameters
None.
Body Parameters
RegisterTheThingsNetworkBotRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| BotName | string |
None. |
|
| AutoAddDevices | boolean |
None. |
|
| DevicePrefix | string |
None. |
|
| DeviceTags | Collection of string |
None. |
Request Formats
application/json, text/json, application/senml+json
Sample:
{
"BotName": "sample string 1",
"AutoAddDevices": true,
"DevicePrefix": "sample string 3",
"DeviceTags": [
"sample string 1",
"sample string 2"
]
}
application/xml, text/xml
Sample:
<RegisterTheThingsNetworkBotRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots.TheThingsNetwork">
<AutoAddDevices>true</AutoAddDevices>
<BotName>sample string 1</BotName>
<DevicePrefix>sample string 3</DevicePrefix>
<DeviceTags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</DeviceTags>
</RegisterTheThingsNetworkBotRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
TheThingsNetworkBotDto| Name | Description | Type | Additional information |
|---|---|---|---|
| AccountName |
Account name for use when setting up the callback url |
string |
None. |
| UplinkCallbackUrl |
Uplink and Bidir uplink callback Url. |
string |
None. |
| HeaderValue | string |
None. |
|
| AutoAddDevices | boolean |
None. |
|
| DevicePrefix | string |
None. |
|
| Devices | Collection of LoRaDeviceSummaryDto |
None. |
|
| DeviceTags | Collection of string |
None. |
|
| Id |
User Id |
globally unique identifier |
None. |
| Name |
The users name |
string |
None. |
| UserName |
UserName (used to login with) |
string |
None. |
| FullUserName |
User Id and Account name |
string |
None. |
| BotType |
The type of bot. |
string |
None. |
| DisplayName |
Users first and last name |
string |
None. |
| DevicesCheckIntervalMinutes |
How often the spark account should be checked for new devices. |
integer |
None. |
| MeasurementCollectionIntervalMinutes |
How often measurements should be collected from the devices (applies to new devices only). |
integer |
None. |
| Links |
Collection of links appropriate for the user |
Collection of LinkDto |
None. |
| Actions | Collection of LinkDto |
None. |
|
| Description | string |
None. |
|
| Enabled | boolean |
None. |
|
| Authenticated |
If the bot is authenticated. |
boolean |
None. |
Response Formats
application/json, text/json, application/senml+json
Sample:
{
"AccountName": "sample string 1",
"UplinkCallbackUrl": "sample string 2",
"HeaderValue": "sample string 3",
"AutoAddDevices": true,
"DevicePrefix": "sample string 5",
"Devices": [
{
"DeviceName": "sample string 1",
"Counter": 2,
"HardwareSerial": "sample string 3",
"LastUpdated": "2025-10-25T16:35:57.8494012+00:00",
"DateAdded": "2025-10-25T16:35:57.8494012+00:00",
"Application": "sample string 6",
"Associated": true,
"UserName": "sample string 8",
"UserId": "6e11ef25-ecbd-4a6b-9048-b4bda82848ca",
"Deleted": true
},
{
"DeviceName": "sample string 1",
"Counter": 2,
"HardwareSerial": "sample string 3",
"LastUpdated": "2025-10-25T16:35:57.8494012+00:00",
"DateAdded": "2025-10-25T16:35:57.8494012+00:00",
"Application": "sample string 6",
"Associated": true,
"UserName": "sample string 8",
"UserId": "6e11ef25-ecbd-4a6b-9048-b4bda82848ca",
"Deleted": true
}
],
"DeviceTags": [
"sample string 1",
"sample string 2"
],
"Id": "94fba852-00de-4d8b-8cf1-09c9d5694a14",
"Name": "sample string 7",
"UserName": "sample string 8",
"FullUserName": "sample string 9",
"BotType": "sample string 10",
"DisplayName": "sample string 11",
"DevicesCheckIntervalMinutes": 12,
"MeasurementCollectionIntervalMinutes": 13,
"Links": [
{
"Href": "sample string 1",
"Rel": "sample string 2",
"Action": "sample string 3"
},
{
"Href": "sample string 1",
"Rel": "sample string 2",
"Action": "sample string 3"
}
],
"Actions": [
{
"Href": "sample string 1",
"Rel": "sample string 2",
"Action": "sample string 3"
},
{
"Href": "sample string 1",
"Rel": "sample string 2",
"Action": "sample string 3"
}
],
"Description": "sample string 14",
"Enabled": true,
"Authenticated": true
}
application/xml, text/xml
Sample:
<TheThingsNetworkBotDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots.TheThingsNetwork">
<Actions xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">
<d2p1:LinkViewModel>
<d2p1:Action>sample string 3</d2p1:Action>
<d2p1:Href>sample string 1</d2p1:Href>
<d2p1:Rel>sample string 2</d2p1:Rel>
</d2p1:LinkViewModel>
<d2p1:LinkViewModel>
<d2p1:Action>sample string 3</d2p1:Action>
<d2p1:Href>sample string 1</d2p1:Href>
<d2p1:Rel>sample string 2</d2p1:Rel>
</d2p1:LinkViewModel>
</Actions>
<Authenticated xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">true</Authenticated>
<BotType xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 10</BotType>
<Description xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 14</Description>
<DevicesCheckIntervalMinutes xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">12</DevicesCheckIntervalMinutes>
<DisplayName xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 11</DisplayName>
<Enabled xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">true</Enabled>
<FullUserName xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 9</FullUserName>
<Id xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">94fba852-00de-4d8b-8cf1-09c9d5694a14</Id>
<Links xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">
<d2p1:LinkViewModel>
<d2p1:Action>sample string 3</d2p1:Action>
<d2p1:Href>sample string 1</d2p1:Href>
<d2p1:Rel>sample string 2</d2p1:Rel>
</d2p1:LinkViewModel>
<d2p1:LinkViewModel>
<d2p1:Action>sample string 3</d2p1:Action>
<d2p1:Href>sample string 1</d2p1:Href>
<d2p1:Rel>sample string 2</d2p1:Rel>
</d2p1:LinkViewModel>
</Links>
<MeasurementCollectionIntervalMinutes xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">13</MeasurementCollectionIntervalMinutes>
<Name xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 7</Name>
<UserName xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Bots">sample string 8</UserName>
<AccountName>sample string 1</AccountName>
<AutoAddDevices>true</AutoAddDevices>
<DevicePrefix>sample string 5</DevicePrefix>
<DeviceTags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</DeviceTags>
<Devices>
<LoRaDeviceSummaryDto>
<Application>sample string 6</Application>
<Associated>true</Associated>
<Counter>2</Counter>
<DateAdded>2025-10-25T16:35:57.8494012+00:00</DateAdded>
<Deleted>true</Deleted>
<DeviceName>sample string 1</DeviceName>
<HardwareSerial>sample string 3</HardwareSerial>
<LastUpdated>2025-10-25T16:35:57.8494012+00:00</LastUpdated>
<UserId>6e11ef25-ecbd-4a6b-9048-b4bda82848ca</UserId>
<UserName>sample string 8</UserName>
</LoRaDeviceSummaryDto>
<LoRaDeviceSummaryDto>
<Application>sample string 6</Application>
<Associated>true</Associated>
<Counter>2</Counter>
<DateAdded>2025-10-25T16:35:57.8494012+00:00</DateAdded>
<Deleted>true</Deleted>
<DeviceName>sample string 1</DeviceName>
<HardwareSerial>sample string 3</HardwareSerial>
<LastUpdated>2025-10-25T16:35:57.8494012+00:00</LastUpdated>
<UserId>6e11ef25-ecbd-4a6b-9048-b4bda82848ca</UserId>
<UserName>sample string 8</UserName>
</LoRaDeviceSummaryDto>
</Devices>
<HeaderValue>sample string 3</HeaderValue>
<UplinkCallbackUrl>sample string 2</UplinkCallbackUrl>
</TheThingsNetworkBotDto>