Skip to content

Say where a brand's files live

PUT
/api/v1/brands/{slug}/source
curl --request PUT \
--url http://localhost:3000/api/v1/brands/example/source \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "remote": "https://example.com", "branch": "example", "path": "example", "synced": { "commit": "example", "files": { "additionalProperty": "example" }, "assets": { "additionalProperty": "example" } } }'

Moving it to another repository, branch or folder forgets what was agreed: the next import takes the files whole. After pushing an export, send the files pushed as synced with their commit: they become what both sides agree on. Takes setup on the project.

Scope: write.

slug
required
string

Brand slug

Media typeapplication/json
object
remote
required

The repository, as its host shows it: https://github.com/acme/brand

string format: uri
<= 500 characters
branch

Main when left out

string
>= 1 characters <= 255 characters
path

The brand’s folder in the repository; its root when left out

string
<= 500 characters
synced

The files just pushed, at commit: recorded as what both sides agree on

object
commit
required
string
>= 1 characters <= 100 characters
files
required

The brand’s files by path in its folder: brand.yaml, rules/.yaml, pages/.yaml. Others are left alone

object
key
additional properties
string
<= 2000000 characters
assets

The files under assets/ the brand’s files point at: path to asset id, or to the SHA-256 of its bytes (upload first)

object
key
additional properties
string
<= 64 characters
Examplegenerated
{
"remote": "https://example.com",
"branch": "example",
"path": "example",
"synced": {
"commit": "example",
"files": {
"additionalProperty": "example"
},
"assets": {
"additionalProperty": "example"
}
}
}

The source

Media typeapplication/json
object
data
required
object
remote
required
string
branch
required
string
path
required
string
commit
required
string | null
syncedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
pending
required

Changed here since the repository last agreed: an export is due

boolean
files
required

Assets that are files in the repository

integer
>= -9007199254740991 <= 9007199254740991
Examplegenerated
{
"data": {
"remote": "example",
"branch": "example",
"path": "example",
"commit": "example",
"syncedAt": "2026-04-15T12:00:00Z",
"pending": true,
"files": 1
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}