Update a Pending CNAM Record

Updates an existing pending CNAM record. Please see Create a New CNAM Record to review the CNAM Storage Rules.

Endpoint

PATCH /cnams/:id

Path Parameter

  • id
    integer required

    The record id of the pending CNAM record to update.

Body Parameters

  • data
    required

    Data object composed of the following:

    • type
      required

      This will always be cnam.

    • attributes
      required

      Object composed of the following CNAM attributes:

      • value

        Unique CNAM value.

Response Fields

On success, the HTTP status code in the response header is 200 OK and the response body contains a CNAM object in JSON format. On error, the header status code is an error code and the response body contains an array of error objects.

  • data
    object

    CNAM object composed of the following:

    • attributes
      object

      Object composed of attributes described above.

    • id
      integer

      ID of the CNAM object.

    • links
      object

      Links object pointing to the CNAM's URI. For example, https://api.flowroute.com/v2/cnams/98396.

    • type
      string

      This will always be cnam.

  • links
    object

    Links object pointing to your newly created CNAM. For example, https://api.flowroute.com/v2/cnams/98396.

Example Request

PATCH /v2/cnams/33443 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

{
  "data": {
    "type": "cnam",
    "attributes": {
      "value": "MY BUSINESS",
    }
  }
}

                        

Example Request

curl https://api.flowroute.com/v2/cnams/33453 -X PATCH -u accessKey:secretKey \
 -d '{"data": {"type":"cnam", "attributes": {"value": "MY BUSINESS"}}}' \
-H 'Content-Type':'application/vnd+api.json'

                        

Example Responses

200 OK


{
  "data": {
    "attributes": {
      "value": "MY BUSINESS",
    },
    "id": "33443",
    "links": {
      "self": "https://api.flowroute.com/cnams/33443"
    },
    "type": "cnam"
  },
  "links": {
    "self": "https://api.flowroute.com/cnams/33443"
  }
}

            

422 UNPROCESSABLE ENTITY

{
  "errors": [
    {
      "title": "Unprocessable Entity",
      "detail": "Editing a non-pending CNAM is not allowed.",
      "id": "f3a378a2-60ac-42d6-8915-bbd5cf2229bf",
      "status": 422
    }
  ]
}