Users API

The Users API allows you to submit user data for semantic analysis and segmentation. Users are processed asynchronously and matched against your configured segments.

Identify Users

POST https://cipres.tech/api/v1/users

Submit a batch of users with their text data. Each user will be processed and matched against all deployed segments in the associated pipeline. When users enter or exit segments, configured webhooks will fire.

Headers

Request Headers
X-API-Key required
string

Your API key for authentication.

Content-Type required
string

Must be application/json.

Request Body

Body Parameters
project_id required
integer

The project to process users for. Must belong to your tenant.

users required
array

Array of user objects to process.

users[].user_id required
string

Unique identifier for the user in your system.

users[].text required
string

The user's feedback, comment, or any text to analyze for segmentation.

users[].attributes
object

Optional key-value pairs for attribute-based segmentation (e.g., plan, country).

Example Request Body
{
  "project_id": 1,
  "users": [
    {
      "user_id": "user_123",
      "text": "The checkout process is too slow!",
      "attributes": {
        "plan": "pro",
        "country": "US"
      }
    },
    {
      "user_id": "user_456",
      "text": "Love the new dashboard feature!",
      "attributes": {
        "plan": "free"
      }
    }
  ]
}

Responses

{
  "accepted": 2,
  "source_id": 1,
  "message": "Processing in background"
}

Example Request

cURL
curl -X POST https://cipres.tech/api/v1/users \
  -H "Content-Type: application/json" \
  -H "X-API-Key: sk_a1b2c3d4..." \
  -d '{
    "project_id": 1,
    "users": [
      {
        "user_id": "user_123",
        "text": "Great product!",
        "attributes": {"plan": "pro"}
      }
    ]
  }'

Processing Behavior

  • The API returns 202 Accepted immediately — processing happens in the background
  • Users are processed concurrently for optimal performance
  • Text is analyzed using semantic embeddings to match against segment conditions
  • When a user matches or unmatches a segment, webhooks fire in real-time
  • Duplicate user_id values update the existing user record