Skip to main content
POST
Create document

Authorizations

Authorization
string
header
required

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

Path Parameters

organizationName
string
required

The unique identifier of the organization Standard identifier pattern for resource names

Pattern: ^[a-zA-Z0-9_ -]+$
workspaceName
string
required

The unique identifier of the destination workspace Workspace name pattern. Allows any character except / (would split the FGA resource path — see ResourceIdentifier.parseFromFga) and * (FGA wildcard). 1-63 chars.

Pattern: ^(?!.*\*)(?!.*[/]).{1,63}$

Query Parameters

overwrite
boolean

If true, the document will be overwritten if it already exists

moveFrom
string

Optional credible:// URI of a source document to relocate into this workspace (e.g. credible://workspaces/{sourceWorkspace}/documents/{sourcePath}). When set, the source document is moved here under the same path and the request body is ignored. Only data chats and reports may be moved. Not constrained by ResourceIdentifierPattern: the embedded workspace name and document path allow spaces and punctuation (see WorkspaceNamePattern / DocumentPathPattern). The URI is structurally validated by the server (parsed into workspace + document path) and the move is authorized against the resolved source document.

Maximum string length: 512

Body

application/json

Represents a document within a workspace, such as a workbook or dashboard

path
string

The file path of the document within the workspace

Maximum string length: 255
Pattern: ^(?!.*\.\.)[a-zA-Z0-9_/. \-&:,'+?!()$^–—]+$
content
string

The content of the document, typically Malloy code or configuration

type
enum<string>

The type of document, determining its purpose and behavior

Available options:
workbook,
dashboard,
modeling_chat,
data_chat,
agent_report,
agent_modeling_file,
agent_html_report,
draft_agent_html_report,
draft_agent_report,
draft_package,
model_summary
createdAt
string<date-time>

ISO 8601 timestamp indicating when the document was created

updatedAt
string<date-time>

ISO 8601 timestamp indicating when the document was last modified

modifiedBy
string | null

The userId of the user who last modified this document

metadata
object | null

Optional JSON metadata associated with the document (e.g. title, tags)

Response

Document created (or relocated) successfully

Represents a document within a workspace, such as a workbook or dashboard

path
string

The file path of the document within the workspace

Maximum string length: 255
Pattern: ^(?!.*\.\.)[a-zA-Z0-9_/. \-&:,'+?!()$^–—]+$
content
string

The content of the document, typically Malloy code or configuration

type
enum<string>

The type of document, determining its purpose and behavior

Available options:
workbook,
dashboard,
modeling_chat,
data_chat,
agent_report,
agent_modeling_file,
agent_html_report,
draft_agent_html_report,
draft_agent_report,
draft_package,
model_summary
createdAt
string<date-time>

ISO 8601 timestamp indicating when the document was created

updatedAt
string<date-time>

ISO 8601 timestamp indicating when the document was last modified

modifiedBy
string | null

The userId of the user who last modified this document

metadata
object | null

Optional JSON metadata associated with the document (e.g. title, tags)