Create a contact segment
post
/api/REST/1.0/assets/contact/segment
Creates a contact segment that matches the criteria specified by the request body.
Request
Supported Media Types
- application/json
The request body defines the details of the contact segment to be created.
Root Schema : ContactSegment
Type:
object
Title:
Show Source
ContactSegment
-
count:
string
The number of contacts in the contact segment. This is a read-only property.
-
createdAt:
string
Read Only:
true
The date and time the contact segment was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the contact segment. -
currentStatus:
string
The contact segment's current status. This is a read-only property.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
The description of the contact segment.
-
elements:
array elements
Array of contact segment elements.
-
id:
string
Read Only:
true
Id of the contact segment. This is a read-only property. -
lastCalculatedAt:
string
The date and time of the most recent calculation. This is a read-only property.
-
name:
string
The contact segment's name.
-
permissions:
string
The permissions for the contact segment granted to your current instance. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the contact segment was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the contact segment.
Nested Schema : elements
Type:
array
Array of contact segment elements.
Show Source
-
Array of:
object SegmentElement
Title:
SegmentElement
Nested Schema : SegmentElement
Type:
object
Title:
Show Source
SegmentElement
-
count:
string
The number of contacts in the contact segment element. This is a read-only property.
-
createdAt:
string
Read Only:
true
The date and time the contact segment element was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the contact segment element. -
currentStatus:
string
The contact segment element's current status. This is a read-only property.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
The description of the contact segment element.
-
id:
string
Read Only:
true
Id of the contact segment element. This is a read-only property. -
isIncluded:
string
The total amount of contacts within the segment element.
-
lastCalculatedAt:
string
The date and time the contact segment element was last calculated. This is a read-only property.
-
name:
string
The name of the contact segment element. This is a read-only property.
-
permissions:
string
The permissions for the contact segment element granted to your current instance. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the contact segment element was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the contact segment element.
Response
Supported Media Types
- application/json
201 Response
Success
Root Schema : ContactSegment
Type:
object
Title:
Show Source
ContactSegment
-
count:
string
The number of contacts in the contact segment. This is a read-only property.
-
createdAt:
string
Read Only:
true
The date and time the contact segment was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the contact segment. -
currentStatus:
string
The contact segment's current status. This is a read-only property.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
The description of the contact segment.
-
elements:
array elements
Array of contact segment elements.
-
id:
string
Read Only:
true
Id of the contact segment. This is a read-only property. -
lastCalculatedAt:
string
The date and time of the most recent calculation. This is a read-only property.
-
name:
string
The contact segment's name.
-
permissions:
string
The permissions for the contact segment granted to your current instance. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the contact segment was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the contact segment.
Nested Schema : elements
Type:
array
Array of contact segment elements.
Show Source
-
Array of:
object SegmentElement
Title:
SegmentElement
Nested Schema : SegmentElement
Type:
object
Title:
Show Source
SegmentElement
-
count:
string
The number of contacts in the contact segment element. This is a read-only property.
-
createdAt:
string
Read Only:
true
The date and time the contact segment element was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the contact segment element. -
currentStatus:
string
The contact segment element's current status. This is a read-only property.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
The description of the contact segment element.
-
id:
string
Read Only:
true
Id of the contact segment element. This is a read-only property. -
isIncluded:
string
The total amount of contacts within the segment element.
-
lastCalculatedAt:
string
The date and time the contact segment element was last calculated. This is a read-only property.
-
name:
string
The name of the contact segment element. This is a read-only property.
-
permissions:
string
The permissions for the contact segment element granted to your current instance. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the contact segment element was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the contact segment element.
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.
Examples
Create a new contact segment:
POST /api/REST/1.0/assets/contact/segment
Content-Type: application/json
Request body:
{
"name":"New Contact Segment"
}
Response:
{
"type":"ContactSegment",
"currentStatus":"Draft",
"id":"5",
"createdAt":"1434984347",
"createdBy":"19",
"depth":"complete",
"folderId":"312",
"name":"New Contact Segment",
"permissions":"fullControl",
"updatedAt":"1434984347",
"updatedBy":"19",
"elements":[]
}