Overview
The GitHub endpoints let you manage the GitHub Sync integration via the API. GitHub must be connected through the Configly UI first, as the API cannot initiate the OAuth authorisation flow.
Once connected, you can check the connection status, trigger a full re-export, and list recent commits from the synced repository.
Check connection status
GET /v1/github/status
Returns the current state of the GitHub connection. This endpoint always returns 200, even when GitHub is not connected.
curl https://api.configly.app/v1/github/status \ -H "Authorization: Bearer cly_your_key"
Connected response
{
"data": {
"connected": true,
"connection": {
"id": "gh_abc123",
"githubUsername": "your-username",
"githubRepoOwner": "your-org",
"githubRepoName": "zendesk-config",
"defaultBranch": "main",
"lastCommitSha": "a1b2c3d4e5f6",
"lastSyncedAt": "2026-04-15T14:30:00.000Z",
"status": "active",
"excludedTypes": []
}
}
}
Not connected response
{
"data": {
"connected": false,
"connection": null
}
}
Trigger a full sync
POST /v1/github/sync
Re-exports all configuration to GitHub. Requires READ_WRITE permission.
curl -X POST https://api.configly.app/v1/github/sync \ -H "Authorization: Bearer cly_your_key"
{
"data": {
"commitSha": "a1b2c3d4e5f6",
"message": "Re-export completed successfully"
}
}
Note
This operation may take several seconds as it pushes all configuration types to GitHub.
List commits
GET /v1/github/commits
Returns a paginated list of recent commits on the configured repository's default branch.
| Parameter | Location | Required | Description |
|---|---|---|---|
page |
Query | No | Page number (default 1) |
limit |
Query | No | Results per page (default 20, max 100) |
curl "https://api.configly.app/v1/github/commits?page=1&limit=10" \ -H "Authorization: Bearer cly_your_key"
{
"data": [
{
"sha": "a1b2c3d4e5f6",
"message": "Sync: triggers, automations",
"author": "Phil Williams",
"date": "2026-04-15T14:30:00Z",
"htmlUrl": "https://github.com/your-org/zendesk-config/commit/a1b2c3d4e5f6"
}
],
"meta": {
"page": 1,
"limit": 10,
"total": 1,
"totalPages": 1
}
}
Note
GitHub does not provide an exact total count cheaply. The
meta.total and meta.totalPages values are estimates. Paginate by incrementing the page parameter until an empty result returns.Error codes
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR |
GitHub is not connected (for endpoints that require an active connection) |
| 401 | INVALID_API_KEY |
Missing or invalid API key |
| 403 | WRITE_SCOPE_REQUIRED |
The API key does not have READ_WRITE permission (for sync) |
| 502 | GITHUB_ERROR |
An error occurred communicating with GitHub |
To handle drift commits, see Drift commits and exclusions.
Comments
0 comments
Please sign in to leave a comment.