মূল কনটেন্টে যান

এপিআই রেফারেন্স

প্রতিটি পাবলিক REST অপারেশন, তার প্যারামিটার, বডি, রেসপন্স এবং যে হোস্ট এটি পরিবেশন করে সহ। স্নিপেটগুলি কপি করা যায়; এই পৃষ্ঠা থেকে কোনো অনুরোধ পাঠানো হয় না।

HostServes
https://api.prodantix.comFlags and messaging
https://eu.api.prodantix.comEvent ingestion (EU)
https://eu.replay.prodantix.comSession replay (EU)

flags

GET/v1/flagshttps://api.prodantix.com

Evaluate all flags for a user

Evaluates every flag in the project against the given distinct id and the user state currently on file.

Auth projectKey

Parameters

NameInTypeDescription
distinct_id requiredquerystringThe end-user identifier to evaluate against.

Responses

Evaluated flags

JSON
{
  "flags": "object"
}

Try it

curl -X GET "https://api.prodantix.com/v1/flags" \
  -H "Authorization: Bearer $PROJECT_KEY"
GET/v1/flags/snapshothttps://api.prodantix.com

Fetch the project's full flag ruleset

Returns the project's complete flag ruleset so an SDK can evaluate locally per distinct id. Cacheable: responses carry Cache-Control: public, max-age=30, stale-while-revalidate=300.

Auth projectKey

Responses

The full flag ruleset

JSON
{
  "flags": [
    {
      "description?": "string | null",
      "enabled": "boolean",
      "type?": "boolean | string | number | json",
      "intent?": "release | experiment | operational | kill_switch | permission | sunset",
      "key": "string",
      "rolloutPercentage": "integer",
      "targeting?": [
        {
          "attribute": "string",
          "op": "eq | neq | in | not_in | contains | gt | gte | lt | lte | is_set | is_not_set",
          "value?": "unknown"
        }
      ],
      "variations?": [
        {
          "key": "string",
          "value": "unknown",
          "weight": "integer"
        }
      ]
    }
  ],
  "generatedAt": "string"
}

Try it

curl -X GET "https://api.prodantix.com/v1/flags/snapshot" \
  -H "Authorization: Bearer $PROJECT_KEY"

messaging

GET/v1/messageshttps://api.prodantix.com

Read a user's in-app inbox

Returns the in-app messages targeting an end-user.

Auth projectKey

Parameters

NameInTypeDescription
distinct_id requiredquerystringThe end-user identifier whose inbox to read.

Responses

The user's in-app messages

JSON
{
  "messages": [
    {
      "id": "string",
      "title": "string",
      "body": "string",
      "read": "boolean",
      "createdAt": "unknown"
    }
  ]
}

Try it

curl -X GET "https://api.prodantix.com/v1/messages" \
  -H "Authorization: Bearer $PROJECT_KEY"
POST/v1/messages/readhttps://api.prodantix.com

Mark an in-app message read

Marks one in-app message read for an end-user.

Auth projectKey

Body

JSON
{
  "message_id": "string",
  "distinct_id": "string"
}

Responses

The message was marked read

JSON
{
  "ok": "boolean"
}

Try it

curl -X POST "https://api.prodantix.com/v1/messages/read" \
  -H "Authorization: Bearer $PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message_id":"string","distinct_id":"string"}'

conversations

POST/v1/conversationshttps://api.prodantix.com

Open a support conversation

Opens a new conversation and returns a token scoped to it. The token is the only credential that authorizes reading or appending to the thread, and it is returned exactly once. Rate-limited per project key and per client IP.

Auth projectKey

Body

JSON
{
  "distinctId": "string",
  "subject?": "string | null"
}

Responses

The conversation and its token

JSON
{
  "conversationId": "string",
  "token": "string",
  "expiresInSeconds": "integer"
}

Try it

curl -X POST "https://api.prodantix.com/v1/conversations" \
  -H "Authorization: Bearer $PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"distinctId":"string","subject":"string"}'
POST/v1/conversations/{id}/turnshttps://api.prodantix.com

Append a message to a conversation

Appends an end-user turn. Requires the conversation token in the X-Prodantix-Conversation-Token header; the token is scoped to one conversation.

Auth projectKey

Parameters

NameInTypeDescription
id requiredpathstringThe conversation the token was minted for.

Body

JSON
{
  "body": "string"
}

Responses

The appended turn

JSON
{
  "turn": {
    "id": "string",
    "authorKind": "string",
    "authorId?": "string | null",
    "body": "string",
    "createdAt": "string"
  }
}

Try it

curl -X POST "https://api.prodantix.com/v1/conversations/:id/turns" \
  -H "Authorization: Bearer $PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"string"}'
GET/v1/conversations/{id}https://api.prodantix.com

Read a conversation thread

Returns the conversation and its turns. Requires the conversation token in the X-Prodantix-Conversation-Token header.

Auth projectKey

Parameters

NameInTypeDescription
id requiredpathstringThe conversation the token was minted for.

Responses

The conversation thread

JSON
{
  "id": "string",
  "distinctId": "string",
  "subject?": "string | null",
  "status": "string",
  "lastTurnAt": "string",
  "createdAt": "string",
  "turns": [
    {
      "id": "string",
      "authorKind": "string",
      "authorId?": "string | null",
      "body": "string",
      "createdAt": "string"
    }
  ]
}

Try it

curl -X GET "https://api.prodantix.com/v1/conversations/:id" \
  -H "Authorization: Bearer $PROJECT_KEY"

events

POST/v1/eventshttps://eu.api.prodantix.com

Ingest a batch of events

Accepts a batch of analytics events. A 202 means accepted for processing, not persisted.

Auth projectKey

Body

JSON
{
  "api_key?": "string | null",
  "events": [
    {
      "context?": {
        "locale?": "string | null",
        "os?": "string | null",
        "sdk?": "string | null",
        "sdk_version?": "string | null"
      },
      "distinct_id": "string",
      "event_id": "string",
      "event_name": "string",
      "properties?": "object",
      "schema_version": "integer",
      "session_id?": "string | null",
      "timestamp": "string"
    }
  ],
  "sent_at": "string"
}

Responses

Accepted for processing

JSON
{
  "accepted": "integer"
}

Try it

curl -X POST "https://eu.api.prodantix.com/v1/events" \
  -H "Authorization: Bearer $PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"string","events":[],"sent_at":"string"}'
POST/v1/identifyhttps://eu.api.prodantix.com

Identify a user

Associates traits with a distinct id. A 202 means accepted for processing, not persisted.

Auth projectKey

Body

JSON
{
  "distinct_id?": "string | null",
  "event_id?": "string | null",
  "properties?": "object | null",
  "timestamp?": "string | null"
}

Responses

Accepted for processing

JSON
{
  "accepted": "integer"
}

Try it

curl -X POST "https://eu.api.prodantix.com/v1/identify" \
  -H "Authorization: Bearer $PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"distinct_id":"string","event_id":"string","properties":{},"timestamp":"string"}'
POST/v1/grouphttps://eu.api.prodantix.com

Associate a user with a group

Associates a distinct id with a group and its traits. A 202 means accepted for processing, not persisted.

Auth projectKey

Body

JSON
{
  "distinct_id?": "string | null",
  "event_id?": "string | null",
  "properties?": "object | null",
  "timestamp?": "string | null"
}

Responses

Accepted for processing

JSON
{
  "accepted": "integer"
}

Try it

curl -X POST "https://eu.api.prodantix.com/v1/group" \
  -H "Authorization: Bearer $PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"distinct_id":"string","event_id":"string","properties":{},"timestamp":"string"}'

replay

POST/v1/replayhttps://eu.replay.prodantix.com

Upload a session replay chunk

Uploads one chunk of a recorded session. Chunks are ordered by seq within a session_id. Both responses are empty-bodied.

Auth projectKey

Body

JSON
{
  "distinct_id": "string",
  "events": [],
  "masked": "boolean",
  "schema_version": "integer",
  "sdk?": "string | null",
  "seq": "integer",
  "session_id": "string",
  "timestamp": "string"
}

Responses

Chunk accepted

Try it

curl -X POST "https://eu.replay.prodantix.com/v1/replay" \
  -H "Authorization: Bearer $PROJECT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"distinct_id":"string","events":[],"masked":true,"schema_version":0,"sdk":"string","seq":0,"session_id":"string","timestamp":"string"}'