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

# Get Webhook Template UUID by Name

> Retrieve the UUID of a webhook template by providing its name

Retrieve the UUID of a webhook template by providing its name.

## Base URL

All API requests should be made to:

```
https://api.hookpulse.io
```

## Example request

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.hookpulse.io/v1/api/get_webhook_template_uuid/ \
    -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
    -H "x-brand-uuid: {{x-brand-uuid}}" \
    -H "Content-Type: application/json" \
    -d '{
      "webhook_name": "{{webhook_name}}"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.hookpulse.io/v1/api/get_webhook_template_uuid/', {
    method: 'POST',
    headers: {
      'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
      'x-brand-uuid': '{{x-brand-uuid}}',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      webhook_name: '{{webhook_name}}'
    })
  });

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

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

  url = 'https://api.hookpulse.io/v1/api/get_webhook_template_uuid/'
  headers = {
      'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
      'x-brand-uuid': '{{x-brand-uuid}}',
      'Content-Type': 'application/json'
  }
  payload = {
      'webhook_name': '{{webhook_name}}'
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.json())
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'json'
  require 'uri'

  uri = URI('https://api.hookpulse.io/v1/api/get_webhook_template_uuid/')
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Post.new(uri.path)
  request['x-hookpulse-api-key'] = '{{x-hookpulse-api-key}}'
  request['x-brand-uuid'] = '{{x-brand-uuid}}'
  request['Content-Type'] = 'application/json'
  request.body = {
    webhook_name: '{{webhook_name}}'
  }.to_json

  response = http.request(request)
  puts JSON.parse(response.body)
  ```

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

  $url = 'https://api.hookpulse.io/v1/api/get_webhook_template_uuid/';
  $data = [
      'webhook_name' => '{{webhook_name}}'
  ];

  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'x-hookpulse-api-key: {{x-hookpulse-api-key}}',
      'x-brand-uuid: {{x-brand-uuid}}',
      'Content-Type: application/json'
  ]);

  $response = curl_exec($ch);
  curl_close($ch);

  echo $response;
  ?>
  ```
</RequestExample>

## Request body

| Field          | Type   | Required | Description                  |
| -------------- | ------ | -------- | ---------------------------- |
| `webhook_name` | string | Yes      | Name of the webhook template |

## Example response

### Success response

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "webhook_uuid": "{{webhook_uuid}}"
  }
  ```
</ResponseExample>

### Error response

<ResponseExample>
  ```json theme={null}
  {
    "error": "Webhook not found",
    "success": false
  }
  ```
</ResponseExample>

## Response fields

### Success response

| Field          | Type    | Description                                                        |
| -------------- | ------- | ------------------------------------------------------------------ |
| `success`      | boolean | Indicates if the request was successful (always `true` on success) |
| `webhook_uuid` | string  | Unique identifier for the webhook template                         |

### Error response

| Field     | Type    | Description                                                       |
| --------- | ------- | ----------------------------------------------------------------- |
| `success` | boolean | Indicates if the request was successful (always `false` on error) |
| `error`   | string  | Error message describing what went wrong                          |


## OpenAPI

````yaml POST /v1/api/get_webhook_template_uuid/
openapi: 3.0.3
info:
  title: Hookpulse API
  description: >-
    Complete API documentation for Hookpulse. Build powerful integrations with
    our RESTful API.
  version: 1.0.0
  contact:
    name: Hookpulse Support
    email: care@hookpulse.io
    url: https://hookpulse.io
servers:
  - url: https://api.hookpulse.io
    description: Production server
security:
  - apiKeyAuth: []
    brandUuidAuth: []
paths:
  /v1/api/get_webhook_template_uuid/:
    post:
      description: Retrieve the UUID of a webhook template by providing its name
      requestBody:
        description: Webhook template lookup by name
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetWebhookTemplateUuidByNameRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWebhookTemplateUuidByNameResponse'
        '400':
          description: Bad request or webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWebhookTemplateUuidByNameErrorResponse'
components:
  schemas:
    GetWebhookTemplateUuidByNameRequest:
      required:
        - webhook_name
      type: object
      properties:
        webhook_name:
          type: string
          description: Name of the webhook template
    GetWebhookTemplateUuidByNameResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        webhook_uuid:
          type: string
          description: Unique identifier for the webhook template
    GetWebhookTemplateUuidByNameErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        error:
          type: string
          description: Error message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-hookpulse-api-key
      description: >-
        API key for authentication. Get this from your dashboard by selecting a
        brand and going to API Keys section.
    brandUuidAuth:
      type: apiKey
      in: header
      name: x-brand-uuid
      description: >-
        Brand UUID for authentication. Get this from your dashboard after adding
        a brand - it will be displayed in the UI.

````