Inbound routing soon

Get a list of SMS inbound routes

If you want to retrieve information about multiple SMS inbound routes, use this GET request:

GET https://api.mailersend.com/v1/sms-inbounds
1

Request parameters

URL parameterTypeRequiredLimitationsDetails
sms_number_idstringno
enabledbooleanno
pageintno
limitintnoMin: 10, Max: 100Default: 25

Responses

Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
1
2
3
{
  "data": [
    {
      "id": "7z3m5jgrogdpyo6n",
      "name": "Inbound",
      "filter": {
        "value": "START",
        "comparer": "equal"
      },
      "forward_url": "https://yourapp.com/hook",
      "enabled": true,
      "secret": "jYhafGtTiZgw0qWxlkUA7cbqTG3Zfh2j",
      "created_at": "2022-01-01T12:00:00.000000Z"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Error

Response Code: 404 Not Found
1

Get a single SMS inbound route

If you want to retrieve a single SMS inbound route, use this GET request:

GET https://api.mailersend.com/v1/sms-inbounds/{sms_inbound_id}
1

Request parameters

URL parameterTypeRequiredLimitationsDetails
sms_inbound_idstringyes

Responses

Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
1
2
3
{
  "data": {
    "id": "7z3m5jgrogdpyo6n",
    "name": "Inbound",
    "filter": {
      "value": "START",
      "comparer": "equal"
    },
    "forward_url": "https://yourapp.com/hook",
    "enabled": true,
    "secret": "jYhafGtTiZgw0qWxlkUA7cbqTG3Zfh2j",
    "created_at": "2022-01-13T12:00:00.000000Z",
    "sms_number": {
      "id": "7z3m5jgrogdpyo6n",
      "telephone_number": "+19199876543",
      "paused": false,
      "created_at": "2022-01-13T12:00:00.000000Z"
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Error

Response Code: 404 Not Found
1

Add an SMS inbound route

If you want to add a new SMS inbound route to a domain, use this POST request:

POST https://api.mailersend.com/v1/sms-inbounds
1

Request body

{
  "sms_number_id": "7z3m5jgrogdpyo6n",
  "name": "Inbound",
  "forward_url": "https://yourapp.com/hook",
  "filter": {
    "comparer": "equal",
    "value": "START"
  },
  "enabled": true
}
1
2
3
4
5
6
7
8
9
10

Request Parameters

JSON parameters are provided in dot notation

JSON ParameterTypeRequiredLimitationsDetails
sms_number_idstringYes
namestringYesMax 191 characters.
forward_urlstringYesMax 255 characters.
filterobjectNo
filter.comparerstringYes*Must be one of the comparers: equal, not-equal, contains, not-contains, starts-with, ends-with, not-starts-with, not-ends-with.
filter.valuestringYes*Max 255 characters.
enabledbooleanNo
* Required if filter is added.

Responses

Response KeyTypeDetails
dataobjectSMS Inbound object created.

Valid

Response Code: 201 CREATED
Response Headers:
	Content-Type: application/json
1
2
3
{
  "data": {
    "id": "7z3m5jgrogdpyo6n",
    "name": "Inbound",
    "filter": {
      "value": "START",
      "comparer": "equal"
    },
    "forward_url": "https://yourapp.com/hook",
    "enabled": true,
    "secret": "jYhafGtTiZgw0qWxlkUA7cbqTG3Zfh2j",
    "created_at": "2022-01-01T12:00:00.000000Z"
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Invalid

Response Code: 422 Unprocessable Entity
1

See - Validation errors

Update an inbound route

If you want to update the information of an existing inbound route, use this PUT request:

PUT https://api.mailersend.com/v1/sms-inbounds/{sms_inbound_id}
1

Request body

{
  "sms_number_id": "7z3m5jgrogdpyo6n",
  "name": "Inbound",
  "forward_url": "https://yourapp.com/hook",
  "filter": {
    "comparer": "equal",
    "value": "START"
  },
  "enabled": true
}
1
2
3
4
5
6
7
8
9
10

Request Parameters

URL parameterTypeRequiredLimitationsDetails
sms_inbound_idstringyes

JSON parameters are provided in dot notation

JSON ParameterTypeRequiredLimitationsDetails
sms_number_idstringNo
namestringNoMax 191 characters.
forward_urlstringNoMax 255 characters.
filterobjectNo
filter.comparerstringYes*Must be one of the comparers: equal, not-equal, contains, not-contains, starts-with, ends-with, not-starts-with, not-ends-with.
filter.valuestringYes*Max 255 characters.
enabledbooleanNo
* Required if inbound is not enabled.

Responses

Response KeyTypeDetails
dataobjectSMS Inbound object created.

Valid

Response Code: 200 OK
Response Headers:
	Content-Type: application/json
1
2
3
{
  "data": {
    "id": "7z3m5jgrogdpyo6n",
    "name": "Inbound",
    "filter": {
      "value": "START",
      "comparer": "equal"
    },
    "forward_url": "https://yourapp.com/hook",
    "enabled": true,
    "secret": "jYhafGtTiZgw0qWxlkUA7cbqTG3Zfh2j",
    "created_at": "2022-01-01T12:00:00.000000Z"
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Invalid

Response Code: 422 Unprocessable Entity
1

See - Validation errors

Delete an SMS inbound route

If you want to delete an SMS inbound route, use this DELETE request:

DELETE https://api.mailersend.com/v1/sms-inbounds/{sms_inbound_id}
1

Request parameters

URL parameterTypeRequiredLimitationsDetails
sms_inbound_idstringyes

Responses

Valid

Response Code: 200 OK
1

Error

Response Code: 404 Not Found
1
Last Updated: