Update a contact segment

put

/api/REST/1.0/assets/contact/segment/{id}

Updates the contact segment specified by the id parameter. All properties should be included in PUT requests, as some properties will be considered blank if not included.

Request

Supported Media Types
Path Parameters
Body ()
The request body defines the details of the contact segment to be update.
Root Schema : ContactSegment
Type: object
Title: ContactSegment
Show Source
Nested Schema : elements
Type: array
Array of contact segment elements.
Show Source
Nested Schema : SegmentElement
Type: object
Title: SegmentElement
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : ContactSegment
Type: object
Title: ContactSegment
Show Source
Nested Schema : elements
Type: array
Array of contact segment elements.
Show Source
Nested Schema : SegmentElement
Type: object
Title: SegmentElement
Show Source

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

Add an existing shared list with an id of 69 to an existing segment with an id of 7:


PUT /api/REST/1.0/assets/contact/segment/7
Content-Type: application/json 
			

Request body:


{
  "id": "7",
  "name": "Segment_Add_Shared_List_Test",
  "elements": [
    {
      "type": "ContactListSegmentElement",
      "list": {
        "type": "ContactList",
        "id": "69",
        "name": "Segment_Shared_List_Test",
        "scope": "global"
      }
    }
  ]
}
			

Response:


{
  "type": "ContactSegment",
  "currentStatus": "Draft",
  "id": "7",
  "initialId": "7",
  "createdAt": "1473654217",
  "createdBy": "11",
  "depth": "complete",
  "folderId": "312",
  "name": "Segment_Add_Shared_List_Test",
  "permissions": "fullControl",
  "updatedAt": "1473654810",
  "updatedBy": "11",
  "count": "0",
  "elements": [
    {
      "type": "ContactListSegmentElement",
      "id": "8",
      "depth": "complete",
      "count": "0",
      "isIncluded": "false",
      "lastCalculatedAt": "1473654810",
      "list": {
        "type": "ContactList",
        "id": "69",
        "initialId": "69",
        "createdAt": "1473654190",
        "createdBy": "11",
        "depth": "complete",
        "folderId": "48",
        "name": "Segment_Shared_List_Test",
        "permissions": "fullControl",
        "updatedAt": "1473654810",
        "updatedBy": "11",
        "count": "0",
        "dataLookupId": "eae3aa27-a66a-47c9-bf06-7293ba9f884a",
        "scope": "global"
      }
    }
  ],
  "lastCalculatedAt": "1473654220"
}
			
Back to Top