> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Connect a Git repository to an SDK

POST https://api.getpostman.com/sdk-git-connections
Content-Type: application/json

Connects a Postman source element (collection or specification) to a Git repository for one SDK language. This creates a new connection in the
`active` state.

**Note:**
- Each source and language pair maps to a single connection. If a connection already exists for the pair, this returns `409 Conflict` response.
- To update an existing connection, use the PUT `/sdk-git-connections/{sdkGitConnectionId}` endpoint.
- The `autoUpdatePullRequestsEnabled` property is is only available to **Enterprise** plan users. If the user is on a **Team** plan, this value is always `false`.


Reference: https://learning.postman.com/api-docs/api-reference/sd-ks/create-sdk-git-connection

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /sdk-git-connections:
    post:
      operationId: createSdkGitConnection
      summary: Connect a Git repository to an SDK
      description: >
        Connects a Postman source element (collection or specification) to a Git
        repository for one SDK language. This creates a new connection in the

        `active` state.


        **Note:**

        - Each source and language pair maps to a single connection. If a
        connection already exists for the pair, this returns `409 Conflict`
        response.

        - To update an existing connection, use the PUT
        `/sdk-git-connections/{sdkGitConnectionId}` endpoint.

        - The `autoUpdatePullRequestsEnabled` property is is only available to
        **Enterprise** plan users. If the user is on a **Team** plan, this value
        is always `false`.
      tags:
        - sdKs
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sdkGitConnection'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sdkError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateSdkGitConnectionRequestUnauthorizedError
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateSdkGitConnectionRequestForbiddenError
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateSdkGitConnectionRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createSdkGitConnection'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    elementType-2:
      type: string
      enum:
        - collection
        - spec
      description: The type of Postman element.
      title: elementType-2
    sdkSource:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/elementType-2'
        id:
          type: string
          description: The ID of the Postman Collection or specification in Postman.
      required:
        - type
        - id
      description: The collection or specification that the SDK is generated from.
      title: sdkSource
    sdkLanguage:
      type: string
      enum:
        - typescript
        - python
        - go
        - java
        - csharp
        - ruby
        - php
        - kotlin
        - rust
        - cli
      description: The target output language for the generated SDK.
      title: sdkLanguage
    autoUpdatePullRequestsEnabled:
      type: boolean
      description: >
        If true, pull requests are opened automatically whenever the source
        changes or a new version of the SDK generator is released. If false,
        pull requests are opened automatically, but only for manually-triggered
        SDK regeneration. If `autoUpdatePullRequestsEnabled` isn't set, the
        default behavior depends on the user's Postman plan:


        - **Enterprise** plan users — Defaults to the `true` value.

        - **Team** plan users and read only — Defaults to the `false` value.
      title: autoUpdatePullRequestsEnabled
    createSdkGitConnection:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/sdkSource'
        language:
          $ref: '#/components/schemas/sdkLanguage'
        repositoryUrl:
          type: string
          format: uri
          description: The canonical URL of the target Git repository.
        targetBranch:
          type: string
          default: main
          description: The branch the SDK is published to. Defaults to `main`.
        autoUpdatePullRequestsEnabled:
          $ref: '#/components/schemas/autoUpdatePullRequestsEnabled'
      required:
        - source
        - language
        - repositoryUrl
      title: createSdkGitConnection
    sdkGitConnectionId:
      type: string
      description: The Git connection's ID.
      title: sdkGitConnectionId
    sdkGitConnectionStatus:
      type: string
      enum:
        - active
        - disconnected
        - inaccessible
      description: >
        The lifecycle status of the Git connection:

        - `active` — The connection is live and all opened pull requests ship
        SDK updates into the repository.

        - `disconnected` — The connection was explicitly disconnected by the
        owner, and no pull requests can be opened. The historical record is
        preserved.

        - `inaccessible` — Access to the repository was revoked or its no longer
        reachable.
      title: sdkGitConnectionStatus
    sdkId:
      type: string
      description: The SDK's ID.
      title: sdkId
    sdkBuildStatus:
      type: string
      enum:
        - queued
        - in_progress
        - succeeded
        - failed
      description: >
        The SDK's build lifecycle:

        - `queued` — Accepted but not yet started.

        - `in_progress` — The SDK generation is running and in progress.

        - `succeeded` — The archive is built and available for download.

        - `failed` — The SDK generation failed. For information, check the
        `error` response.
      title: sdkBuildStatus
    sdkErrorBuildStatusFailure:
      type: object
      properties:
        code:
          type: string
          description: The build failure's error code.
        message:
          type: string
          description: Information about the build failure.
      required:
        - code
        - message
      description: Information about the SDK build's status when `buildStatus` is `failed`.
      title: sdkErrorBuildStatusFailure
    sdkGitConnectionPRStatus:
      type: string
      enum:
        - open
        - merged
        - closed
      description: The lifecycle status of a pull request.
      title: sdkGitConnectionPRStatus
    sdkPullRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The pull request's URL.
        status:
          $ref: '#/components/schemas/sdkGitConnectionPRStatus'
        sdkId:
          $ref: '#/components/schemas/sdkId'
      required:
        - url
        - status
        - sdkId
      description: >-
        If the SDK was shipped (or proposed for shipping) through a Git
        connection, this is a compact representation of the pull request that
        shipped it. Otherwise, this returns a `null` value.
      title: sdkPullRequest
    sdk:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/sdkId'
        language:
          $ref: '#/components/schemas/sdkLanguage'
        source:
          $ref: '#/components/schemas/sdkSource'
        workspaceId:
          type: string
          description: >-
            The ID of the workspace that owns the SDK, derived from the source
            entity.
        version:
          type: string
          description: >-
            The generated SDK's semantic version ID. This value is automatically
            assigned by the release/changelog pipeline.
        buildStatus:
          $ref: '#/components/schemas/sdkBuildStatus'
        error:
          $ref: '#/components/schemas/sdkErrorBuildStatusFailure'
        pullRequest:
          $ref: '#/components/schemas/sdkPullRequest'
        createdAt:
          type: string
          format: date-time
          description: The date and time at which the SDK was created.
        updatedAt:
          type: string
          format: date-time
          description: The date and time at which the SDK was last updated.
      required:
        - id
        - language
        - source
        - workspaceId
        - buildStatus
        - createdAt
        - updatedAt
      description: Information about the generated SDK.
      title: sdk
    simpleSdkGitConnectionPullRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The pull request's URL.
        status:
          $ref: '#/components/schemas/sdkGitConnectionPRStatus'
        sdkId:
          $ref: '#/components/schemas/sdkId'
      required:
        - url
        - status
        - sdkId
      title: simpleSdkGitConnectionPullRequest
    sdkGitConnection:
      type: object
      properties:
        sdkGitConnectionId:
          $ref: '#/components/schemas/sdkGitConnectionId'
        source:
          $ref: '#/components/schemas/sdkSource'
        language:
          $ref: '#/components/schemas/sdkLanguage'
        status:
          $ref: '#/components/schemas/sdkGitConnectionStatus'
        repositoryUrl:
          type: string
          format: uri
          description: The canonical URL of the target Git repository.
        targetBranch:
          type: string
          default: main
          description: >-
            The branch the SDK is published to. This defaults to the `main`
            value.
        autoUpdatePullRequestsEnabled:
          $ref: '#/components/schemas/autoUpdatePullRequestsEnabled'
        sdk:
          $ref: '#/components/schemas/sdk'
        pullRequests:
          type: array
          items:
            $ref: '#/components/schemas/simpleSdkGitConnectionPullRequest'
          description: >-
            A list of SDK update pull requests on the Git connection, in order
            of newest first by its `updatedAt` property. This returns an empty
            value if no pull requests have been opened yet. For full pull
            request details, use the GET
            `/sdk-git-connections/{sdkGitConnectionId}/pull-requests` endpoint.
        createdAt:
          type: string
          format: date-time
          description: The date and time at which the Git connection was created.
        updatedAt:
          type: string
          format: date-time
          description: The date and time at which the Git connection was last updated.
      required:
        - sdkGitConnectionId
        - source
        - language
        - status
        - repositoryUrl
        - targetBranch
        - autoUpdatePullRequestsEnabled
        - pullRequests
        - createdAt
        - updatedAt
      description: Information about the SDK's Git connection to a Postman element.
      title: sdkGitConnection
    sdkError:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: >-
            The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that
            identifies the type of problem.
        title:
          type: string
          description: A short summary of the problem.
        status:
          type: integer
          description: The error's HTTP status code.
        detail:
          type: string
          description: Information about the error.
        instance:
          type: string
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
        requestId:
          type: string
          description: The request's ID.
      required:
        - type
        - title
        - status
      title: sdkError
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    CreateSdkGitConnectionRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateSdkGitConnectionRequestUnauthorizedError
    CreateSdkGitConnectionRequestForbiddenError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateSdkGitConnectionRequestForbiddenError
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    CreateSdkGitConnectionRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateSdkGitConnectionRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### Created Git Connection



**Request**

```json
undefined
```

**Response**

```json
{
  "sdkGitConnectionId": "8d4f7c1a-2b3e-4f5a-9c8d-1a2b3c4d5e6f",
  "source": {
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  },
  "language": "typescript",
  "status": "active",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "targetBranch": "main",
  "autoUpdatePullRequestsEnabled": true,
  "pullRequests": [
    {
      "url": "https://git.example.com/engineering/engineering-sdk/pull/87",
      "status": "open",
      "sdkId": "9c4e7d1a-2b3c-4f5e-8a9b-1c2d3e4f5a6b"
    }
  ],
  "createdAt": "2026-04-12T09:00:00Z",
  "updatedAt": "2026-05-30T10:21:14Z"
}
```

**SDK Code**

```python Created Git Connection
import requests

url = "https://api.getpostman.com/sdk-git-connections"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Created Git Connection
const url = 'https://api.getpostman.com/sdk-git-connections';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Created Git Connection
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/sdk-git-connections"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Created Git Connection
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/sdk-git-connections")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Created Git Connection
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/sdk-git-connections")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Created Git Connection
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/sdk-git-connections', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Created Git Connection
using RestSharp;

var client = new RestClient("https://api.getpostman.com/sdk-git-connections");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Created Git Connection
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/sdk-git-connections")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Connect a Repository



**Request**

```json
{
  "source": {
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  },
  "language": "typescript",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "targetBranch": "main",
  "autoUpdatePullRequestsEnabled": true
}
```

**Response**

```json
{
  "sdkGitConnectionId": "8d4f7c1a-2b3e-4f5a-9c8d-1a2b3c4d5e6f",
  "source": {
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  },
  "language": "typescript",
  "status": "active",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "targetBranch": "main",
  "autoUpdatePullRequestsEnabled": true,
  "pullRequests": [
    {
      "url": "https://git.example.com/engineering/engineering-sdk/pull/87",
      "status": "open",
      "sdkId": "9c4e7d1a-2b3c-4f5e-8a9b-1c2d3e4f5a6b"
    }
  ],
  "createdAt": "2026-04-12T09:00:00Z",
  "updatedAt": "2026-05-30T10:21:14Z"
}
```

**SDK Code**

```python Connect a Repository
import requests

url = "https://api.getpostman.com/sdk-git-connections"

payload = {
    "source": {
        "type": "collection",
        "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
    },
    "language": "typescript",
    "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
    "targetBranch": "main",
    "autoUpdatePullRequestsEnabled": True
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Connect a Repository
const url = 'https://api.getpostman.com/sdk-git-connections';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"source":{"type":"collection","id":"12ece9e1-2abf-4edc-8e34-de66e74114d2"},"language":"typescript","repositoryUrl":"https://git.example.com/engineering/engineering-sdk","targetBranch":"main","autoUpdatePullRequestsEnabled":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Connect a Repository
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/sdk-git-connections"

	payload := strings.NewReader("{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"targetBranch\": \"main\",\n  \"autoUpdatePullRequestsEnabled\": true\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Connect a Repository
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/sdk-git-connections")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"targetBranch\": \"main\",\n  \"autoUpdatePullRequestsEnabled\": true\n}"

response = http.request(request)
puts response.read_body
```

```java Connect a Repository
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/sdk-git-connections")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"targetBranch\": \"main\",\n  \"autoUpdatePullRequestsEnabled\": true\n}")
  .asString();
```

```php Connect a Repository
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/sdk-git-connections', [
  'body' => '{
  "source": {
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  },
  "language": "typescript",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "targetBranch": "main",
  "autoUpdatePullRequestsEnabled": true
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Connect a Repository
using RestSharp;

var client = new RestClient("https://api.getpostman.com/sdk-git-connections");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"targetBranch\": \"main\",\n  \"autoUpdatePullRequestsEnabled\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Connect a Repository
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "source": [
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  ],
  "language": "typescript",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "targetBranch": "main",
  "autoUpdatePullRequestsEnabled": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/sdk-git-connections")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Connect Without Automatic Pull Requests



**Request**

```json
{
  "source": {
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  },
  "language": "typescript",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "autoUpdatePullRequestsEnabled": false
}
```

**Response**

```json
{
  "sdkGitConnectionId": "8d4f7c1a-2b3e-4f5a-9c8d-1a2b3c4d5e6f",
  "source": {
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  },
  "language": "typescript",
  "status": "active",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "targetBranch": "main",
  "autoUpdatePullRequestsEnabled": true,
  "pullRequests": [
    {
      "url": "https://git.example.com/engineering/engineering-sdk/pull/87",
      "status": "open",
      "sdkId": "9c4e7d1a-2b3c-4f5e-8a9b-1c2d3e4f5a6b"
    }
  ],
  "createdAt": "2026-04-12T09:00:00Z",
  "updatedAt": "2026-05-30T10:21:14Z"
}
```

**SDK Code**

```python Connect Without Automatic Pull Requests
import requests

url = "https://api.getpostman.com/sdk-git-connections"

payload = {
    "source": {
        "type": "collection",
        "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
    },
    "language": "typescript",
    "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
    "autoUpdatePullRequestsEnabled": False
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Connect Without Automatic Pull Requests
const url = 'https://api.getpostman.com/sdk-git-connections';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"source":{"type":"collection","id":"12ece9e1-2abf-4edc-8e34-de66e74114d2"},"language":"typescript","repositoryUrl":"https://git.example.com/engineering/engineering-sdk","autoUpdatePullRequestsEnabled":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Connect Without Automatic Pull Requests
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/sdk-git-connections"

	payload := strings.NewReader("{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"autoUpdatePullRequestsEnabled\": false\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Connect Without Automatic Pull Requests
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/sdk-git-connections")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"autoUpdatePullRequestsEnabled\": false\n}"

response = http.request(request)
puts response.read_body
```

```java Connect Without Automatic Pull Requests
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/sdk-git-connections")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"autoUpdatePullRequestsEnabled\": false\n}")
  .asString();
```

```php Connect Without Automatic Pull Requests
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/sdk-git-connections', [
  'body' => '{
  "source": {
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  },
  "language": "typescript",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "autoUpdatePullRequestsEnabled": false
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Connect Without Automatic Pull Requests
using RestSharp;

var client = new RestClient("https://api.getpostman.com/sdk-git-connections");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"source\": {\n    \"type\": \"collection\",\n    \"id\": \"12ece9e1-2abf-4edc-8e34-de66e74114d2\"\n  },\n  \"language\": \"typescript\",\n  \"repositoryUrl\": \"https://git.example.com/engineering/engineering-sdk\",\n  \"autoUpdatePullRequestsEnabled\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Connect Without Automatic Pull Requests
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "source": [
    "type": "collection",
    "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
  ],
  "language": "typescript",
  "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
  "autoUpdatePullRequestsEnabled": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/sdk-git-connections")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```