Skip to content

SIM (Template) ​

7 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).

OperationMethodSummary
getMailServerTemplateGETget mail server
modifyMailServerTemplatePATCHmodify mail server
querySimCardQuotaSettingTemplateGETGet one of Dual-SIM card's SIM data setting template
querySmsPolicySettingTemplateGETQuery SMS policy setting template
modifySmsPolicySettingTemplatePATCHModify SMS policy setting template
querySmsRouterCommandTemplateGETQuery SMS router command template
modifySmsRouterCommandTemplatePATCHModify SMS router command template

getMailServerTemplate ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/mails

get mail server

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
json
// omada_call_operation
{
  "operationId": "getMailServerTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  }
}
Details, permissions and error codes

get mail server.
The interface requires one of the permissions:
Global Site Template Manager View Only

modifyMailServerTemplate ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/setting/mails/{mailId}

modify mail server

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
mailIdpathstringyesMail ID

Request body — application/json (required) — schema MailServerOpenApiModifyVO

FieldTypeRequiredDescription
senderstringyesThe email address of the sender.
receiverstringyesThe email address of the receiver, which can be the same as or different from the sender's email address.
sslbooleanyesEnable this feature, and the data will be transmitted based on the SSL protocol.
smtpServerstringnoEnter the domain name or IP address of the SMTP server.
smtpPortintegernoEnter the port used by the SMTP server according to the instructions of your email service provider.
authbooleanyesEnable this feature if the login of the mailbox requires a username and authorization code.
usernamestringnoWhen Authentication is enabled, enter your email address as the username.
authCodestringnoWhen Authentication is enabled, enter the authorization code that enables a third party to log in to the mailbox. Note that the authorization code is not the mailbox's password.
json
// omada_call_operation
{
  "operationId": "modifyMailServerTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>",
    "mailId": "<mailId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

modify mail server.
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-35500 - The adopted gateway does not support mail configurations.
-35502 - The number of mail server has reached the limit.

querySimCardQuotaSettingTemplate ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/sim/quota/{simCard}

Get one of Dual-SIM card's SIM data setting template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
simCardpathstringyesSIM card. 1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "querySimCardQuotaSettingTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>",
    "simCard": "<simCard>"
  }
}
Details, permissions and error codes

Get SIM data setting template.
The interface requires one of the permissions:
Global Site Template Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-35400 - The adopted gateway does not support SIM configurations.

querySmsPolicySettingTemplate ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/sim/sms/policy

Query SMS policy setting template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
json
// omada_call_operation
{
  "operationId": "querySmsPolicySettingTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  }
}
Details, permissions and error codes

Query SMS policy setting template.
The interface requires one of the permissions:
Global Site Template Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-35400 - The adopted gateway does not support SIM configurations.

modifySmsPolicySettingTemplate ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/sim/sms/policy

Modify SMS policy setting template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

Request body — application/json (required) — schema SmaPolicySetting

FieldTypeRequiredDescription
inboxPolicyintegeryesPolicy parameter [inboxPolicy] should be from 0 to 2. 0: If SMS inbox/outbox is full, delete the oldest read SMS; 1: If SMS inbox/outbox is full, send e-mail alert to Administrator;2: If SMS inbox/outbox is full, Forward new SMS with e-mail to Administrator.
mailServerstringnoMail server ID.
resourceintegernoSMS policy setting creation resource, such as: 0: new created, 1: from template, 2: override.
json
// omada_call_operation
{
  "operationId": "modifySmsPolicySettingTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SMS policy setting template.
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-35400 - The adopted gateway does not support SIM configurations.
-35503 - The mail server does not config.
-44405 - The configuration has been overridden.

querySmsRouterCommandTemplate ​

GET /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/sim/sms/router-command

Query SMS router command template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID
json
// omada_call_operation
{
  "operationId": "querySmsRouterCommandTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  }
}
Details, permissions and error codes

Query SMS router command template.
The interface requires one of the permissions:
Global Site Template Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-35400 - The adopted gateway does not support SIM configurations.

modifySmsRouterCommandTemplate ​

PATCH /openapi/v1/{omadacId}/sitetemplates/{siteTemplateId}/sim/sms/router-command

Modify SMS router command template

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteTemplateIdpathstringyesSite Template ID

Request body — application/json (required) — schema SmsRouterCommand

FieldTypeRequiredDescription
rebootEnablebooleanyesWhether to enable the control of device restart via SMS.
rebootRebootno(Reboot not expanded; call omada_get_schema "Reboot")
statusEnablebooleanyesWhether to enable Viewing device-related information and WAN port-related information via SMS.
statusStatusno(Status not expanded; call omada_get_schema "Status")
accessEnablebooleanyesWhether to enable the allow list of the above functions, and only allow users in the list to interact with the device.
accessAccessno(Access not expanded; call omada_get_schema "Access")
resourceintegernoThe SMS router command setting creation resource, such as: 0: new created, 1: from template, 2: override.
json
// omada_call_operation
{
  "operationId": "modifySmsRouterCommandTemplate",
  "params": {
    "siteTemplateId": "<siteTemplateId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SMS router command template.
The interface requires one of the permissions:
Global Site Template Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-35400 - The adopted gateway does not support SIM configurations.
-44405 - The configuration has been overridden.

Released under the MIT License. Not affiliated with or endorsed by TP-Link.