Update Primary MMS Route for a Phone Number

Use this endpoint to update the primary MMS route for a phone number. You must create the route first by following Create an Inbound Route. You can then assign the created route by specifying its value in a PATCH request.

Endpoint

PATCH /numbers/:id/relationships/mms_primary_route

Request Parameters

  • number_id
    string REQUIRED

    The phone number to which the primary route for MMS will be assigned. This number must be in 11-digit North American format. e.g. 12065551234.

  • type
    string REQUIRED

    Object type of the data that you are updating the phone number with. This will always be "route".

  • route_id
    string REQUIRED

    ID of the primary MMS route to be assigned to the phone number that you are updating.


Example Request

PATCH /v2.1/numbers/12013451234/relationships/mms_primary_route HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

{
  "data": {
    "type": "route",
    "id": "1234"
  }
}

                        

Example Request

PATCH /v2.1/numbers/12013451234/relationships/mms_primary_route HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

{"id": "1234"}

                        

Example Request

curl https://api.flowroute.com/v2.1/numbers/12013451234/relationships/mms_primary_route -X PATCH \
-u accessKey:secretKey -H 'Content-Type':'application/vnd.api+json' -d \
'{"type":"route", "id":"1234}' 

                        

Example Response

204 NO CONTENT

401 Unauthorized

{
  "errors": [
    {
      "detail": "Authentication failed.",
      "id": "7fc8c70a-ca58-430c-b383-b89df84f8083",
      "status": 401,
      "title": "Unauthorized"
    }
  ]
}

                

403 Forbidden

{  "errors": 
  [
    {
      "status": 403, 
      "detail": "", 
      "title": "ActionNotAuthorizedError"
    }
  ]
}