# Get Webhook Rule

> Management API · Webhook Rules

```http
GET https://app.mk.io/api/v1/projects/{project_name}/webhook/rules/{rule_name}
```

Gets webhook rule by name.

RBAC Capability Required: `webhooks.config.get`

## Authentication

- `Authorization` header — Bearer authentication of the form `Bearer <token>`.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_name` | string | Yes | — |
| `rule_name` | string | Yes | — |

## Example request

```bash
curl -X GET "https://app.mk.io/api/v1/projects/{project_name}/webhook/rules/{rule_name}" \
  -H "Authorization: Bearer <token>"
```

## Responses

### 200 — A single Webhook Rule

- `metadata` · object · **Required** — Webhook rule metadata.
  - `id` · string · **Required** · _format: uuid_ — The ID of the webhook.
  - `name` · string · **Required** — The name of the webhook. Unique within a project.
- `spec` · object · **Required** — Webhook rule spec.
  - `authentication` · object · Optional — Authentication details.
    - `headers` · map from strings to string · Optional — Authentication headers.
      - `[any key]` · string — map of additional properties
    - `queryParams` · map from strings to string · Optional — Authentication query parameters.
      - `[any key]` · string — map of additional properties
  - `enabled` · boolean · **Required** — Indicates whether the webhook is enabled.
  - `events` · list of enums · **Required** — List of events that trigger the webhook.
    - Array items (enum):
  - `headers` · map from strings to string · Optional — Headers to include in the webhook request.
    - `[any key]` · string — map of additional properties
  - `queryParams` · map from strings to string · Optional — Query parameters to include in the webhook request.
    - `[any key]` · string — map of additional properties
  - `url` · string · **Required** — The URL the webhook should call.

Example:

```json
{
  "metadata": {
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string"
  },
  "spec": {
    "authentication": {
      "headers": {
        "key": "string"
      },
      "queryParams": {
        "key": "string"
      }
    },
    "enabled": true,
    "events": [
      "MediaKind.JobStarted"
    ],
    "headers": {
      "key": "string"
    },
    "queryParams": {
      "key": "string"
    },
    "url": "string"
  }
}
```

### 400 — Bad Request

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 401 — Unauthorized

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 403 — Forbidden

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 404 — Not Found

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 429 — Too Many Requests

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 500 — Internal Server Error

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

---

Source spec: `management-api` · operationId: `[get]_/api/v1/projects/{project_name}/webhook/rules/{rule_name}`
