Skip to main content
POST
/
v1
/
chat
Create Chat Session
curl --request POST \
  --url https://api.urldna.io/v1/chat \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "<string>",
  "response_type": "MARKDOWN",
  "scan_id": "<string>",
  "json_output": {}
}'
[
  {
    "id": "<string>",
    "chat_date": "2023-11-07T05:31:56Z",
    "prompt": "<string>",
    "response": "<string>",
    "response_type": "MARKDOWN",
    "scan_id": "<string>",
    "status": "PENDING",
    "json_output": {}
  }
]

Authorizations

Authorization
string
header
required

Body

application/json
prompt
string
required

Your question or instruction for analyzing the scan results.

response_type
enum<string>
required

Response format: MARKDOWN for human-readable analysis or JSON for structured data extraction.

Available options:
MARKDOWN,
JSON
scan_id
string
required

Scan identifier to analyze. Scan must be in DONE status.

json_output
object

Schema definition for JSON response structure. Required when response_type is JSON. Defines the expected output format.

Response

Chat session created successfully.

id
string

Unique chat session identifier.

chat_date
string<date-time>

ISO 8601 timestamp when the chat session was initiated.

prompt
string

User's input message or question about the scan.

response
string

AI-generated response to the user's prompt.

response_type
enum<string>

Response format: MARKDOWN for human-readable text or JSON for structured data extraction.

Available options:
MARKDOWN,
JSON
scan_id
string

Associated scan identifier for context.

status
enum<string>

Chat processing status.

Available options:
PENDING,
RUNNING,
DONE,
ERROR
json_output
object

Structured JSON data when response_type is JSON. Must contain a valid dictionary.