Start connecting an agent to GitHub through its own GitHub App. Returns `install` with a URL to open in a browser when the App exists, or `create_app` when GitHub must first create it, which needs the web UI (Agent > Integrations > Connect GitHub).
POST
/v1/agents/{agent_id}/github/connect
const url = 'https://app.everruns.com/api/v1/agents/example/github/connect';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"owner_org":"example","return_to":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.everruns.com/api/v1/agents/example/github/connect \ --header 'Content-Type: application/json' \ --data '{ "owner_org": "example", "return_to": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”agent_id
required
string
Prefixed public identifier
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Where a new App is created and where the browser lands afterwards.
object
owner_org
GitHub organization that should own a new App. Omit for the personal account of whoever confirms it on GitHub. A private App can only be installed on the account that owns it.
string | null
return_to
UI path to return to when the flow ends.
string | null
Examplegenerated
{ "owner_org": "example", "return_to": "example"}Responses
Section titled “ Responses ”Success
Media typeapplication/json
One of:
GitHub must create the App first. A browser posts manifest as the
manifest form field to action (a top-level navigation, so GitHub’s
confirmation page is shown). Outside a browser, follow next_step.
object
action
required
string
kind
required
string
manifest
required
string
next_step
required
string
The App exists; open url in a browser to install it or change which
repositories it can reach.
object
app_slug
required
string
kind
required
string
url
required
string
Example
{ "kind": "create_app"}Agent not found