Skip to content

SIM ​

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

OperationMethodSummary
getMailServerByMacGETGet mail server by mac
createMailServerByMacPOSTCreate mail server by mac
correctSimQuotaByMacPOSTCorrect SIM data
querySimQuotaSettingByMacGETGet SIM data setting by mac
modifySimQuotaSettingByMacPATCHModify SIM data setting by mac
querySimCardQuotaSettingByMacGETGet one of Dual-SIM card's SIM data setting by mac
exportSmsMessageBymacPOSTExport SMS message by mac (deprecated)
getGridSmsInboxMessageByMacGETGet SMS inbox message by mac
getGridSimCardSmsInboxMessageByMacGETGet one of Dual-SIM card's SMS inbox message by mac
operateSmsMessageByMacPOSTOperate SMS message by mac
getGridSmsOutboxMessageByMacGETGet SMS outbox message by mac
getGridSimCardSmsOutboxMessageByMacGETGet one of Dual-SIM card's SMS outbox message by mac
querySmsPolicySettingByMacGETQuery SMS policy setting by mac
modifySmsPolicySettingByMacPATCHModify SMS policy setting
querySmsRouterCommandByMacGETQuery SMS router command by mac
modifySmsRouterCommandByMacPATCHModify SMS router command by mac
sendSmsMessageByMacPOSTSend SMS message
getSupportSmsByMacGETGet support SMS
getMailServerGETGet mail server
createMailServerPOSTCreate mail server
modifyMailServerPATCHModify mail server
correctSimQuotaPOSTCorrect SIM data
querySimQuotaSettingGETGet SIM data setting
modifySimQuotaSettingPATCHModify SIM data setting
querySimCardQuotaSettingGETGet one of Dual-SIM card's SIM data setting
exportSmsMessagePOSTExport SMS message
getGridSmsInboxMessageGETGet SMS inbox message
getGridSimCardSmsInboxMessageGETGet one of Dual-SIM card's SMS inbox message
operateSmsMessagePOSTOperate SMS message
getGridSmsOutboxMessageGETGet SMS outbox message
getGridSimCardSmsOutboxMessageGETGet one of Dual-SIM card's SMS outbox message
querySmsPolicySettingGETQuery SMS policy setting
modifySmsPolicySettingPATCHModify SMS policy setting
querySmsRouterCommandGETQuery SMS router command
modifySmsRouterCommandPATCHModify SMS router command
sendSmsMessagePOSTSend SMS message
getSupportSmsGETGet support SMS
exportSmsMessageBymacV2POSTExport SMS message by mac V2

getMailServerByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/mails

Get mail server by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "getMailServerByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  }
}
Details, permissions and error codes

Get mail server by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-35500 - The adopted gateway does not support mail configurations.

createMailServerByMac ​

POST /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/mails

Create mail server by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
idstringnoMail server ID.
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.
resourceintegernoMail server setting creation resource, such as: 0: new created, 1: from template, 2: override.
json
// omada_call_operation
{
  "operationId": "createMailServerByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create mail server by mac.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

correctSimQuotaByMac ​

POST /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/correct

Correct SIM data

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
datanumber (float)noThe amount of data usage(KB) in current billing cycle.
smsintegernoThe amount of SMS in current billing cycle, valid date should be within the range of 0–100000.
simCardintegernoWhen device supports Dual-SIM card, using parameter [simCard] to point which card to configure. 1: SIM1; 2:SIM2.
json
// omada_call_operation
{
  "operationId": "correctSimQuotaByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Correct SIM data.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

querySimQuotaSettingByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/quota

Get SIM data setting by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "querySimQuotaSettingByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  }
}
Details, permissions and error codes

Get SIM data setting by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

modifySimQuotaSettingByMac ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/quota

Modify SIM data setting by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
dataSettingQuotaDataSettingOpenApiVOno(QuotaDataSettingOpenApiVO not expanded; call omada_get_schema "QuotaDataSettingOpenApiVO")
smsSettingQuotaSmsSettingOpenApiVOno(QuotaSmsSettingOpenApiVO not expanded; call omada_get_schema "QuotaSmsSettingOpenApiVO")
simCardintegernoWhen device supports Dual-SIM card, using parameter [simCard] to point which card to configure. 1: SIM1; 2:SIM2.
cardStatusintegernoSim card status.
resourceintegernoSim quota setting creation resource,such as: 0: new created, 1: from template, 2: override.
json
// omada_call_operation
{
  "operationId": "modifySimQuotaSettingByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SIM data setting by mac.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

querySimCardQuotaSettingByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/quota/{simCard}

Get one of Dual-SIM card's SIM data setting by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
simCardpathstringyesSIM card. 1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "querySimCardQuotaSettingByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>",
    "simCard": "<simCard>"
  }
}
Details, permissions and error codes

Get SIM data setting by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

exportSmsMessageBymac ​

POST /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/export

Deprecated

This operation is deprecated.

Export SMS message by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
typeintegeryesMessage parameter [type] should be 0 or 1. 0:inbox; 1:outbox.
formatintegeryesMessage parameter [format] should be 0 or 1. 0:csv; 1:xlsx.
startTimeintegeryesThe timeStamp of the message start time.
endTimeintegeryesThe timeStamp of the message end time.
simCardintegernoWhen the device supports Dual-SIM cardm parameter [simCard] should be 1 or 2. 1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "exportSmsMessageBymac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Export SMS message by mac.This interface has been deprecated. Please use the following interfaces instead: Export SMS message by mac V2.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35404 - Device does not exist, cannot export message.
-35406 - No SMS, cannot export.
-35411 - The gateway does not support Dual-SIM standby.

getGridSmsInboxMessageByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/inbox

Get SMS inbox message by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSmsInboxMessageByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  }
}
Details, permissions and error codes

Get SMS inbox message by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.

getGridSimCardSmsInboxMessageByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/inbox/{simCard}

Get one of Dual-SIM card's SMS inbox message by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
simCardpathstringyesSIM card. 1: SIM1; 2: SIM2.
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSimCardSmsInboxMessageByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>",
    "simCard": "<simCard>"
  }
}
Details, permissions and error codes

Get SMS inbox message by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35411 - The gateway does not support Dual-SIM standby.

operateSmsMessageByMac ​

POST /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/operate

Operate SMS message by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
typeintegeryesMessage Type. 0: inbox; 1: outbox.
operationintegeryesOperation Type. 1:delete; 2:read; 3:clear.
idsarray<integer>noMessage ID list. When parameter [operation] is 1 or 2, parameter [ids] should not be null.
simCardintegernoWhen the device supports Dual-SIM card, parameter [simCard] should not be null.1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "operateSmsMessageByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Operate SMS message by mac.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35402 - Device does not exist, cannot send message.
-35411 - The gateway does not support Dual-SIM standby.
-44301 - Failed to get any response from the gateway.

getGridSmsOutboxMessageByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/outbox

Get SMS outbox message by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSmsOutboxMessageByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  }
}
Details, permissions and error codes

Get SMS outbox message by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.

getGridSimCardSmsOutboxMessageByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/outbox/{simCard}

Get one of Dual-SIM card's SMS outbox message by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
simCardpathstringyesSIM card. 1: SIM1; 2: SIM2.
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSimCardSmsOutboxMessageByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>",
    "simCard": "<simCard>"
  }
}
Details, permissions and error codes

Get SMS outbox message by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.

querySmsPolicySettingByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/policy

Query SMS policy setting by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "querySmsPolicySettingByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  }
}
Details, permissions and error codes

Query SMS policy setting by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

modifySmsPolicySettingByMac ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/policy

Modify SMS policy setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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": "modifySmsPolicySettingByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SMS policy setting.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

querySmsRouterCommandByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/router-command

Query SMS router command by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "querySmsRouterCommandByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  }
}
Details, permissions and error codes

Query SMS router command by mac.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

modifySmsRouterCommandByMac ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/router-command

Modify SMS router command by mac

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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": "modifySmsRouterCommandByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SMS router command by mac.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

sendSmsMessageByMac ​

POST /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/send

Send SMS message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
callingCodestringnoCalling code should contain 2 to 5 characters. Calling code must be entered when entering the country code. For the values of Calling code, refer to section 5.4.1 of the Open API Access Guide.
receiverstringyesReceiver number.
typeintegeryesSend type. 0: formal; 1: test
contentstringnoWhen parameter [type] is 0, parameter [content] should not be null.
testSimQuotaSettingno(SimQuotaSetting not expanded; call omada_get_schema "SimQuotaSetting")
simCardintegernoWhen the device supports Dual-SIM card, parameter [simCard] shoud not be null.1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "sendSmsMessageByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Send SMS message.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35402 - Device does not exist, cannot send message.
-35411 - The gateway does not support Dual-SIM standby.
-44301 - Failed to get any response from the gateway.

getSupportSmsByMac ​

GET /openapi/v1/{omadacId}/sites/{siteId}/gateways/{gatewayMac}/sim/sms/support

Get support SMS

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF
json
// omada_call_operation
{
  "operationId": "getSupportSmsByMac",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  }
}
Details, permissions and error codes

Get SIM card whether supports SMS.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device Manager View Only

getMailServer ​

GET /openapi/v1/{omadacId}/sites/{siteId}/setting/mails

Get mail server

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getMailServer",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get mail server.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-35500 - The adopted gateway does not support mail configurations.

createMailServer ​

POST /openapi/v1/{omadacId}/sites/{siteId}/setting/mails

Create mail server

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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

FieldTypeRequiredDescription
idstringnoMail server ID.
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.
resourceintegernoMail server setting creation resource, such as: 0: new created, 1: from template, 2: override.
json
// omada_call_operation
{
  "operationId": "createMailServer",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create mail server.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

modifyMailServer ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/setting/mails/{mailId}

Modify mail server

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
mailIdpathstringyesMail ID

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

FieldTypeRequiredDescription
idstringnoMail server ID.
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.
resourceintegernoMail server setting creation resource, such as: 0: new created, 1: from template, 2: override.
json
// omada_call_operation
{
  "operationId": "modifyMailServer",
  "params": {
    "siteId": "<siteId>",
    "mailId": "<mailId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify mail server.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.
-35501 - The mail server does not exist.

correctSimQuota ​

POST /openapi/v1/{omadacId}/sites/{siteId}/sim/correct

Correct SIM data

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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

FieldTypeRequiredDescription
datanumber (float)noThe amount of data usage(KB) in current billing cycle.
smsintegernoThe amount of SMS in current billing cycle, valid date should be within the range of 0–100000.
simCardintegernoWhen device supports Dual-SIM card, using parameter [simCard] to point which card to configure. 1: SIM1; 2:SIM2.
json
// omada_call_operation
{
  "operationId": "correctSimQuota",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Correct SIM data.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

querySimQuotaSetting ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/quota

Get SIM data setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "querySimQuotaSetting",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get SIM data setting.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

modifySimQuotaSetting ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/sim/quota

Modify SIM data setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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

FieldTypeRequiredDescription
dataSettingQuotaDataSettingOpenApiVOno(QuotaDataSettingOpenApiVO not expanded; call omada_get_schema "QuotaDataSettingOpenApiVO")
smsSettingQuotaSmsSettingOpenApiVOno(QuotaSmsSettingOpenApiVO not expanded; call omada_get_schema "QuotaSmsSettingOpenApiVO")
simCardintegernoWhen device supports Dual-SIM card, using parameter [simCard] to point which card to configure. 1: SIM1; 2:SIM2.
cardStatusintegernoSim card status.
resourceintegernoSim quota setting creation resource,such as: 0: new created, 1: from template, 2: override.
json
// omada_call_operation
{
  "operationId": "modifySimQuotaSetting",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SIM data setting.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

querySimCardQuotaSetting ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/quota/{simCard}

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

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
simCardpathstringyesSIM card. 1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "querySimCardQuotaSetting",
  "params": {
    "siteId": "<siteId>",
    "simCard": "<simCard>"
  }
}
Details, permissions and error codes

Get SIM data setting.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

exportSmsMessage ​

POST /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/export

Export SMS message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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

FieldTypeRequiredDescription
typeintegeryesMessage parameter [type] should be 0 or 1. 0:inbox; 1:outbox.
formatintegeryesMessage parameter [format] should be 0 or 1. 0:csv; 1:xlsx.
startTimeintegeryesThe timeStamp of the message start time.
endTimeintegeryesThe timeStamp of the message end time.
simCardintegernoWhen the device supports Dual-SIM cardm parameter [simCard] should be 1 or 2. 1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "exportSmsMessage",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Export SMS message.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35404 - Device does not exist, cannot export message.
-35406 - No SMS, cannot export.
-35411 - The gateway does not support Dual-SIM standby.

getGridSmsInboxMessage ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/inbox

Get SMS inbox message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSmsInboxMessage",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get SMS inbox message.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.

getGridSimCardSmsInboxMessage ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/inbox/{simCard}

Get one of Dual-SIM card's SMS inbox message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
simCardpathstringyesSIM card. 1: SIM1; 2: SIM2.
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSimCardSmsInboxMessage",
  "params": {
    "siteId": "<siteId>",
    "simCard": "<simCard>"
  }
}
Details, permissions and error codes

Get SMS inbox message.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35411 - The gateway does not support Dual-SIM standby.

operateSmsMessage ​

POST /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/operate

Operate SMS message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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

FieldTypeRequiredDescription
typeintegeryesMessage Type. 0: inbox; 1: outbox.
operationintegeryesOperation Type. 1:delete; 2:read; 3:clear.
idsarray<integer>noMessage ID list. When parameter [operation] is 1 or 2, parameter [ids] should not be null.
simCardintegernoWhen the device supports Dual-SIM card, parameter [simCard] should not be null.1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "operateSmsMessage",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Operate SMS message.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35402 - Device does not exist, cannot send message.
-35411 - The gateway does not support Dual-SIM standby.
-44301 - Failed to get any response from the gateway.

getGridSmsOutboxMessage ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/outbox

Get SMS outbox message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSmsOutboxMessage",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get SMS outbox message.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.

getGridSimCardSmsOutboxMessage ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/outbox/{simCard}

Get one of Dual-SIM card's SMS outbox message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
simCardpathstringyesSIM card. 1: SIM1; 2: SIM2.
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getGridSimCardSmsOutboxMessage",
  "params": {
    "siteId": "<siteId>",
    "simCard": "<simCard>"
  }
}
Details, permissions and error codes

Get SMS outbox message.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.

querySmsPolicySetting ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/policy

Query SMS policy setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "querySmsPolicySetting",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Query SMS policy setting.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

modifySmsPolicySetting ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/policy

Modify SMS policy setting

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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": "modifySmsPolicySetting",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SMS policy setting.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

querySmsRouterCommand ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/router-command

Query SMS router command

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "querySmsRouterCommand",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Query SMS router command.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device 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.

modifySmsRouterCommand ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/router-command

Modify SMS router command

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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": "modifySmsRouterCommand",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify SMS router command.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device 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.

sendSmsMessage ​

POST /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/send

Send SMS message

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

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

FieldTypeRequiredDescription
callingCodestringnoCalling code should contain 2 to 5 characters. Calling code must be entered when entering the country code. For the values of Calling code, refer to section 5.4.1 of the Open API Access Guide.
receiverstringyesReceiver number.
typeintegeryesSend type. 0: formal; 1: test
contentstringnoWhen parameter [type] is 0, parameter [content] should not be null.
testSimQuotaSettingno(SimQuotaSetting not expanded; call omada_get_schema "SimQuotaSetting")
simCardintegernoWhen the device supports Dual-SIM card, parameter [simCard] shoud not be null.1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "sendSmsMessage",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Send SMS message.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35402 - Device does not exist, cannot send message.
-35411 - The gateway does not support Dual-SIM standby.
-44301 - Failed to get any response from the gateway.

getSupportSms ​

GET /openapi/v1/{omadacId}/sites/{siteId}/sim/sms/support

Get support SMS

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getSupportSms",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get SIM card whether supports SMS.
The interface requires one of the permissions:
Site Settings Manager View Only
Site Device Manager View Only

exportSmsMessageBymacV2 ​

POST /openapi/v2/{omadacId}/files/sites/{siteId}/gateways/{gatewayMac}/sim/sms/export

Export SMS message by mac V2

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
gatewayMacpathstringyesDevice MAC address, like AA-BB-CC-DD-EE-FF

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

FieldTypeRequiredDescription
typeintegeryesMessage parameter [type] should be 0 or 1. 0:inbox; 1:outbox.
formatintegeryesMessage parameter [format] should be 0 or 1. 0:csv; 1:xlsx.
startTimeintegeryesThe timeStamp of the message start time.
endTimeintegeryesThe timeStamp of the message end time.
simCardintegernoWhen the device supports Dual-SIM cardm parameter [simCard] should be 1 or 2. 1: SIM1; 2: SIM2.
json
// omada_call_operation
{
  "operationId": "exportSmsMessageBymacV2",
  "params": {
    "siteId": "<siteId>",
    "gatewayMac": "<gatewayMac>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Export SMS message by mac.
The interface requires one of the permissions:
Site Settings Manager Modify
Site Device Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33411 - Current gateway is not connected.
-35400 - The adopted gateway does not support SIM configurations.
-35404 - Device does not exist, cannot export message.
-35406 - No SMS, cannot export.
-35411 - The gateway does not support Dual-SIM standby.

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