# PUT /connections/enable — Enable Connection

> Product: **Pabbly Hook** (v1)
> Base URL: `https://hook.pabbly.com/api/v1`
> Auth: Basic via `Authorization` header
> Canonical: `/hook/connection/enable-connection`

Re-activate a previously disabled connection so it can receive webhook requests again.

**Body parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| connection_ids | array | No |  |

**Example request body:**

```json
{
    "connection_ids": ["conn_ee3a07ef5a574f58abc4a2d98a5c2d3b" ]
}
```

**Code examples:**

_cURL_

```curl
curl -X PUT https://hook.pabbly.com/api/v1/connections/enable \
  -u {{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}} \
  -H "Content-Type: application/json" \
  -d '{
    "connection_ids": [
      "conn_ee3a07ef5a574f58abc4a2d98a5c2d3b"
    ]
  }'
```

_Ruby_

```ruby
require 'net/http'
require 'json'

uri = URI('https://hook.pabbly.com/api/v1/connections/enable')
request = Net::HTTP::Put.new(uri)
request.basic_auth '{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'
request['Content-Type'] = 'application/json'
request.body = "{\"connection_ids\":[\"conn_ee3a07ef5a574f58abc4a2d98a5c2d3b\"]}"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(request)
end

data = JSON.parse(response.body)
```

_Python_

```python
import requests
from requests.auth import HTTPBasicAuth

response = requests.put(
    'https://hook.pabbly.com/api/v1/connections/enable',
    auth=HTTPBasicAuth('{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'),
    json={
    'connection_ids': [
        'conn_ee3a07ef5a574f58abc4a2d98a5c2d3b'
    ]
},
)

data = response.json()
```

_PHP_

```php
<?php
$ch = curl_init('https://hook.pabbly.com/api/v1/connections/enable');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_USERPWD, '{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"connection_ids":["conn_ee3a07ef5a574f58abc4a2d98a5c2d3b"]}');

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

_Java_

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

String credentials = Base64.getEncoder().encodeToString("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}".getBytes());

HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
    .uri(URI.create("https://hook.pabbly.com/api/v1/connections/enable"))
    .header("Authorization", "Basic " + credentials)
    .header("Content-Type", "application/json")
    .PUT(HttpRequest.BodyPublishers.ofString("{\"connection_ids\":[\"conn_ee3a07ef5a574f58abc4a2d98a5c2d3b\"]}"));

HttpRequest request = builder.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

_Node.js_

```node
const credentials = Buffer.from('{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}').toString('base64');

const response = await fetch('https://hook.pabbly.com/api/v1/connections/enable', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${credentials}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "connection_ids": [
      "conn_ee3a07ef5a574f58abc4a2d98a5c2d3b"
    ]
  }),
});

const data = await response.json();
```

_Go_

```go
package main

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

func main() {
    payload := strings.NewReader("{\"connection_ids\":[\"conn_ee3a07ef5a574f58abc4a2d98a5c2d3b\"]}")
    req, _ := http.NewRequest("PUT", "https://hook.pabbly.com/api/v1/connections/enable", payload)
    req.Header.Set("Content-Type", "application/json")
    req.SetBasicAuth("{{YOUR_API_KEY}}", "{{YOUR_SECRET_KEY}}")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
```

_.NET_

```dotnet
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}"));

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://hook.pabbly.com/api/v1/connections/enable");
request.Headers.TryAddWithoutValidation("Authorization", $"Basic {credentials}");
request.Content = new StringContent("{\"connection_ids\":[\"conn_ee3a07ef5a574f58abc4a2d98a5c2d3b\"]}");
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");

var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();
Console.WriteLine(data);
```

---

**Other endpoints in Connection:**

- [POST /connections — Create Connection](/hook/connection/create-connection)
- [PATCH /connections/{{connectionId}} — Update Connection](/hook/connection/update-connection)
- [PUT /connections/disable — Disable Connection](/hook/connection/disable-connection)
- [DELETE /connections/ — Delete Connection And Move To Trash](/hook/connection/delete-connection-and-move-to-trash)
- [GET /connections — Filter Connection](/hook/connection/filter-connection)
- [GET /connections/{{connectionId}} — Get Single Connection By Connection_id](/hook/connection/get-single-connection-by-connection-id)

