## Enable IntegrationConfig

### cURL

```bash
curl --request POST \
  --url https://api.m3ter.com/organizations/{orgId}/integrationconfigs/{id}/enable \
  --header 'Authorization: Bearer <token>'
```

### Python

```python
import requests

url = "https://api.m3ter.com/organizations/{orgId}/integrationconfigs/{id}/enable"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

### JavaScript (Fetch)

```javascript
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.m3ter.com/organizations/{orgId}/integrationconfigs/{id}/enable', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### PHP

```php
$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://api.m3ter.com/organizations/{orgId}/integrationconfigs/{id}/enable",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "POST",\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

### Go

```go
package main

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

func main() {

url := "https://api.m3ter.com/organizations/{orgId}/integrationconfigs/{id}/enable"

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

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))
}
```

### Java (Unirest)

```java
HttpResponse<String> response = Unirest.post("https://api.m3ter.com/organizations/{orgId}/integrationconfigs/{id}/enable")
  .header("Authorization", "Bearer <token>")
  .asString();
```

### Ruby

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.m3ter.com/organizations/{orgId}/integrationconfigs/{id}/enable")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

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

### Response Codes

- **200**: Success
- **4XX**: Client Error
- **5XX**: Server Error

### Example Response

```json
{
  "id": "<string>",
  "entityType": "Bill",
  "destination": "Stripe",
  "version": 123,
  "dtCreated": "2023-11-07T05:31:56Z",
  "dtLastModified": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedBy": "<string>",
  "entityId": "00000000-0000-0000-0000-000000000000",
  "destinationId": "00000000-0000-0000-0000-000000000000",
  "configData": {},
  "authorized": true,
  "enabled": true,
  "integrationCredentialsId": "00000000-0000-0000-0000-000000000000",
  "name": "My Integration"
}
```

```json
{
  "message": "<string>"
}
```

```json
{
  "message": "<string>"
}
```

### Authorization
- **Authorization**: string (header required)
  - m3ter supports machine-to-machine authentication using the `clientCredentials` OAuth2 flow.

### Path Parameters
- **orgId**: string (required) - The unique identifier (UUID) of your Organization. 
- **id**: string (required) - UUID of the integration configuration

### Response Fields
- **id**: string (required) - The UUID of the entity.
- **entityType**: string (required) - The type of entity (e.g., Bill).
- **destination**: string (required) - The type of destination (e.g., Stripe).
- **version**: integer - The version number.
- **dtCreated**: string - Creation date.
- **dtLastModified**: string - Last modified date.
- **createdBy**: string - ID of the user who created this item.
- **lastModifiedBy**: string - ID of the last user who modified this item.
- **entityId**: string - UUID of the entity this integration is for.
- **destinationId**: string - UUID of the destination entity.
- **configData**: object - The configuration data for the integration.
- **authorized**: boolean - Authorization status.
- **enabled**: boolean - Whether integration is enabled.
- **integrationCredentialsId**: string - UUID of the credentials to use for this integration.
- **name**: string - The name of the integration configuration.
