Make a source from a source URL, and keep its bundles in step (REQ-123, REQ-128).
const url = 'https://example.com/api/v1/github/sources';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"url":"example","profile":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/github/sources \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "profile": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
A source URL - owner/name, a repo URL, or the URL of a folder or a doc in it.
For the URL of one doc that names no type and that no mapping covers: the profile, which Speccy stores as the doc’s adopted type.
Examplegenerated
{ "url": "example", "profile": "example"}Responses
Section titled “ Responses ”The source of the URL’s folder, after its first sync. A URL whose folder an existing source covers makes no source, and names the existing one.
object
A repo, a branch and a folder whose bundles Speccy reads.
object
The folder, relative to the repo root.
How many docs of this source have a type accepted in Speccy (REQ-133).
An existing source already covers the URL’s folder, so Speccy made none.
The bundle to open, when the URL names a folder or a doc that holds one.
The spec doc to open, when the URL names one doc.
Examplegenerated
{ "source": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "repo": "example", "branch": "example", "path": "example", "head_commit": "example", "synced_at": "2026-04-15T12:00:00Z", "error": "example", "bundles": 1, "adopted": 1 }, "already_added": true, "bundle_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "doc_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}default
Section titled “default”An error.
RFC 9457 problem details with a stable code.
object
A stable machine-readable error code.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}