Skip to content
Last updated

Connect a GitHub repository to an existing automation for automatic synchronization.

POSThttps://api.aitronos.com/v1/streamline/automations/{automation_id}/github/connect

Path Parameters

automation_id string required

The ID of the automation to connect.

Headers

Authorization string required

Content-Type string required ยท application/json

Request Body

repository_url string required

GitHub repository URL (e.g., https://github.com/owner/repo)

branch string required

Branch name to sync from (e.g., main)

credentials object required

GitHub authentication credentials

  • token string required - GitHub personal access token

Returns

Returns the updated automation object with GitHub connection details.

Bash
curl -X POST "https://api.aitronos.com/v1/streamline/automations/auto_abc123/github/connect" \
  -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "repository_url": "https://github.com/owner/repo",
    "branch": "main",
    "credentials": {
      "token": "ghp_..."
    }
  }'

Response:

{
  "id": "auto_abc123",
  "name": "My Automation",
  "organization_id": "org_xyz789",
  "automation_id": "internal_id",
  "execution_file_path": "main.py",
  "upload_method": "git",
  "description": "Automation description",
  "parameters": {},
  "git_repository_url": "https://github.com/owner/repo",
  "git_branch": "main",
  "git_last_commit_sha": "abc123def456",
  "git_last_sync_at": "2025-11-15T10:30:00Z",
  "git_webhook_id": "12345678",
  "schedule_enabled": false,
  "cron_expression": null,
  "timezone": null,
  "is_active": true,
  "created_at": "2025-11-15T10:00:00Z",
  "updated_at": "2025-11-15T10:30:00Z"
}