본문으로 건너뛰기

API 레퍼런스

모든 공개 REST 오퍼레이션을 매개변수, 본문, 응답, 이를 제공하는 호스트와 함께 제공합니다. 스니펫은 복사할 수 있으며, 이 페이지에서 요청이 전송되지는 않습니다.

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

billing

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

List the plan catalogue

Every prodantix plan with its entitlements and prices: the ladder the pricing page and the plan picker render. Public, and cacheable for five minutes.

Auth public

Responses

The plan catalogue

JSON
{
  "plans": [
    {
      "tier": "string",
      "cycle": "string",
      "trialDays": "integer",
      "priced": "boolean",
      "entitlements": "unknown"
    }
  ]
}

Try it

curl -X GET "https://api.prodantix.com/v1/plans"
GET/v1/ai/modelshttps://api.prodantix.com

List the AI models and their prices

Every model a workspace can pick for the AI add-on, with its price per million tokens of each kind in micro-dollars: the model's price plus the markup. Public, and cacheable for an hour.

Auth public

Responses

The offered models and their prices

JSON
{
  "markupPercent": "integer",
  "models": [
    {
      "id": "string",
      "displayName": "string",
      "perMillion": {
        "input": "integer",
        "output": "integer",
        "cacheWrite5m": "integer",
        "cacheWrite1h": "integer",
        "cacheRead": "integer"
      }
    }
  ]
}

Try it

curl -X GET "https://api.prodantix.com/v1/ai/models"

analytics

GET/v1/projects/{projectId}/annotationshttps://api.prodantix.com

List annotations

The project's annotations whose days overlap from to to, both YYYY-MM-DD and inclusive. Name a report to add that report's own annotations to the project's.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the annotations belong to
reportIdquerystringA report whose own annotations are wanted too
from requiredquerystringThe first day, YYYY-MM-DD
to requiredquerystringThe last day, YYYY-MM-DD

Responses

The annotations, earliest first

JSON
{
  "annotations": [
    {
      "id": "string",
      "reportId?": "string | null",
      "startsOn": "string",
      "endsOn": "string",
      "text": "string",
      "tags": [],
      "createdByName?": "string | null",
      "createdAt": "string",
      "updatedAt": "string",
      "canChange": "boolean"
    }
  ]
}

Try it

curl -X GET "https://api.prodantix.com/v1/projects/:projectId/annotations" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/projects/{projectId}/annotationshttps://api.prodantix.com

Add an annotation

Marks a day, or a range when endsOn is given, with a note of up to 200 characters and one to ten tags. With reportId it shows on that report only; without, on every chart in the project whose dates cover it.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the annotations belong to

Body

JSON
{
  "reportId?": "string | null",
  "startsOn": "string",
  "endsOn?": "string | null",
  "text": "string",
  "tags": []
}

Responses

The annotation as stored

JSON
{
  "id": "string",
  "reportId?": "string | null",
  "startsOn": "string",
  "endsOn": "string",
  "text": "string",
  "tags": [],
  "createdByName?": "string | null",
  "createdAt": "string",
  "updatedAt": "string",
  "canChange": "boolean"
}

Try it

curl -X POST "https://api.prodantix.com/v1/projects/:projectId/annotations" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"reportId":"string","startsOn":"string","endsOn":"string","text":"string","tags":[]}'
PATCH/v1/projects/{projectId}/annotations/{annotationId}https://api.prodantix.com

Change an annotation

Replaces an annotation's days, text, tags and where it shows. Open to its author and to holders of prodantix.annotations.write.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the annotations belong to
annotationId requiredpathstringThe annotation

Body

JSON
{
  "reportId?": "string | null",
  "startsOn": "string",
  "endsOn?": "string | null",
  "text": "string",
  "tags": []
}

Responses

The annotation as stored

JSON
{
  "id": "string",
  "reportId?": "string | null",
  "startsOn": "string",
  "endsOn": "string",
  "text": "string",
  "tags": [],
  "createdByName?": "string | null",
  "createdAt": "string",
  "updatedAt": "string",
  "canChange": "boolean"
}

Try it

curl -X PATCH "https://api.prodantix.com/v1/projects/:projectId/annotations/:annotationId" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"reportId":"string","startsOn":"string","endsOn":"string","text":"string","tags":[]}'
DELETE/v1/projects/{projectId}/annotations/{annotationId}https://api.prodantix.com

Delete an annotation

Removes an annotation from every chart it shows on. Open to its author and to holders of prodantix.annotations.write.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the annotations belong to
annotationId requiredpathstringThe annotation

Responses

Deleted

Try it

curl -X DELETE "https://api.prodantix.com/v1/projects/:projectId/annotations/:annotationId" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/projects/{projectId}/reports/{reportId}/public-linkhttps://api.prodantix.com

The report's public link while it is on: its address, the day it stops and when its report last ran. Answers 404 when no link is on.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
reportId requiredpathstringThe saved report

Responses

Try it

curl -X GET "https://api.prodantix.com/v1/projects/:projectId/reports/:reportId/public-link" \
  -H "Authorization: Bearer $BEARER_AUTH"
PUT/v1/projects/{projectId}/reports/{reportId}/public-linkhttps://api.prodantix.com

Turns the link on until expiresOn, a YYYY-MM-DD day after today and at most 90 days ahead, or moves the stop day of the link that is on; the link stops as that day begins, in UTC. Anyone with the address can then read the report's last run, without its cohort. Every run of the report refreshes what the link shows.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
reportId requiredpathstringThe saved report

Body

JSON
{
  "expiresOn": "string"
}

Responses

Try it

curl -X PUT "https://api.prodantix.com/v1/projects/:projectId/reports/:reportId/public-link" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"expiresOn":"string"}'
DELETE/v1/projects/{projectId}/reports/{reportId}/public-linkhttps://api.prodantix.com

Ends the link at once; its address answers 404 from then on.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
reportId requiredpathstringThe saved report

Responses

Try it

curl -X DELETE "https://api.prodantix.com/v1/projects/:projectId/reports/:reportId/public-link" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/projects/{projectId}/reports/{reportId}/shareshttps://api.prodantix.com

Send a report to teammates

Sends the report to between 1 and 20 members of the company, with an optional note of up to 1000 characters, by email and push. link is the console address the message opens, and must open this report; language is the sender's console language, which the email and push are written in.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
reportId requiredpathstringThe saved report

Body

JSON
{
  "recipients": [],
  "note?": "string | null",
  "link": "string",
  "language": "string"
}

Responses

How many teammates it was sent to

JSON
{
  "sent": "integer"
}

Try it

curl -X POST "https://api.prodantix.com/v1/projects/:projectId/reports/:reportId/shares" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"recipients":[],"note":"string","link":"string","language":"string"}'
GET/v1/shared-reports/{token}https://api.prodantix.com

Read a shared report

The report behind a public link, as it was last run. Needs no credential. Answers 404 alike for a link that was turned off, has stopped or never existed, and 429 past 60 reads a minute of one link or 30 from one address.

Auth public

Parameters

NameInTypeDescription
token requiredpathstringThe link's token, from its address

Responses

The report as last run

JSON
{
  "report": "unknown"
}

Try it

curl -X GET "https://api.prodantix.com/v1/shared-reports/:token"
GET/v1/projects/{projectId}/reports/{reportId}/comment-threadshttps://api.prodantix.com

List a report's comment threads

Every thread on the report, earliest first, each with its comments in order. A deleted comment keeps its place with no words, mentions or reactions.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
reportId requiredpathstringThe saved report

Responses

The threads

JSON
{
  "threads": [
    {
      "id": "string",
      "reportId": "string",
      "anchor?": {
        "metric?": "string | null",
        "bucket?": "string | null",
        "breakdown?": [],
        "step?": "integer | null",
        "event?": "string | null",
        "cohortBucket?": "string | null",
        "period?": "integer | null",
        "daysActive?": "integer | null",
        "state?": "string | null"
      },
      "resolved": "boolean",
      "resolvedAt?": "string | null",
      "resolvedBySub?": "string | null",
      "createdBySub": "string",
      "createdAt": "string",
      "comments": [
        {
          "id": "string",
          "threadId": "string",
          "body?": "string | null",
          "mentions": [],
          "authorSub": "string",
          "authorName?": "string | null",
          "createdAt": "string",
          "editedAt?": "string | null",
          "deleted": "boolean",
          "canChange": "boolean",
          "reactions": [
            {
              "emoji": "string",
              "count": "integer",
              "reactedByMe": "boolean"
            }
          ]
        }
      ]
    }
  ]
}

Try it

curl -X GET "https://api.prodantix.com/v1/projects/:projectId/reports/:reportId/comment-threads" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/projects/{projectId}/reports/{reportId}/comment-threadshttps://api.prodantix.com

Start a comment thread

Starts a thread on the whole report, or on one point of it when anchor names the point. The body is 1 to 10,000 characters; mentions name up to 20 members of the company.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
reportId requiredpathstringThe saved report

Body

JSON
{
  "body": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "mentions?": []
}

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X POST "https://api.prodantix.com/v1/projects/:projectId/reports/:reportId/comment-threads" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"body":"string","anchor":"string","mentions":[]}'
POST/v1/projects/{projectId}/comment-threads/{threadId}/commentshttps://api.prodantix.com

Reply to a comment thread

Adds a comment to the thread. A thread whose first comment was deleted takes no replies.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
threadId requiredpathstringThe comment thread

Body

JSON
{
  "body": "string",
  "mentions?": []
}

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X POST "https://api.prodantix.com/v1/projects/:projectId/comment-threads/:threadId/comments" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"body":"string","mentions":[]}'
PATCH/v1/projects/{projectId}/comments/{commentId}https://api.prodantix.com

Change a comment

Replaces the comment's words and mentions. Open to its author only.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
commentId requiredpathstringThe comment

Body

JSON
{
  "body": "string",
  "mentions?": []
}

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X PATCH "https://api.prodantix.com/v1/projects/:projectId/comments/:commentId" \
  -H "Authorization: Bearer $BEARER_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"body":"string","mentions":[]}'
DELETE/v1/projects/{projectId}/comments/{commentId}https://api.prodantix.com

Delete a comment

Takes the comment's words back; the thread keeps its place for it. Open to its author only.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
commentId requiredpathstringThe comment

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X DELETE "https://api.prodantix.com/v1/projects/:projectId/comments/:commentId" \
  -H "Authorization: Bearer $BEARER_AUTH"
PUT/v1/projects/{projectId}/comment-threads/{threadId}/resolutionhttps://api.prodantix.com

Resolve a comment thread

Marks the thread resolved by the caller. Resolving a resolved thread changes nothing.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
threadId requiredpathstringThe comment thread

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X PUT "https://api.prodantix.com/v1/projects/:projectId/comment-threads/:threadId/resolution" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/projects/{projectId}/comment-threads/{threadId}/resolutionhttps://api.prodantix.com

Reopen a comment thread

Opens a resolved thread again.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
threadId requiredpathstringThe comment thread

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X DELETE "https://api.prodantix.com/v1/projects/:projectId/comment-threads/:threadId/resolution" \
  -H "Authorization: Bearer $BEARER_AUTH"
PUT/v1/projects/{projectId}/comments/{commentId}/reactions/{emoji}https://api.prodantix.com

React to a comment

Adds the caller's reaction. Each person reacts with each emoji once.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
commentId requiredpathstringThe comment
emoji requiredpathstringOne of the six reactions, percent-encoded: 👍 ❤️ 🎯 🎉 🤔 👀

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X PUT "https://api.prodantix.com/v1/projects/:projectId/comments/:commentId/reactions/:emoji" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/projects/{projectId}/comments/{commentId}/reactions/{emoji}https://api.prodantix.com

Take back a reaction

Removes the caller's reaction.

Auth bearerAuth

Parameters

NameInTypeDescription
projectId requiredpathstringThe project the report belongs to
commentId requiredpathstringThe comment
emoji requiredpathstringOne of the six reactions, percent-encoded: 👍 ❤️ 🎯 🎉 🤔 👀

Responses

The thread as it now stands

JSON
{
  "id": "string",
  "reportId": "string",
  "anchor?": {
    "metric?": "string | null",
    "bucket?": "string | null",
    "breakdown?": [],
    "step?": "integer | null",
    "event?": "string | null",
    "cohortBucket?": "string | null",
    "period?": "integer | null",
    "daysActive?": "integer | null",
    "state?": "string | null"
  },
  "resolved": "boolean",
  "resolvedAt?": "string | null",
  "resolvedBySub?": "string | null",
  "createdBySub": "string",
  "createdAt": "string",
  "comments": [
    {
      "id": "string",
      "threadId": "string",
      "body?": "string | null",
      "mentions": [],
      "authorSub": "string",
      "authorName?": "string | null",
      "createdAt": "string",
      "editedAt?": "string | null",
      "deleted": "boolean",
      "canChange": "boolean",
      "reactions": [
        {
          "emoji": "string",
          "count": "integer",
          "reactedByMe": "boolean"
        }
      ]
    }
  ]
}

Try it

curl -X DELETE "https://api.prodantix.com/v1/projects/:projectId/comments/:commentId/reactions/:emoji" \
  -H "Authorization: Bearer $BEARER_AUTH"

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",
  "userId?": "string | null",
  "userHash?": "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","userId":"string","userHash":"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. attachmentIds names up to three files uploaded to this conversation and not yet sent; the body may be empty when the turn carries one.

Auth projectKey

Parameters

NameInTypeDescription
id requiredpathstringThe conversation the token was minted for.

Body

JSON
{
  "body": "string",
  "pageContext?": {
    "host": "string",
    "path": "string",
    "title": "string"
  },
  "attachmentIds?": []
}

Responses

The appended turn

JSON
{
  "turn": {
    "id": "string",
    "authorKind": "string",
    "authorId?": "string | null",
    "body": "string",
    "createdAt": "string",
    "authorName?": "string | null",
    "authorAvatarUrl?": "string | null",
    "attachments": [
      {
        "id": "string",
        "name": "string",
        "contentType": "string",
        "bytes": "integer",
        "url": "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","pageContext":"string","attachmentIds":[]}'
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",
      "authorName?": "string | null",
      "authorAvatarUrl?": "string | null",
      "attachments": [
        {
          "id": "string",
          "name": "string",
          "contentType": "string",
          "bytes": "integer",
          "url": "string"
        }
      ]
    }
  ]
}

Try it

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

Upload a file to a conversation

Stores a file the visitor will send with their next message. The request body is the file's raw bytes, at most 500,000, and must be a PNG, JPEG, WebP, GIF or PDF; the bytes decide the type, never the Content-Type header. Requires the conversation token in the X-Prodantix-Conversation-Token header, and a project that lets visitors send files.

Auth projectKey

Parameters

NameInTypeDescription
id requiredpathstringThe conversation the token was minted for.
namequerystringThe file's name as the visitor chose it, shown to the team. Up to 200 characters; `file` when absent.

Responses

The stored file, ready to send with a turn

JSON
{
  "id": "string",
  "name": "string",
  "contentType": "string",
  "bytes": "integer"
}

Try it

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

Read a file sent in a conversation

Answers the file's bytes with the type it was stored as: a PDF as a download, an image to show in place, never sniffed and never cached by a shared cache. Requires the conversation token in the X-Prodantix-Conversation-Token header; a file of another conversation is not found.

Auth projectKey

Parameters

NameInTypeDescription
id requiredpathstringThe conversation the token was minted for.
attachmentId requiredpathstringThe file, as a turn's attachments name it.

Responses

The file's bytes

Try it

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

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",
  "variants": "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 | in_cohort | not_in_cohort",
          "value?": "unknown"
        }
      ],
      "variations?": [
        {
          "key": "string",
          "value": "unknown",
          "weight": "integer"
        }
      ],
      "prerequisites?": [
        {
          "flagKey": "string",
          "variationKey": "string"
        }
      ]
    }
  ],
  "generatedAt": "string",
  "socketUrl": "string"
}

Try it

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

Read a user's cohort memberships for local flag evaluation

Returns the ids of the cohorts the distinct id currently belongs to, so an SDK evaluating the snapshot locally can resolve cohort conditions against the same membership store the server uses.

Auth projectKey

Parameters

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

Responses

The cohort ids

JSON
{
  "cohorts": []
}

Try it

curl -X GET "https://api.prodantix.com/v1/flags/memberships" \
  -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"}'

messenger

GET/v1/messenger/confighttps://api.prodantix.com

Read a project's messenger configuration

Returns the messenger's appearance, greeting and availability for the project the key belongs to, resolved for one locale. A project that has never been configured and one deliberately switched off both answer `{ "enabled": false }`; neither is a 404, because a 404 cannot be told apart from a wrong key.

Auth projectKey

Parameters

NameInTypeDescription
localequerystringBCP 47 language tags to resolve copy for, comma separated and in the visitor's own order of preference, as `Accept-Language` lists them. Each tag is tried exactly, then its primary subtag, then the project's own default language, then English.

Responses

The messenger configuration, or a disabled marker

JSON
{
  "enabled": "boolean",
  "launcherPosition": "string",
  "launcherOffsetX": "integer",
  "launcherOffsetY": "integer",
  "accentColor": "string",
  "greeting": "string",
  "awayMessage": "string",
  "availability": "unknown",
  "version": "string",
  "skin": "string",
  "launcherShape": "string",
  "launcherFill": "string",
  "launcherContent": "string",
  "launcherSize": "string",
  "bubbleShape": "string",
  "bubbleFill": "string",
  "composerShape": "string",
  "namePlacement": "string",
  "nameAvatar": "boolean",
  "dayDividers": "boolean",
  "stampPlacement": "string",
  "stampContent": "string",
  "starterPrompts": [
    {
      "html": "string",
      "text": "string"
    }
  ],
  "team": [
    {
      "name": "string",
      "initials": "string",
      "tone": "string",
      "avatarUrl?": "string | null"
    }
  ],
  "socketUrl": "string",
  "attachments": {
    "enabled": "boolean",
    "maxBytes": "integer",
    "accept": []
  }
}

Try it

curl -X GET "https://api.prodantix.com/v1/messenger/config" \
  -H "Authorization: Bearer $PROJECT_KEY"
GET/v1/messenger/avatar/{user_id}/{file}https://api.prodantix.com

Read a team member's picture

Serves the picture a team member uploaded for the messenger, at the path the config's `team` and a turn's `authorAvatarUrl` name. The bytes are content-addressed and never change under a path, so a browser may cache them for a day. An `<img>` cannot set a header, so the project key may travel as the `api_key` query parameter instead of the bearer.

Auth projectKey

Parameters

NameInTypeDescription
user_id requiredpathstringThe person the picture belongs to.
file requiredpathstringThe picture's content hash and extension.
api_keyquerystringThe public project key, for a load that cannot set the bearer header.

Responses

The picture, as PNG, JPEG, WebP or SVG

Try it

curl -X GET "https://api.prodantix.com/v1/messenger/avatar/:user_id/:file" \
  -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"}'