---
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-09-16
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 |
|---|---|---|---|
| `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?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?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?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": {
    "kind": "self-served"
  },
  "status": "disabled",
  "teamId": "example_id",
  "updatedAt": "123",
  "filterV2": {
    "filter": {
      "deployment": {},
      "log": {},
      "project": {},
      "type": "basic"
    },
    "version": "v2"
  }
}
```

## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "createdAt",
        "delivery",
        "id",
        "name",
        "ownerId",
        "schemas",
        "source",
        "updatedAt"
      ],
      "properties": {
        "createdAt": {
          "type": "number"
        },
        "delivery": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "endpoint",
                "table",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "compression",
                "encoding",
                "endpoint",
                "fileStructure",
                "region",
                "roleArn",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "target",
                "type"
              ]
            }
          ]
        },
        "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"
            ]
          }
        },
        "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"
              ]
            },
            {
              "type": "object",
              "required": [
                "integrationConfigurationId",
                "integrationId",
                "kind"
              ]
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "disabled",
            "enabled",
            "errored"
          ]
        },
        "teamId": {
          "type": "string",
          "nullable": true
        },
        "updatedAt": {
          "type": "number"
        },
        "filterV2": {
          "type": "object",
          "required": [
            "filter",
            "version"
          ],
          "properties": {
            "filter": {},
            "version": {
              "type": "string",
              "enum": [
                "v2"
              ]
            }
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "createdAt",
        "delivery",
        "id",
        "name",
        "ownerId",
        "schemas",
        "source",
        "updatedAt"
      ],
      "properties": {
        "createdAt": {
          "type": "number"
        },
        "delivery": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "endpoint",
                "table",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "compression",
                "encoding",
                "endpoint",
                "fileStructure",
                "region",
                "roleArn",
                "type"
              ]
            },
            {
              "type": "object",
              "required": [
                "target",
                "type"
              ]
            }
          ]
        },
        "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"
            ]
          }
        },
        "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"
              ]
            },
            {
              "type": "object",
              "required": [
                "integrationConfigurationId",
                "integrationId",
                "kind"
              ]
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "disabled",
            "enabled",
            "errored"
          ]
        },
        "teamId": {
          "type": "string",
          "nullable": true
        },
        "updatedAt": {
          "type": "number"
        },
        "filterV2": {
          "type": "object",
          "required": [
            "filter",
            "version"
          ],
          "properties": {
            "filter": {},
            "version": {
              "type": "string",
              "enum": [
                "v2"
              ]
            }
          }
        },
        "integrationConfigurationUri": {
          "type": "string"
        },
        "integrationIcon": {
          "type": "string"
        },
        "integrationWebsite": {
          "type": "string"
        },
        "projectAccess": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "access",
                "managedBy"
              ]
            },
            {
              "type": "object",
              "required": [
                "access",
                "managedBy",
                "projectIds"
              ]
            }
          ]
        }
      }
    }
  ]
}
```

### 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

---

## Related

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

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

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

---

[View full sitemap](/docs/sitemap)
