Skip to main content
POST
/
v1
/
namespaces
/
{namespace}
/
search
/
{session_id}
JavaScript
import Charcoal from '@charcoalhq/sdk';

const client = new Charcoal({
  apiKey: process.env['CHARCOAL_API_KEY'], // This is the default and can be omitted
});

const searchResponse = await client.namespaces.search.continue('session_id', {
  namespace: 'namespace',
  message: 'message',
});

console.log(searchResponse.session_id);
{
  "session_id": "<string>",
  "status": "completed",
  "synthesis": "<string>",
  "results": [
    {
      "finding": "<string>",
      "id": "<string>",
      "excerpts": [
        "<string>"
      ],
      "attributes": {}
    }
  ],
  "documents_scanned": 123,
  "queries_executed": 123,
  "clarification_needed": {
    "question": "<string>",
    "options": [
      "<string>"
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

namespace
string
required

Namespace identifier. Alphanumeric characters, hyphens, underscores, and dots. Max 128 characters.

Maximum string length: 128
Pattern: ^[A-Za-z0-9-_.]{1,128}$
session_id
string
required

Search session identifier returned from a multi-turn search request.

Maximum string length: 64

Body

application/json
message
string
required

Follow-up message or answer to a clarification question.

stream
boolean
default:false

Whether to stream the response as server-sent events.

include_attributes
boolean
default:false

Whether to include document attributes in search results.

Response

Successful response.

session_id
string
required

Unique identifier for this search session.

status
enum<string>
required
Available options:
completed,
clarification_needed,
failed
synthesis
string
required

Synthesized summary of all findings.

results
object[]
required
documents_scanned
integer

Number of documents scanned during the search.

queries_executed
integer

Number of queries executed during the search.

clarification_needed
object

Present when status is clarification_needed.