---
title: "Get a webhook"
description: "Returns one webhook. The secret is hidden unless you pass `is_including_secrets=true`."
---

**GET** `https://api.respan.ai/api/webhooks/{id}/`

Returns one webhook. The secret is hidden unless you pass `is_including_secrets=true`.

## Servers

`https://api.respan.ai`: Respan API Server

## Authentication

### RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer &lt;RESPAN_API_KEY&gt;. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -&gt; Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: `bearer`; format: `Respan API key`.


```http
Authorization: Bearer $RESPAN_API_KEY
```


## Path parameters


| Parameter | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `id` | `integer` | Required | Webhook ID.<br />Example: `25` |


## Query parameters


| Parameter | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| `is_including_secrets` | `boolean` | Optional | Set `true` to include the signing secret in `secrets`.<br />Default: `false` |


## Examples

### Get a webhook

#### Headers


```json
{
  "Authorization": "Bearer YOUR_RESPAN_API_KEY"
}
```


#### Path parameters


```json
{
  "id": 25
}
```


#### Query parameters


```json
{
  "is_including_secrets": true
}
```


#### Response


```json
{
  "body": {
    "id": 25,
    "name": "Log sink",
    "url": "https://example.com/respan/webhook",
    "event_type": "request_log",
    "active": true,
    "organization_key": null,
    "organization_key_name": null,
    "project": "36253bba-bb22-40f9-9f83-c87baac9a833",
    "created": "2026-11-23T01:00:00Z",
    "secrets": "whsec_3f9a..."
  }
}
```


## Responses

### 200

The webhook.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object and object` | Body | Reference: `#/components/schemas/WebhookWithSecret` |
| `$ (allOf 1)` | `object` | Schema variant | Reference: `#/components/schemas/Webhook` |
| `$ (allOf 1).id` | `integer` | Required in parent | Webhook ID.<br />Read only<br />Example: `25` |
| `$ (allOf 1).name` | `string` | Optional | Display name.<br />Maximum length: `70`<br />Example: `"Log sink"` |
| `$ (allOf 1).url` | `string` | Required in parent | HTTPS endpoint that receives the events.<br />Format: `uri`<br />Maximum length: `200`<br />Example: `"https://example.com/respan/webhook"` |
| `$ (allOf 1).event_type` | `string` | Optional | Event that triggers the webhook.<br />Reference: `#/components/schemas/WebhookEventType`<br />Allowed: `"request_log"`, `"on_eval_result_ingested"`, `"trace_completed"`, `"customer_budget_limit_reached"`, `"credit_low_balance_threshold_reached"`, `"limit_policy_soft_triggered"`, `"limit_policy_hard_triggered"`<br />Default: `request_log`<br />Example: `"request_log"` |
| `$ (allOf 1).active` | `boolean` | Optional | Whether events are sent.<br />Default: `true`<br />Example: `true` |
| `$ (allOf 1).organization_key` | `string or null` | Optional | Only send events for this API key (its ID). `null` sends events for every key.<br />Example: `null` |
| `$ (allOf 1).organization_key_name` | `string or null` | Optional | Name of the linked API key.<br />Read only<br />Example: `null` |
| `$ (allOf 1).project` | `string or null` | Optional | Project ID.<br />Read only<br />Example: `"36253bba-bb22-40f9-9f83-c87baac9a833"` |
| `$ (allOf 1).created` | `string` | Optional | Format: `date-time`<br />Read only<br />Example: `"2026-11-23T01:00:00Z"` |
| `$ (allOf 2)` | `object` | Schema variant | - |
| `$ (allOf 2).secrets` | `string` | Required in parent | Signing secret for verifying deliveries. Returned on create, and on get with `is_including_secrets=true`.<br />Read only<br />Example: `"whsec_3f9a..."` |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "$ref": "#/components/schemas/WebhookWithSecret"
}
```

</details>

##### Example


```json
{
  "id": 25,
  "name": "Log sink",
  "url": "https://example.com/respan/webhook",
  "event_type": "request_log",
  "active": true,
  "organization_key": null,
  "organization_key_name": null,
  "project": "36253bba-bb22-40f9-9f83-c87baac9a833",
  "created": "2026-11-23T01:00:00Z"
}
```


### 403

The API key is missing, invalid or expired.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | - |
| `detail` | `string` | Required in parent | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
```

</details>

##### Example


```json
{
  "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
```


### 404

No webhook with that ID in this project.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | - |
| `detail` | `string` | Optional | - |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
```

</details>

##### Example


```json
{
  "detail": "No Webhook matches the given query."
}
```


## OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

<!-- openapi-operation:start -->
<details class="api-schema-source">
<summary>OpenAPI operation</summary>


```json
{
  "summary": "Get a webhook",
  "operationId": "getWebhook",
  "tags": [
    "Webhooks"
  ],
  "description": "Returns one webhook. The secret is hidden unless you pass `is_including_secrets=true`.",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "Webhook ID.",
      "example": 25
    },
    {
      "name": "is_including_secrets",
      "in": "query",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      },
      "description": "Set `true` to include the signing secret in `secrets`."
    }
  ],
  "responses": {
    "200": {
      "description": "The webhook.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/WebhookWithSecret"
          },
          "example": {
            "id": 25,
            "name": "Log sink",
            "url": "https://example.com/respan/webhook",
            "event_type": "request_log",
            "active": true,
            "organization_key": null,
            "organization_key_name": null,
            "project": "36253bba-bb22-40f9-9f83-c87baac9a833",
            "created": "2026-11-23T01:00:00Z"
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    },
    "404": {
      "description": "No webhook with that ID in this project.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "No Webhook matches the given query."
          }
        }
      }
    }
  },
  "security": [
    {
      "RespanApiKey": []
    }
  ],
  "x-fern-examples": [
    {
      "name": "Get a webhook",
      "headers": {
        "Authorization": "Bearer YOUR_RESPAN_API_KEY"
      },
      "path-parameters": {
        "id": 25
      },
      "query-parameters": {
        "is_including_secrets": true
      },
      "response": {
        "body": {
          "id": 25,
          "name": "Log sink",
          "url": "https://example.com/respan/webhook",
          "event_type": "request_log",
          "active": true,
          "organization_key": null,
          "organization_key_name": null,
          "project": "36253bba-bb22-40f9-9f83-c87baac9a833",
          "created": "2026-11-23T01:00:00Z",
          "secrets": "whsec_3f9a..."
        }
      }
    }
  ]
}
```

</details>
<!-- openapi-operation:end -->

<!-- openapi-path-item:start -->
<details class="api-schema-source">
<summary>OpenAPI path metadata</summary>


```json
{}
```

</details>
<!-- openapi-path-item:end -->

<!-- openapi-components:start -->
<details class="api-schema-source">
<summary>Referenced OpenAPI components</summary>


```json
{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "schemas": {
    "Webhook": {
      "type": "object",
      "required": [
        "id",
        "url"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true,
          "description": "Webhook ID.",
          "example": 25
        },
        "name": {
          "type": "string",
          "maxLength": 70,
          "description": "Display name.",
          "example": "Log sink"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "maxLength": 200,
          "description": "HTTPS endpoint that receives the events.",
          "example": "https://example.com/respan/webhook"
        },
        "event_type": {
          "$ref": "#/components/schemas/WebhookEventType"
        },
        "active": {
          "type": "boolean",
          "default": true,
          "description": "Whether events are sent.",
          "example": true
        },
        "organization_key": {
          "type": "string",
          "nullable": true,
          "description": "Only send events for this API key (its ID). `null` sends events for every key.",
          "example": null
        },
        "organization_key_name": {
          "type": "string",
          "nullable": true,
          "readOnly": true,
          "description": "Name of the linked API key.",
          "example": null
        },
        "project": {
          "type": "string",
          "nullable": true,
          "readOnly": true,
          "description": "Project ID.",
          "example": "36253bba-bb22-40f9-9f83-c87baac9a833"
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "example": "2026-11-23T01:00:00Z"
        }
      }
    },
    "WebhookEventType": {
      "type": "string",
      "enum": [
        "request_log",
        "on_eval_result_ingested",
        "trace_completed",
        "customer_budget_limit_reached",
        "credit_low_balance_threshold_reached",
        "limit_policy_soft_triggered",
        "limit_policy_hard_triggered"
      ],
      "default": "request_log",
      "description": "Event that triggers the webhook.",
      "example": "request_log"
    },
    "WebhookWithSecret": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Webhook"
        },
        {
          "type": "object",
          "required": [
            "secrets"
          ],
          "properties": {
            "secrets": {
              "type": "string",
              "readOnly": true,
              "description": "Signing secret for verifying deliveries. Returned on create, and on get with `is_including_secrets=true`.",
              "example": "whsec_3f9a..."
            }
          }
        }
      ]
    }
  },
  "securitySchemes": {
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}
```

</details>
<!-- openapi-components:end -->
