> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywithatoa.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# List Event Types | Webhooks API

> List event types via the Atoa Webhooks API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

Returns all available event types that can be used when creating or updating a webhook endpoint.

### Authorization

Bearer `<token>`

**Response**

<ResponseField name="" type="array">
  Array of event type objects.

  <Expandable>
    <ResponseField name="event" type="string">
      Event type name to use in create/update requests (e.g. `PAYMENTS_STATUS`).
    </ResponseField>

    <ResponseField name="label" type="string">
      Human-readable label (e.g. `Payment Status`).
    </ResponseField>

    <ResponseField name="description" type="string">
      A short description of when this event is triggered.
    </ResponseField>

    <ResponseField name="requiresSigningSecret" type="boolean">
      When `true`, a webhook signing key must be generated before subscribing to this event type. See [Webhook Signing Key](/api-reference/webhook/introduction#signature-verification).
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.atoa.me/api/webhook/v2/event-types \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.atoa.me/api/webhook/v2/event-types"
  headers = { "Authorization": "Bearer <token>" }

  response = requests.request("GET", url, headers=headers)
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  fetch('https://api.atoa.me/api/webhook/v2/event-types', {
    method: 'GET',
    headers: { Authorization: 'Bearer <token>' }
  })
    .then(response => response.json())
    .then(response => console.log(response))
    .catch(err => console.error(err));
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.atoa.me/api/webhook/v2/event-types",
    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 theme={null}
  package main

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

  func main() {

  	url := "https://api.atoa.me/api/webhook/v2/event-types"

  	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))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.get("https://api.atoa.me/api/webhook/v2/event-types")
    .header("Authorization", "Bearer <token>")
    .asString();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    { "event": "PAYMENTS_STATUS", "label": "Payment Status", "description": "Triggered when a payment is completed successfully.", "requiresSigningSecret": false },
    { "event": "EXPIRED_STATUS", "label": "Expired Status", "description": "Triggered when a payment request expires without completion.", "requiresSigningSecret": false },
    { "event": "REFUND_STATUS", "label": "Refund Status", "description": "Triggered when a refund is initiated or completed.", "requiresSigningSecret": false },
    { "event": "POS_PAYMENT_STATUS", "label": "POS Payment Status", "description": "Triggered when a POS payment status changes. Requires a webhook signing secret.", "requiresSigningSecret": true }
  ]
  ```

  ```json 401 theme={null}
  {
    "name": "UNAUTHORIZED",
    "message": "Unauthorized",
    "status": 401,
    "errors": "[]"
  }
  ```
</ResponseExample>
