% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/server.R
\name{create_document}
\alias{create_document}
\title{Create a new document on the server}
\usage{
create_document(server, doc_id = NULL)
}
\arguments{
\item{server}{An autosync_server object.}

\item{doc_id}{Optional document ID. If NULL, generates a new ID.}
}
\value{
Document ID string.
}
\description{
Creates a new empty Automerge document and registers it with the server.
}
\examples{
\dontshow{if (interactive()) withAutoprint(\{ # examplesIf}
server <- sync_server()
doc_id <- create_document(server)
server$close()
\dontshow{\}) # examplesIf}
}
