---
updatedAt: 2026-05-05T12:07:30.000Z
agentTools:
  projectIndex: https://developers.melroselabs.com/llms.txt
---

# Submit

Submit message.

## API Response Codes

The API returns the following HTTP status codes.

### `200 OK`

The request was accepted and processed successfully.

Example response:

```json
{
  "transactionID": "request-id",
  "messageID": [
    "message-id-1",
    "message-id-2"
  ]
}
```

### `500 Internal Server Error`

The request could not be completed. The response body includes an `error` field with a short description.

Possible error messages are:

```json
{ "error": "Missing destinations field" }
```

```json
{ "error": "Empty destinations field" }
```

```json
{ "error": "Number of destinations exceeds limit (max 100 destinations)" }
```

```json
{ "error": "Unable to connect" }
```

```json
{ "error": "Unable to bind" }
```

Notes:

* A successful API response confirms that the request was accepted by the upstream messaging system and includes the returned message identifier or identifiers.
* Provider-specific SMPP status codes are not exposed directly in the API response.
* An empty messageID field indicates that the message submission was rejected (SubmitSMResp error received).
* Invalid or incomplete request bodies may result in an error response if required fields are missing or cannot be processed.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "REST-SMPP Bridge API",
    "description": "Bridge between REST and SMPP for sending SMS.",
    "contact": {
      "name": "Melrose Labs - Technical Support",
      "email": "support@melroselabs.com"
    },
    "version": "2023-01-18T00:19:21Z"
  },
  "servers": [
    {
      "url": "https://api.melroselabs.com/{basePath}",
      "variables": {
        "basePath": {
          "default": "/restsmpp"
        }
      }
    }
  ],
  "paths": {
    "/sms": {
      "post": {
        "tags": [
          "SMS"
        ],
        "summary": "Submit",
        "description": "Submit message.",
        "requestBody": {
          "description": "SMS message submission",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitSM"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful submission response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitSMResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SubmitSMResponse": {
        "title": "SubmitSMResponse Schema",
        "type": "object",
        "properties": {
          "transactionID": {
            "type": "string"
          },
          "messageID": {
            "type": "array",
            "description": "Array of message IDs",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SubmitSM": {
        "title": "SubmitSM Schema",
        "required": [
          "destinations",
          "message",
          "smpp_account_config"
        ],
        "type": "object",
        "properties": {
          "smpp_account_config": {
            "title": "SMPP Account Config",
            "required": [
              "host",
              "password",
              "port",
              "system_id"
            ],
            "type": "object",
            "properties": {
              "host": {
                "title": "Host",
                "type": "string",
                "description": "Hostname or IP address of SMPP server (SMSC or SMS gateway)"
              },
              "port": {
                "title": "Port",
                "type": "number",
                "description": "Port number of SMPP server (SMSC or SMS gateway)",
                "default": 2775
              },
              "use_tls": {
                "title": "Use TLS",
                "type": "boolean",
                "description": "Use TLS to encrypt SMPP session",
                "default": false
              },
              "smpp_version": {
                "title": "SMPP Version",
                "type": "number",
                "description": "SMPP protocol version number (v3.3,3.4 or 5.0)",
                "enum": [
                  3.3,
                  3.4,
                  5
                ],
                "default": 3.4
              },
              "default_data_coding": {
                "title": "Default SMPP server data coding",
                "type": "string",
                "enum": [
                  "UCS2",
                  "UTF-8",
                  "GSM",
                  "ASCII",
                  "ISO8859-1",
                  "ISO8859-15"
                ],
                "default": "GSM"
              },
              "system_id": {
                "title": "System ID",
                "type": "string",
                "description": "System ID for SMPP account on SMPP server"
              },
              "password": {
                "title": "Password",
                "type": "string",
                "description": "Password for SMPP account on SMPP server"
              },
              "system_type": {
                "title": "System Type",
                "type": "string",
                "description": "System Type for SMPP account on SMPP server",
                "default": ""
              }
            }
          },
          "submit_options": {
            "title": "Submit Options",
            "type": "object",
            "properties": {
              "windowSizeSubmitSM": {
                "title": "Submit Window Size",
                "maximum": 8000,
                "minimum": 1,
                "type": "number",
                "description": "Window size for maximum number of SMS worker is awaiting response from SMPP server",
                "default": 10
              },
              "quantityBindSessions": {
                "title": "Quantity of Bind Sessions",
                "maximum": 20,
                "minimum": 1,
                "type": "number",
                "description": "Number of SMPP bind sessions from worker to SMPP server",
                "default": 1
              }
            }
          },
          "message": {
            "title": "Message",
            "required": [
              "short_message",
              "source_addr"
            ],
            "type": "object",
            "properties": {
              "service_type": {
                "title": "Service Type",
                "maxLength": 5,
                "minLength": 1,
                "type": "string",
                "default": ""
              },
              "source_addr": {
                "title": "Source Address",
                "maxLength": 20,
                "minLength": 1,
                "type": "string"
              },
              "source_addr_ton": {
                "title": "Source Address TON",
                "type": "number",
                "enum": [
                  0,
                  1,
                  2,
                  3,
                  4,
                  5,
                  6
                ],
                "default": 0
              },
              "source_addr_npi": {
                "title": "Source Address NPI",
                "type": "number",
                "enum": [
                  0,
                  1,
                  3,
                  4,
                  6,
                  8,
                  9,
                  10,
                  14,
                  18
                ],
                "default": 0
              },
              "esm_class": {
                "title": "ESM Class",
                "type": "number",
                "enum": [
                  0,
                  1,
                  2,
                  3,
                  64,
                  65,
                  66,
                  67
                ],
                "default": 0
              },
              "protocol_id": {
                "title": "Protocol ID",
                "maximum": 255,
                "minimum": 0,
                "type": "number",
                "default": 0
              },
              "priority_flag": {
                "title": "Priority Flag",
                "maximum": 255,
                "minimum": 0,
                "type": "number",
                "default": 0
              },
              "schedule_delivery_time": {
                "title": "Schedule Delivery Time",
                "type": "string",
                "default": ""
              },
              "validity_period": {
                "title": "Validity Period",
                "type": "string",
                "default": ""
              },
              "registered_delivery": {
                "title": "Registered Delivery",
                "maximum": 255,
                "minimum": 0,
                "type": "number",
                "description": "Delivery receipts requested (1) or not (0)",
                "default": 0
              },
              "replace_if_present_flag": {
                "title": "Replace if Present Flag",
                "type": "number",
                "enum": [
                  0,
                  1
                ],
                "default": 0
              },
              "data_coding": {
                "title": "Data Coding",
                "type": "number",
                "default": 0
              },
              "short_message": {
                "title": "Short Message",
                "type": "object",
                "properties": {
                  "text": {
                    "title": "Text",
                    "type": "string",
                    "description": "Text in UTF-8 is converted to default character set of SMPP server or UCS2 if better representation, and data_coding is forced to 0 or 8 for default character set or UCS2 respectively."
                  },
                  "ucs2": {
                    "title": "UCS2",
                    "type": "string",
                    "description": "Text in UTF-8 is converted to UCS2 and data_coding forced to UCS2"
                  },
                  "base64": {
                    "title": "Base64",
                    "type": "string",
                    "description": "Octets from unencoded base-64 string are mapped to short_message field of SMPP SubmitSM PDU."
                  }
                },
                "description": "Short message payload to be sent to destination mobiles"
              },
              "tlvs": {
                "title": "TLVs",
                "type": "string",
                "description": "Octets of SMPP TLVs to be added to submit_sm sent to SMPP server. Encode as Base64 string.",
                "default": ""
              }
            },
            "description": "Message to be sent to destination mobiles and the parameters related to message. Values are mapped directly to SMPP SubmitSM PDU, unless otherwise stated."
          },
          "destinations": {
            "title": "Destinations",
            "maxItems": 250000,
            "minItems": 1,
            "type": "array",
            "items": {
              "title": "Destination",
              "maxLength": 20,
              "minLength": 6,
              "type": "string",
              "description": "Mobile telephone number"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```