---
search:
  tags:
    - GitHub
    - POST
seo:
  description: >-
    Starts installing Kapten's GitHub App for the organization.… Reference for
    the POST /integration/github/connection-sessions endpoint in the Platform
    API.
sidebar:
  label: Start connecting GitHub
  badge: POST
title: Start connecting GitHub
type: openapi-operation
---
Starts installing Kapten's GitHub App for the organization. Returns the GitHub URL to send the user to; GitHub sends them back to Kapten once the app is installed.

`POST /integration/github/connection-sessions`

**Request body** (`application/json`, required)

- `return_target` (string, required)
- `kapplication_id` (string<uuid> | null)

Request body example:

```json
{
  "return_target": "organization_settings",
  "kapplication_id": "f175e330-5cbe-4cb3-93cb-ec786e7bd8af"
}
```

**Responses**

- `200` — GitHub connection session created
- `default` — Error

Response example, 200:

```json
{
  "setup_url": "http://example.com",
  "expires_at": "2019-08-24T14:15:22Z"
}
```
