---
title: find-a-drain-by-id
product: vercel
url: /docs/rest-api/drains/find-a-drain-by-id
canonical_url: "https://vercel.com/docs/rest-api/drains/find-a-drain-by-id"
last_updated: 2026-10-23
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about find-a-drain-by-id on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Find a Drain by id

```http
GET /v1/drains/{id}
```

Get the information for a specific Drain by passing the drain id in the URL.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes |  |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `includeDeliveryStats` | boolean. default: false | No | Include `deliveryStats` with the delivery health of the drain over the last 24 hours. |
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v1/drains/id?includeDeliveryStats=true&teamId=string&slug=string', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

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

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v1/drains/id?includeDeliveryStats=true&teamId=string&slug=string', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X GET 'https://api.vercel.com/v1/drains/id?includeDeliveryStats=true&teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
{
  "createdAt": "123",
  "delivery": {
    "compression": "gzip",
    "encoding": "json",
    "endpoint": "string",
    "headers": "value",
    "secret": "string",
    "type": "http"
  },
  "disabledAt": "123",
  "disabledBy": "string",
  "disabledReason": "account-plan-downgrade",
  "firstErrorTimestamp": "123",
  "id": "icfg_1234567890",
  "name": "Example Name",
  "ownerId": "example_id",
  "projectIds": [],
  "sampling": [
    {
      "env": "preview",
      "rate": "123",
      "requestPath": "string",
      "type": "head_sampling"
    }
  ],
  "schemas": {
    "ai_gateway": "value",
    "analytics": "value",
    "audit_log": "value",
    "connect": "value",
    "log": "value",
    "speed_insights": "value",
    "trace": "value"
  },
  "source": {
    "defaultFor": "eve-tracing",
    "kind": "self-served"
  },
  "status": "disabled",
  "teamId": "example_id",
  "updatedAt": "123",
  "deliveryStats": {
    "attempts": "123",
    "failures": "123",
    "state": "failing",
    "window": "24h"
  },
  "filterV2": {
    "filter": {
      "deployment": {},
      "log": {},
      "project": {},
      "type": "basic"
    },
    "version": "v2"
  }
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "createdAt",
    "delivery",
    "id",
    "name",
    "ownerId",
    "schemas",
    "source",
    "updatedAt"
  ],
  "properties": {
    "createdAt": {
      "type": "number"
    },
    "delivery": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "encoding",
            "endpoint",
            "headers",
            "type"
          ],
          "properties": {
            "compression": {
              "type": "string",
              "enum": [
                "gzip",
                "none"
              ]
            },
            "encoding": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            },
            "endpoint": {
              "type": "string"
            },
            "headers": {
              "type": "object"
            },
            "secret": {},
            "type": {
              "type": "string",
              "enum": [
                "http"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "encoding",
            "endpoint",
            "headers",
            "type"
          ],
          "properties": {
            "encoding": {
              "type": "string",
              "enum": [
                "json",
                "proto"
              ]
            },
            "endpoint": {
              "type": "object",
              "required": [
                "traces"
              ]
            },
            "headers": {
              "type": "object"
            },
            "secret": {},
            "type": {
              "type": "string",
              "enum": [
                "otlphttp"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "endpoint",
            "table",
            "type"
          ],
          "properties": {
            "endpoint": {
              "type": "string"
            },
            "table": {
              "type": "string"
            },
            "type": {
              "type": "string",
              "enum": [
                "clickhouse"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "compression",
            "encoding",
            "endpoint",
            "fileStructure",
            "region",
            "roleArn",
            "type"
          ],
          "properties": {
            "compression": {
              "type": "string",
              "enum": [
                "none"
              ]
            },
            "encoding": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            },
            "endpoint": {
              "type": "string"
            },
            "fileStructure": {
              "type": "string",
              "enum": [
                "hive"
              ]
            },
            "objectAcl": {
              "type": "string",
              "enum": [
                "authenticated-read",
                "aws-exec-read",
                "bucket-owner-full-control",
                "bucket-owner-read",
                "private",
                "public-read",
                "public-read-write"
              ]
            },
            "region": {
              "type": "string"
            },
            "roleArn": {
              "type": "string"
            },
            "serverSideEncryption": {
              "type": "string",
              "enum": [
                "AES256",
                "aws:kms",
                "aws:kms:dsse"
              ]
            },
            "type": {
              "type": "string",
              "enum": [
                "s3"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "target",
            "type"
          ],
          "properties": {
            "target": {
              "type": "string",
              "enum": [
                "vercel-otel-traces-db"
              ]
            },
            "type": {
              "type": "string",
              "enum": [
                "internal"
              ]
            }
          }
        }
      ]
    },
    "disabledAt": {
      "type": "number"
    },
    "disabledBy": {
      "type": "string"
    },
    "disabledReason": {
      "type": "string",
      "enum": [
        "account-plan-downgrade",
        "disabled-by-admin",
        "disabled-by-owner",
        "feature-not-available",
        "limits-exceeded"
      ]
    },
    "firstErrorTimestamp": {
      "type": "number"
    },
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "projectIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sampling": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "rate",
          "type"
        ],
        "properties": {
          "env": {
            "type": "string",
            "enum": [
              "preview",
              "production"
            ]
          },
          "rate": {
            "type": "number"
          },
          "requestPath": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "head_sampling"
            ]
          }
        }
      }
    },
    "schemas": {
      "type": "object",
      "properties": {
        "ai_gateway": {
          "type": "object"
        },
        "analytics": {
          "type": "object"
        },
        "audit_log": {
          "type": "object"
        },
        "connect": {
          "type": "object"
        },
        "log": {
          "type": "object"
        },
        "speed_insights": {
          "type": "object"
        },
        "trace": {
          "type": "object"
        }
      }
    },
    "source": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "defaultFor": {
              "type": "string",
              "description": "Informational marker for a system-owned default drain.",
              "enum": [
                "eve-tracing"
              ]
            },
            "kind": {
              "type": "string",
              "enum": [
                "self-served"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "integrationConfigurationId",
            "integrationId",
            "kind"
          ],
          "properties": {
            "externalResourceId": {
              "type": "string"
            },
            "integrationConfigurationId": {
              "type": "string"
            },
            "integrationId": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "integration"
              ]
            },
            "resourceId": {
              "type": "string"
            }
          }
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "disabled",
        "enabled",
        "errored"
      ]
    },
    "teamId": {
      "type": "string",
      "nullable": true
    },
    "updatedAt": {
      "type": "number"
    },
    "deliveryStats": {
      "type": "object",
      "description": "Delivery health of a drain over the last 24 hours: `failing` when more than 5 delivery attempts and at least 1% of all attempts did not succeed, `healthy` otherwise, and `unknown` when there were no attempts or the stats could not be loaded.",
      "required": [
        "attempts",
        "failures",
        "state",
        "window"
      ],
      "properties": {
        "attempts": {
          "type": "number",
          "description": "All delivery attempts in the window."
        },
        "failures": {
          "type": "number",
          "description": "Delivery attempts that did not succeed in the window."
        },
        "state": {
          "type": "string",
          "enum": [
            "failing",
            "healthy",
            "unknown"
          ]
        },
        "window": {
          "type": "string",
          "enum": [
            "24h"
          ]
        }
      }
    },
    "filterV2": {
      "type": "object",
      "required": [
        "filter",
        "version"
      ],
      "properties": {
        "filter": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "text",
                "type"
              ]
            }
          ]
        },
        "version": {
          "type": "string",
          "enum": [
            "v2"
          ]
        }
      }
    }
  }
}
```

### 400: One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

### 503: The delivery stats could not be loaded. Retry, or omit `includeDeliveryStats`.

---

## Related

- [drains endpoints](/docs/rest-api#drains)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)


If you find anything wrong or missing or can't find something, submit feedback by reading https://vercel.com/feedback.md to improve Vercel.
