## List EventResponse

### cURL

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

### Python
```python
import requests

url = "https://api.m3ter.com/organizations/{orgId}/events"

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

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

print(response.text)
```

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

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

### PHP
```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.m3ter.com/organizations/{orgId}/events",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  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}/events"

req, _ := http.NewRequest("GET", 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))
}
```

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

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

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

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

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

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

### Response Codes
- **200**
- **4XX**
- **5XX**

### Example Response
```json
{
  "data": [{
    "id": "9cb46d85-7cb6-4637-80a1-d4ec38e4ab30",
    "eventName": "configuration.commitment.created",
    "eventTime": "2022-10-28T13:54:49.557Z",
    "dtActioned": "2022-10-28T13:56:49.557Z",
    "m3terEvent": {
      "eventData": {
        "newDto": {
          "commitmentFeeDescription": "",
          "endDate": "2024-12-31",
          "billingInterval": 1,
          "orgId": "396d788d-5174-XXXX-9d69-YYYY4671fc33",
          "overageSurchargePercent": 5,
          "overageDescription": "",
          "currency": "USD",
          "id": "480d317e-2030-416b-b64b-c07577c418b4",
          "amountSpent": 0,
          "accountCode": "doetech_premium",
          "amount": 15000,
          "billingOffset": 0,
          "lastModifiedBy": "USER_810e3a43-XXXX-4dab-YYYY-470977405b58",
          "billingPlanId": "0409e75a-8a87-43de-aa58-fc6ec823ce37",
          "version": 1,
          "accountId": "1cf2a754-476c-498c-b05a-7d41abfc404d",
          "dtCreated": "2022-10-28T13:54:48.081781Z",
          "amountPrePaid": 0,
          "productIds": ["bec371ef-dbad-4e73-a56a-dadecff2287c"],
          "createdBy": "USER_810e3a43-XXXX-4dab-YYYY-470977405b58",
          "contractId": "68595d6d-261f-496b-bf88-51fc7d2b5ccc",
          "commitmentUsageDescription": "",
          "startDate": "2023-01-01",
          "dtLastModified": "2022-10-28T13:54:48.081781Z"
        }
      }
    }
  }],
  "nextToken": "<string>"
}
```

### Error Response
```json
{
  "message": "<string>"
}
```

### Authorization
- **Authorization**: string, required

### Path Parameters
- **orgId**: string, required

### Query Parameters
- **pageSize**: integer<int32>  
- **ids**: object[]  
- **notificationId**: string  
- **accountId**: string  
- **eventType**: string  
- **notificationCode**: string  
- **includeActioned**: boolean  
- **nextToken**: string  
- **eventName**: string | null  
- **resourceId**: string | null

### Response
- **200 application/json** - Returns list of Events.
