Preview Assistant Attachment Import
Put an attached CSV or Excel file (its first sheet) through the lead import pipeline's upload step: the same preview as `POST /imports/leads` (detected encoding and delimiter, suggested column mapping, sample rows) plus `attachment_id`. Nothing is imported until `POST /imports/{import_id}/commit` (Oro asks for a confirmation with the mapping first). 422 for other kinds (RO-323).
API key access
/api/v1/assistant/attachments/{attachment_id}/import-previewAccess token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).
In: header
Path Parameters
uuidHeader Parameters
Id of the workspace to act on (must be a member).
Response Body
curl -X POST "http://localhost:8000/api/v1/assistant/attachments/497f6eca-6276-4993-bfeb-53cbbbba6f08/import-preview" \ -H "X-Workspace-Id: string"{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filename": "string",
"status": "previewed",
"encoding": "string",
"delimiter": "string",
"headers": [
"string"
],
"total_rows": 0,
"created_count": 0,
"updated_count": 0,
"skipped_count": 0,
"error_count": 0,
"suppressed_count": 0,
"mapping": [
{
"property1": null,
"property2": null
}
],
"options": {
"property1": null,
"property2": null
},
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"created_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"suggested_mapping": [
{
"column": 0,
"header": "string",
"field": {},
"custom_key": "string"
}
],
"sample_rows": [
{
"row": 0,
"cells": [
"string"
]
}
],
"default_country": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Post Assistant Message
Send the assistant a message (RO-303): 202 at once with the stored message and the assistant's `running` one; the turn runs in the background (poll the thread). The planner may ask questions (`question`, `form`), read data with the user's permissions, or propose writes as a `confirm` card (nothing changes until it is confirmed). It never sends email, calls, approves drafts or starts campaigns. A new message expires earlier unconfirmed plans. 429 when the workspace's daily message budget (`ASSISTANT_DAILY_MESSAGES`) is used up; 409 while the previous turn is still running.
Rate Assistant Message
Thumbs up or down on an assistant message, with an optional reason and comment (RO-319). Stored per user with the answering model, for preference learning (RO-282); a new rating replaces the old.