Need help? Get answers from the docs with Omni's in-app AI! Log in to your Omni instance and open the Omni Agent in the sidebar.
curl --request PUT \
--url https://{instance}.omniapp.co/api/v1/documents/{documentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "abc123",
"name": "Monthly Sales Dashboard",
"description": "Total monthly sales. Used in sales review meetings.",
"facetFilters": true,
"refreshInterval": null,
"filterConfig": {
"order_items.category": {
"type": "string",
"kind": "EQUALS",
"values": [
"Electronics"
],
"is_negative": false
}
},
"filterOrder": [
"order_items.category"
],
"queryPresentations": [
{
"name": "Sales Trend",
"description": "Monthly sales over time",
"prefersChart": true,
"topicName": "order_items",
"query": {
"fields": [
"order_items.created_at[month]",
"order_items.sale_price_sum"
],
"table": "order_items"
},
"visConfig": {
"visType": "basic",
"spec": {
"mark": {
"type": "line"
}
}
}
}
],
"documentMetadata": {
"presentation": {
"filters": {
"collapsible": true,
"defaultExpanded": false
}
}
}
}
'{
"identifier": "my-dashboard",
"name": "Q4 Sales Dashboard",
"description": "Total monthly sales. Used in sales review meetings."
}This endpoint only works with dashboard documents. Workbook-only documents are not supported.
Updates a document with the specified identifier. This endpoint performs a full resource replacement — all required fields must be provided and existing query presentations are replaced entirely.
curl --request PUT \
--url https://{instance}.omniapp.co/api/v1/documents/{documentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "abc123",
"name": "Monthly Sales Dashboard",
"description": "Total monthly sales. Used in sales review meetings.",
"facetFilters": true,
"refreshInterval": null,
"filterConfig": {
"order_items.category": {
"type": "string",
"kind": "EQUALS",
"values": [
"Electronics"
],
"is_negative": false
}
},
"filterOrder": [
"order_items.category"
],
"queryPresentations": [
{
"name": "Sales Trend",
"description": "Monthly sales over time",
"prefersChart": true,
"topicName": "order_items",
"query": {
"fields": [
"order_items.created_at[month]",
"order_items.sale_price_sum"
],
"table": "order_items"
},
"visConfig": {
"visType": "basic",
"spec": {
"mark": {
"type": "line"
}
}
}
}
],
"documentMetadata": {
"presentation": {
"filters": {
"collapsible": true,
"defaultExpanded": false
}
}
}
}
'{
"identifier": "my-dashboard",
"name": "Q4 Sales Dashboard",
"description": "Total monthly sales. Used in sales review meetings."
}The update operation follows the Omni’s draft/publish workflow:Documentation Index
Fetch the complete documentation index at: https://docs.omni.co/llms.txt
Use this file to discover all available pages before exploring further.
| Document Type | Behavior |
|---|---|
| Draft | Updated directly |
| Published (no existing draft) | Creates draft > Updates draft > Publishes draft |
Published (existing draft, clearExistingDraft: true) | Discards existing draft > Creates new draft > Updates > Publishes |
Published (existing draft, clearExistingDraft not set) | Returns 409 Conflict |
clearExistingDraft parameter to discard any existing draft before updating.Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Document identifier
Model ID for query transformation
Document name
1 - 254When true, enable facet filters on the dashboard
Auto-refresh interval in seconds. Minimum value must be 60. Use null to disable.
x >= 60Dashboard filter configuration. Pass {} for no filters.
Each key is a field name and the value is a filter definition object.
Show child attributes
Order of filters in the filter bar. Pass [] if no filters.
Array of query presentations (at least one required)
1Show child attributes
Optional description of the document. Set as null to clear the description.
1024"Total monthly sales. Used in sales review meetings."
Document metadata for presentation settings
Show child attributes
If true, discards any existing draft before updating.
Note: This parameter is required when a draft exists for the document.
Was this page helpful?