user_id is requiredapp_id identifies the calling application contextuser_idNote: All queries from the same user_idare treated as part of a single conversational context unless explicitly reset by the application.
POSTapplication/jsonImportant:
This API accepts JSON requests only.multipart/form-datais not supported.
| Field | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | Unique xfloor user identifier. Used to maintain conversational continuity and personalization. |
query | string | Yes | Natural language query provided by the user. |
floor_ids | array of strings | Yes | List of floor identifiers that define the search scope. Must be provided as a JSON array. |
filters | object | Optional | Additional constraints to narrow search results. |
filters.time_from | string (ISO-8601) | Optional | Start timestamp for filtering content by creation or update time. |
filters.time_to | string (ISO-8601) | Optional | End timestamp for filtering content by creation or update time. |
filters.types | array of strings | Optional | Content types to include (e.g., post, blog, forum). |
filters.tags | array of strings | Optional | Tags used to further refine results. |
k | integer | Optional | Maximum number of results to retrieve (Top-K). Defaults to system-defined behavior if omitted. |
include_metadata | string ("0" or "1") | Optional | Whether to include metadata (source, timestamps, tags) in the response. Defaults to "0". |
summary_needed | string ("0" or "1") | Optional | Whether a summarized conversational answer should be generated. Defaults to "0". |
app_id | string | Optional | Identifies the application invoking the API. Useful for multi-app integrations. |
floor_ids must be provided as a JSON array"floor_ids": ["floor_1", "floor_2"]include_metadata, summary_needed) are encoded as string values: "0" or "1"filters must be provided as a JSON object, not a string{
"user_id": "xf_user_123",
"query": "What options do I have in your institute?",
"floor_ids": ["institute_floor"],
"filters": {
"types": ["post", "blog"],
"tags": ["admissions"]
},
"k": 5,
"include_metadata": "1",
"summary_needed": "1",
"app_id": "student_portal"
}k.summary_needed = "1", a synthesized conversational summary is generated.include_metadata = "1", metadata is attached to each result item.{
"answer": "Assistant-generated conversational response",
"items": [
{
"id": "content_id",
"type": "post",
"text": "Original content snippet",
"metadata": { }
}
]
}| Field | Always Present | Description | Rendering Guidance |
|---|---|---|---|
answer | No | Assistant-generated conversational response. Depends on summary_needed. Is present if summary_needed=1 | Render prominently |
items | Yes (may be empty) | List of matched content used for grounding | Render optionally |
items[].metadata | Conditional | Included only if include_metadata = "1" | Render on demand |
No-Result Case:
If no relevant content is found,itemswill be an empty array andanswerwill contain a conversational fallback response.
user_iduser_iduser_idqueryfloor_ids/agent/memory/queryExecutes a conversational query over xfloor content, returning context-aware, filtered, and optionally summarized results with support for multi-turn interactions.
curl --location --request POST 'https://appfloor.in/agent/memory/query' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_id": "string",
"query": "string",
"floor_ids": [
"string"
],
"include_metadata": "string",
"summary_needed": "string",
"app_id": "string",
"filters": {
"time_from": "string",
"time_to": "string",
"filter_types": "string",
"filter_tags": "string"
}
}'{
"items": [
{
"block_type": 0,
"block_id": "string",
"floor_uid": "string",
"event_id": "string",
"text": "string",
"score": 0,
"block_title": "string",
"block_details": "string",
"from_floor_uid": "string",
"user_id": "string",
"match_type": "string"
}
],
"answer": "string"
}