Skip to content

List the markdown files of an import, with the profile of each and the links Speccy offers.

POST
/bundles/import/preview
curl --request POST \
--url https://example.com/api/v1/bundles/import/preview \
--header 'Content-Type: multipart/form-data' \
--form name=example \
--form file=example \
--form text=example \
--form profile=example \
--form files=example \
--form docs=example \
--form links=example
Media typemultipart/form-data
object
name

The bundle folder name. The default comes from the file name or the doc title.

string
file

A .md file or a .zip file.

string
text

Pasted markdown.

string
profile

The doc type for a file that names none. Speccy writes the type line into the frontmatter of the imported file.

string
files

The files of a dropped folder. Each part’s file name is its path in the folder.

Array<string>
docs

JSON: an array of {path, profile}. The profile of each markdown file; an empty profile is not a spec.

string
links

JSON: an array of {from, to, kind}, the links a person confirmed. Speccy writes each into the from doc.

string

The docs of the import.

Media typeapplication/json
object
docs
required
Array<object>
object
path
required
string
title
required
string
type

The type the file names in its frontmatter.

string
guess

The profile whose headings fit the file best. Absent when none fits.

string
links
required
Array<object>
object
from
required

The path of the doc that links.

string
to
required

The path of the doc it links to.

string
kind
required
string
Examplegenerated
{
"docs": [
{
"path": "example",
"title": "example",
"type": "example",
"guess": "example"
}
],
"links": [
{
"from": "example",
"to": "example",
"kind": "example"
}
]
}

An error.

Media typeapplication/problem+json

RFC 9457 problem details with a stable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required

A stable machine-readable error code.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example"
}