Say where a brand's files live
PUT
/api/v1/brands/{slug}/source
const url = 'http://localhost:3000/api/v1/brands/example/source';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"remote":"https://example.com","branch":"example","path":"example","synced":{"commit":"example","files":{"additionalProperty":"example"},"assets":{"additionalProperty":"example"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Brand slug
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
remote
required
The repository, as its host shows it: https://github.com/acme/brand
string format: uri
branch
Main when left out
string
path
The brand’s folder in the repository; its root when left out
string
synced
The files just pushed, at commit: recorded as what both sides agree on
object
commit
required
string
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
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
Examplegenerated
{ "remote": "https://example.com", "branch": "example", "path": "example", "synced": { "commit": "example", "files": { "additionalProperty": "example" }, "assets": { "additionalProperty": "example" } }}Responses
Section titled “Responses”The source
Media typeapplication/json
object
data
required
Examplegenerated
{ "data": { "remote": "example", "branch": "example", "path": "example", "commit": "example", "syncedAt": "2026-04-15T12:00:00Z", "pending": true, "files": 1 }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}