---
updatedAt: 2026-02-27T06:35:52.000Z
agentTools:
  projectIndex: https://developers.smsedge.io/llms.txt
---

# Send a single SMS

Send a single SMS message

Usage of custom variables in text: **\{\{\{name}}}**, **\{\{\{email}}}**, **\{\{\{optout}}}**, **\{\{\{dynamic}}}**\
For example: Hello, \{\{\{name}}}! Please visit my site: <http://smsedge.io/>\
opt-out: \{\{\{optout}}}

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "smsedge-api",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.smsedge.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/sms/send-single/": {
      "post": {
        "summary": "Send a single SMS",
        "description": "Send a single SMS message",
        "operationId": "send-single",
        "parameters": [
          {
            "name": "api_key",
            "in": "query",
            "description": "Your API Key for Authorization",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "The sender of the SMS (11 characters max)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "SMS receiver phone number, in international format (f.e 12127678347 - US number)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "text",
            "in": "query",
            "description": "Text of SMS",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Value for custom name variable in text provided",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "description": "Value for custom email variable in text provided",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country_id",
            "in": "query",
            "description": "ID of country. Recommended to specify this parameter if phone number provided in local format",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "description": "Unique value per message, to prevent double submission",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shorten_url",
            "in": "query",
            "description": "If true will search for a URL (http://example.com) in the message and will shorten it so it’ll be click trackable. Will short the first URL in the text",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "list_id",
            "in": "query",
            "description": "Phone number of recipient can be added to list with this ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gender",
            "in": "query",
            "description": "Expecting values: Gender Male => [m, male, masculine, men, guy, boy, mr, mister, м, муж, мужчина, мужской, парень, мальчик, ז, זכר], Gender Female => [f, fem, female, feminine, woman, women, girl, ms, mrs, miss, mistress, ж, жен, женщина, женский, девушка, девочка, נ, נקבה]",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "birthday",
            "in": "query",
            "description": "Year-month-day",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "smart_routing",
            "in": "query",
            "description": "Specify \"1\" to sent through our smart routes",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "transactional",
            "in": "query",
            "description": "Label for transactional messages",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "preferred_route_id",
            "in": "query",
            "description": "Use this param if you want to send SMS via specific Route",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "delay",
            "in": "query",
            "description": "If you want to delay sending, set this parameter (in seconds)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": true,\n  \"data\": {\n    \"id\": 19591,\n    \"created\": \"2018-02-14 17:35:40\",\n    \"from\": \"smsapi\",\n    \"to\": 6598943560,\n    \"country_id\": 192,\n    \"country_name\": \"Singapore\",\n    \"verify_local\": 1,\n    \"shorten_url\": 1,\n    \"list_id\": 2070,\n    \"parts\": 1,\n    \"reference\": null,\n    \"clicked\": false,\n    \"text\": \"Dear John (john@test.com), please visit my page http://page.com/\",\n    \"status\": \"sent\"\n  },\n  \"errors\": [],\n  \"response\": {\n    \"code\": 200,\n    \"description\": \"OK\",\n    \"date\": \"2018-02-14 17:35:40\"\n  },\n  \"api\": {\n    \"version\": \"v1\",\n    \"module\": \"sms\",\n    \"function\": \"send-single\"\n  },\n  \"user\": {\n    \"id\": 64\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 19591,
                          "default": 0
                        },
                        "created": {
                          "type": "string",
                          "example": "2018-02-14 17:35:40"
                        },
                        "from": {
                          "type": "string",
                          "example": "smsapi"
                        },
                        "to": {
                          "type": "integer",
                          "example": 6598943560,
                          "default": 0
                        },
                        "country_id": {
                          "type": "integer",
                          "example": 192,
                          "default": 0
                        },
                        "country_name": {
                          "type": "string",
                          "example": "Singapore"
                        },
                        "verify_local": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "shorten_url": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "list_id": {
                          "type": "integer",
                          "example": 2070,
                          "default": 0
                        },
                        "parts": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "reference": {},
                        "clicked": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "text": {
                          "type": "string",
                          "example": "Dear John (john@test.com), please visit my page http://page.com/"
                        },
                        "status": {
                          "type": "string",
                          "example": "sent"
                        }
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": 200,
                          "default": 0
                        },
                        "description": {
                          "type": "string",
                          "example": "OK"
                        },
                        "date": {
                          "type": "string",
                          "example": "2018-02-14 17:35:40"
                        }
                      }
                    },
                    "api": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "string",
                          "example": "v1"
                        },
                        "module": {
                          "type": "string",
                          "example": "sms"
                        },
                        "function": {
                          "type": "string",
                          "example": "send-single"
                        }
                      }
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 64,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"data\": [],\n  \"errors\": [\n    \"Required parameter [number] is missing\"\n  ],\n  \"response\": {\n    \"code\": 400,\n    \"description\": \"Bad Request\",\n    \"date\": \"2018-02-14 17:41:30\"\n  },\n  \"api\": {\n    \"version\": \"v1\",\n    \"module\": \"sms\",\n    \"function\": \"send-single\"\n  },\n  \"user\": {\n    \"id\": 64\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "Required parameter [number] is missing"
                      }
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "description": {
                          "type": "string",
                          "example": "Bad Request"
                        },
                        "date": {
                          "type": "string",
                          "example": "2018-02-14 17:41:30"
                        }
                      }
                    },
                    "api": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "string",
                          "example": "v1"
                        },
                        "module": {
                          "type": "string",
                          "example": "sms"
                        },
                        "function": {
                          "type": "string",
                          "example": "send-single"
                        }
                      }
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 64,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"data\": [],\n  \"errors\": [\n    \"Valid API key not specified\"\n  ],\n  \"response\": {\n    \"code\": 401,\n    \"description\": \"Authentication Failure\",\n    \"date\": \"2018-02-14 17:41:03\"\n  },\n  \"api\": {\n    \"version\": \"v1\",\n    \"module\": \"sms\",\n    \"function\": \"send-single\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "Valid API key not specified"
                      }
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": 401,
                          "default": 0
                        },
                        "description": {
                          "type": "string",
                          "example": "Authentication Failure"
                        },
                        "date": {
                          "type": "string",
                          "example": "2018-02-14 17:41:03"
                        }
                      }
                    },
                    "api": {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "string",
                          "example": "v1"
                        },
                        "module": {
                          "type": "string",
                          "example": "sms"
                        },
                        "function": {
                          "type": "string",
                          "example": "send-single"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```