For a complete page index, fetch https://developer.close.com/llms.txt

# Create an integration link

POST https://api.close.com/api/v1/integration_link/
Content-Type: application/json

Reference: https://developer.close.com/api/resources/integration-links/create

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /integration_link/:
    post:
      operationId: create
      summary: Create an integration link
      tags:
        - subpackage_integrationLinks
      parameters:
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationLink'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIntegrationLink'
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    IntegrationLinkType:
      type: string
      enum:
        - lead
        - contact
        - opportunity
      title: IntegrationLinkType
    CreateIntegrationLink:
      type: object
      properties:
        name:
          type: string
        type:
          $ref: '#/components/schemas/IntegrationLinkType'
        url:
          type: string
      required:
        - name
        - type
        - url
      title: CreateIntegrationLink
    IntegrationLink:
      type: object
      properties:
        created_by:
          type:
            - string
            - 'null'
        date_created:
          type:
            - string
            - 'null'
          format: date-time
        date_updated:
          type:
            - string
            - 'null'
          format: date-time
        id:
          type: string
        name:
          type: string
        organization_id:
          type: string
        type:
          $ref: '#/components/schemas/IntegrationLinkType'
        updated_by:
          type:
            - string
            - 'null'
        url:
          type: string
      required:
        - created_by
        - date_created
        - date_updated
        - id
        - name
        - organization_id
        - type
        - updated_by
        - url
      title: IntegrationLink
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```

## SDK Code Examples

```python integration_links_create_example
import requests

url = "https://api.close.com/api/v1/integration_link/"

payload = {
    "name": "Google Search",
    "type": "lead",
    "url": "http://google.com/search?q={{lead.display_name}}"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<CLOSE_API_KEY>", ""))

print(response.json())
```

```javascript integration_links_create_example
const url = 'https://api.close.com/api/v1/integration_link/';
const credentials = btoa("<CLOSE_API_KEY>:");

const options = {
  method: 'POST',
  headers: {Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json'},
  body: '{"name":"Google Search","type":"lead","url":"http://google.com/search?q={{lead.display_name}}"}'
};

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

```go integration_links_create_example
package main

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

func main() {

	url := "https://api.close.com/api/v1/integration_link/"

	payload := strings.NewReader("{\n  \"name\": \"Google Search\",\n  \"type\": \"lead\",\n  \"url\": \"http://google.com/search?q={{lead.display_name}}\"\n}")

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

	req.SetBasicAuth("<CLOSE_API_KEY>", "")
	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 integration_links_create_example
require 'uri'
require 'net/http'

url = URI("https://api.close.com/api/v1/integration_link/")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<CLOSE_API_KEY>", "")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Google Search\",\n  \"type\": \"lead\",\n  \"url\": \"http://google.com/search?q={{lead.display_name}}\"\n}"

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

```java integration_links_create_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.close.com/api/v1/integration_link/")
  .basicAuth("<CLOSE_API_KEY>", "")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Google Search\",\n  \"type\": \"lead\",\n  \"url\": \"http://google.com/search?q={{lead.display_name}}\"\n}")
  .asString();
```

```php integration_links_create_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.close.com/api/v1/integration_link/', [
  'body' => '{
  "name": "Google Search",
  "type": "lead",
  "url": "http://google.com/search?q={{lead.display_name}}"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<CLOSE_API_KEY>', ''],
]);

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

```csharp integration_links_create_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.close.com/api/v1/integration_link/");
client.Authenticator = new HttpBasicAuthenticator("<CLOSE_API_KEY>", "");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Google Search\",\n  \"type\": \"lead\",\n  \"url\": \"http://google.com/search?q={{lead.display_name}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```