curl --request PUT \
--url https://app.hookie.ai/admin/api/projects/{project_id}/repo \
--header 'Content-Type: application/json' \
--data '
{
"repository": "<string>",
"token": "<string>",
"branch": "<string>",
"sync_paths": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
repository: '<string>',
token: '<string>',
branch: '<string>',
sync_paths: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/repo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/repo"
payload = {
"repository": "<string>",
"token": "<string>",
"branch": "<string>",
"sync_paths": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text){}Connect a repository
Mirrors a GitHub repository branch into the project’s brain with the customer’s own fine-grained token (Contents: read; Webhooks: write lets Hookie add the push webhook). Needs a project or workspace admin; refused to connected agents (agent_not_permitted). The token is checked with GitHub (repo_token_rejected when refused), encrypted and never returned. Hookie creates an endpoint in the project (dataset github_repo_pushes) that verifies GitHub’s signature, registers the push webhook on it when the token may, and runs the first sync. When it may not, webhook_setup carries the URL and secret once, to add by hand. Files matching sync_paths (default agentic-context/** and docs/**/*.md), not ignored by .hookieignore or the built-in list, under 256 KB, text and free of credentials are indexed as documents with source repo; anything else is recorded as skipped with the reason. Up to 500 files per repository.
curl --request PUT \
--url https://app.hookie.ai/admin/api/projects/{project_id}/repo \
--header 'Content-Type: application/json' \
--data '
{
"repository": "<string>",
"token": "<string>",
"branch": "<string>",
"sync_paths": [
"<string>"
]
}
'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
repository: '<string>',
token: '<string>',
branch: '<string>',
sync_paths: ['<string>']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/repo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/repo"
payload = {
"repository": "<string>",
"token": "<string>",
"branch": "<string>",
"sync_paths": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text){}Path Parameters
Body
Response
Successful operation
The response is of type object.