POST
/
configuration
/
v1
/
segments
curl --request POST \
  --url https://api.sandbox.asapp.com/configuration/v1/segments \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "id": "USER_SUPPORT",
  "name": "Support",
  "query": {
    "type": "raw",
    "raw": "TRUE"
  },
  "structuredDataFieldIds": []
}'
{
  "id": "USER_SUPPORT",
  "name": "Support",
  "query": {
    "type": "raw",
    "raw": "TRUE"
  },
  "structuredDataFieldIds": []
}

Authorizations

asapp-api-id
string
header
required
asapp-api-secret
string
header
required

Body

application/json

Segment

id
string

The id of the segment

name
string

The name of the segment

query
object

A query that defines which conversations belong to this segment based on their metadata.

structuredDataFieldIds
string[]

The ids of the structured data fields that will be used to generate the structured data for the conversation.

Response

201
application/json
Segment created.

Segment

id
string

The id of the segment

name
string

The name of the segment

query
object

A query that defines which conversations belong to this segment based on their metadata.

structuredDataFieldIds
string[]

The ids of the structured data fields that will be used to generate the structured data for the conversation.