# Retrieve webhook endpoint

GET https://api.cash.app/management/v1/webhook-endpoints/{webhook_endpoint_id}

Returns the webhook endpoint matching the `webhook_endpoint_id` provided.

Scopes: `WEBHOOK_CONFIG_READ`

Reference: https://developers.cash.app/cash-app-pay-partner-api/api-reference/management-api/retrieve-webhook-endpoint

## OpenAPI Specification

```yaml
openapi: 3.1.1
info:
  title: Retrieve webhook endpoint
  version: endpoint_webhooks.retrieve-webhook-endpoint
paths:
  /webhook-endpoints/{webhook_endpoint_id}:
    get:
      operationId: retrieve-webhook-endpoint
      summary: Retrieve webhook endpoint
      description: >-
        Returns the webhook endpoint matching the `webhook_endpoint_id`
        provided.


        Scopes: `WEBHOOK_CONFIG_READ`
      tags:
        - - subpackage_webhooks
      parameters:
        - name: webhook_endpoint_id
          in: path
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          schema:
            type: string
        - name: X-Region
          in: header
          required: true
          schema:
            type: string
        - name: X-Signature
          in: header
          required: true
          schema:
            type: string
        - name: User-Agent
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/webhooks_retrieve-webhook-endpoint_Response_200
        '404':
          description: Not Found
          content: {}
components:
  schemas:
    EventType:
      type: string
      enum:
        - value: customer.created
        - value: customer.deleted
        - value: customer.updated
        - value: customer_request.state.updated
        - value: dispute.created
        - value: dispute.state.updated
        - value: grant.created
        - value: grant.status.updated
        - value: merchant.status.updated
        - value: payment.status.updated
        - value: refund.status.updated
    ApiVersion:
      type: string
      enum:
        - value: v1
    EventConfiguration:
      type: object
      properties:
        event_type:
          $ref: '#/components/schemas/EventType'
        api_version:
          $ref: '#/components/schemas/ApiVersion'
      required:
        - event_type
        - api_version
    WebhookEndpointStatus:
      type: string
      enum:
        - value: APPROVED
        - value: ENDPOINT_URL_UNDER_REVIEW
    WebhookEndpoint:
      type: object
      properties:
        id:
          type: string
          description: The unique ID for a webhook endpoint issued by Cash App.
        api_key_id:
          type: string
          description: >-
            The API key ID which will be used to sign requests made to this
            webhook endpoint.
        reference_id:
          type: string
          description: >-
            A user-defined identifier for this webhook endpoint, typically used
            to associate the webhook endpoint with a record in an external
            system.
        url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            The events are delivered to this endpoint URL. If NULL, events will
            be not be delivered to an endpoint but will still be persisted and
            accessible via the List Webhook Events API.
        event_configurations:
          type: array
          items:
            $ref: '#/components/schemas/EventConfiguration'
          description: >-
            The list of supported event types for this webhook endpoint. Events
            of a particular type will only be sent to endpoints that contain the
            type in this list.
        created_at:
          type: string
          format: date-time
          description: The timestamp of when this webhook endpoint was created.
        updated_at:
          type: string
          format: date-time
          description: The timestamp of when this endpoint was last updated.
        delivery_timeout:
          type: number
          format: double
          default: 5000
          description: >-
            The duration, in milliseconds, that Cash App will take to deliver an
            event to this endpoint before timing out.
        max_delivery_frequency:
          type:
            - number
            - 'null'
          format: double
          description: >-
            The maximum number of events per second that will be delivered to
            this endpoint before rate limiting kicks in. The default for this
            field is unset (NULL) which means no rate limiting. However, if you
            enable rate limiting, the values can range from 1 to 100000.
        status:
          $ref: '#/components/schemas/WebhookEndpointStatus'
      required:
        - id
        - api_key_id
        - url
        - event_configurations
        - created_at
        - updated_at
        - delivery_timeout
        - status
    webhooks_retrieve-webhook-endpoint_Response_200:
      type: object
      properties:
        webhook_endpoint:
          $ref: '#/components/schemas/WebhookEndpoint'
      required:
        - webhook_endpoint

```

## SDK Code Examples

```python
import requests

url = "https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id"

headers = {
    "Accept": "Accept",
    "X-Region": "X-Region",
    "X-Signature": "X-Signature",
    "User-Agent": "User-Agent"
}

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

print(response.json())
```

```javascript
const url = 'https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id';
const options = {
  method: 'GET',
  headers: {
    Accept: 'Accept',
    'X-Region': 'X-Region',
    'X-Signature': 'X-Signature',
    'User-Agent': 'User-Agent'
  }
};

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

```go
package main

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

func main() {

	url := "https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id"

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

	req.Header.Add("Accept", "Accept")
	req.Header.Add("X-Region", "X-Region")
	req.Header.Add("X-Signature", "X-Signature")
	req.Header.Add("User-Agent", "User-Agent")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

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

url = URI("https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id")

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

request = Net::HTTP::Get.new(url)
request["Accept"] = 'Accept'
request["X-Region"] = 'X-Region'
request["X-Signature"] = 'X-Signature'
request["User-Agent"] = 'User-Agent'

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

```java
HttpResponse<String> response = Unirest.get("https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id")
  .header("Accept", "Accept")
  .header("X-Region", "X-Region")
  .header("X-Signature", "X-Signature")
  .header("User-Agent", "User-Agent")
  .asString();
```

```php
<?php

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id', [
  'headers' => [
    'Accept' => 'Accept',
    'User-Agent' => 'User-Agent',
    'X-Region' => 'X-Region',
    'X-Signature' => 'X-Signature',
  ],
]);

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

```csharp
var client = new RestClient("https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "Accept");
request.AddHeader("X-Region", "X-Region");
request.AddHeader("X-Signature", "X-Signature");
request.AddHeader("User-Agent", "User-Agent");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "Accept",
  "X-Region": "X-Region",
  "X-Signature": "X-Signature",
  "User-Agent": "User-Agent"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cash.app/management/v1/webhook-endpoints/webhook_endpoint_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```