ContactsContact Lists

Create Contact List

Create a dynamic contact list with filter-based segmentation.

Create a contact list with filter criteria. Contacts matching the filters are automatically included.

Required: Contacts > Write

POST
/createContactList

Authorization

bearerToken

AuthorizationBearer <token>

API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.

In: header

Request Body

application/json

project_uid*string

Your project's unique identifier.

name*string

List name.

filter_by*object

Filter configuration with nested conditions.

icon?string

Optional icon identifier.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.yourgpt.ai/chatbot/v1/createContactList" \  -H "Content-Type: application/json" \  -d '{    "project_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "name": "US Customers",    "filter_by": {      "operator": "AND",      "conditions": [        {          "operator": "AND",          "conditions": [            {              "model": "CONTACTS",              "key": "country",              "operator": "eq",              "value": "US"            }          ]        }      ]    }  }'
{
  "type": "RXSUCCESS",
  "data": {
    "id": 35,
    "name": "Active Users",
    "project_id": 12345,
    "filter_by": {
      "operator": "and",
      "conditions": []
    },
    "icon": null,
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}
{
  "type": "RXERROR",
  "message": "Invalid params"
}
{
  "type": "RXERROR",
  "message": "Invalid or revoked API token"
}
{
  "type": "RXERROR",
  "message": "You do not have permission to perform this action"
}