Skip to content

Make a source from a source URL, and keep its bundles in step (REQ-123, REQ-128).

POST
/github/sources
curl --request POST \
--url https://example.com/api/v1/github/sources \
--header 'Content-Type: application/json' \
--data '{ "url": "example", "profile": "example" }'
Media typeapplication/json
object
url
required

A source URL - owner/name, a repo URL, or the URL of a folder or a doc in it.

string
profile

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.

string
Examplegenerated
{
"url": "example",
"profile": "example"
}

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.

Media typeapplication/json
object
source
required

A repo, a branch and a folder whose bundles Speccy reads.

object
id
required
string format: uuid
repo
required
string
branch
required
string
path
required

The folder, relative to the repo root.

string
head_commit
required
string
synced_at
string format: date-time
error
required
string
bundles
required
integer
adopted

How many docs of this source have a type accepted in Speccy (REQ-133).

integer
already_added
required

An existing source already covers the URL’s folder, so Speccy made none.

boolean
bundle_id

The bundle to open, when the URL names a folder or a doc that holds one.

string format: uuid
doc_id

The spec doc to open, when the URL names one doc.

string format: uuid
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"
}

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"
}