Skip to main content

Kapa.ai (v1)

Download OpenAPI specification:Download

API for Kapa.ai

Activity

Activity

Returns aggregate as well as time series statistics for a project

Authorizations:
Bearer
path Parameters
project_id
required
string
query Parameters
token_types
string

Comma-separated list of token types to filter by. Available choices: SLACK, DISCORD, WIDGET, API, INTERNAL

start_date_time
string <date-time>

Start datetime for filtering in ISO 8601 format (e.g., 2020-01-01T00:00:00Z).

end_date_time
string <date-time>

End datetime for filtering in ISO 8601 format (e.g., 2020-01-01T23:59:59Z).

aggregation_period
required
string

Period for aggregating data. Available choices: HOUR, DAY, WEEK, MONTH, YEAR

Responses

Response samples

Content type
application/json
{
  • "time_series": [
    ],
  • "aggregate_statistics": {
    }
}

Common Questions

Clusters

Returns a semantic clustering of threads for a project

Authorizations:
Bearer
path Parameters
project_id
required
string
query Parameters
confidence_filter
string
Enum: "UNCERTAIN" "CERTAIN"

Only include threads with specified confidence label

start_date_time
string <date-time>

Start datetime for filtering in ISO 8601 format (e.g., 2020-01-01T00:00:00Z).

end_date_time
string <date-time>

End datetime for filtering in ISO 8601 format (e.g., 2020-01-01T23:59:59Z).

cluster_mode
string
Enum: "detailed" "broad"

Mode for clustering

Responses

Response samples

Content type
application/json
{
  • "threads_total": 0,
  • "threads_clustered": 0,
  • "threads_unclustered": 0,
  • "sufficient_data": true,
  • "clusters": [
    ]
}

Source Analytics

Questions

Returns a list of questions answered through the sources of a project

Authorizations:
Bearer
path Parameters
project_id
required
string
query Parameters
page
integer

Page number for pagination

page_size
integer

Number of items per page for pagination

start_date
string <date-time>

Start date for filtering, in ISO 8601 format (e.g., 2023-01-01T00:00:00Z).

end_date
string <date-time>

End date for filtering, in ISO 8601 format (e.g., 2023-01-31T23:59:59Z).

url_path
string

Specific URL path to filter the results by.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Statistics

Returns a list of source used by kapa to answer questions together with a count of questions answered by them.

Authorizations:
Bearer
path Parameters
project_id
required
string
query Parameters
page
integer

Page number for pagination

page_size
integer

Number of items per page for pagination

start_date
string <date-time>

Start date for the data retrieval period in ISO 8601 format (e.g., 2020-01-01T00:00:00Z).

end_date
string <date-time>

End date for the data retrieval period in ISO 8601 format (e.g., 2020-01-02T23:59:59Z).

url_path
string

Specific URL path to filter the statistics by.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Top Sources

Returns a list of sources that were most used by kapa to answer user questions

Authorizations:
Bearer
path Parameters
project_id
required
string
query Parameters
start_date
string <date-time>

Start date for the data retrieval period in ISO 8601 format (e.g., 2020-01-01T00:00:00Z).

end_date
string <date-time>

End date for the data retrieval period in ISO 8601 format (e.g., 2020-01-01T23:59:59Z).

limit
integer

Maximum number of top sources to retrieve.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Threads

Threads

Returns all threads for a project

Authorizations:
Bearer
path Parameters
project_id
required
string
query Parameters
page
integer

Page number for pagination

page_size
integer

Number of items per page for pagination

reaction_filter
string
Enum: "UPVOTE" "DOWNVOTE"

Filter by reaction type

confidence_filter
string
Enum: "UNCERTAIN" "CERTAIN"

Filter by confidence level

status_tag_filter
string <uuid>

Filter by status tag id

start_date
string <date-time>

Start date for filtering threads (YYYY-MM-DDTHH:MM:SSZ)

end_date
string <date-time>

End date for filtering threads (YYYY-MM-DDTHH:MM:SSZ)

search_text
string

Text to search within threads

token_filter
string

Filter by specific token

sort_by_date
string
Enum: "asc" "desc"

Sort the results in the specified order by date. If not specified results are ordered by date in descending order.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Question Answers

Returns all question answers for a single thread

Authorizations:
Bearer
path Parameters
project_id
required
string
id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]