---
docId: doc_2af927df595a4e6f9aec077fef21f186
title: Enable a database
description: "Enable a connection and restore its tools for agents."
api:
  group: herramientas/bases-de-datos
  auth: bearer
  operations:
    - operationId: enableDatabase
      method: POST
      path: '/v1/tools/databases/{databaseId}/enable'
      postmanName: Enable a database
---

<script>
  import { Ways } from '$lib/components';
</script>

# Enable a database

Set the connection to `enabled`. Agents that already have its tools can use them again without reconnecting them.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X POST https://api.platic.ai/v1/tools/databases/$DB_ID/enable \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.tools.databases.enable("db_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `databaseId` | string | The `id` of the connection | ✓ |

It has no body.

## Response

`200 OK`. `data` has the connection with the fields in [get a database](/api-reference/databases/get#response-fields).

```json
{
  "status": "success",
  "message": "Connection enabled: agents see its tools",
  "data": {
    "id": "Xb2mQe7LtR9sKd4fHw1N",
    "name": "store",
    "status": "enabled",
    "nextStep": "Ready. Give its tools to an agent with PUT /v1/agents/{agentId}/tools/{toolId} and a toolId from tools."
  }
}
```

The example omits some fields of the connection.

## Errors

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `403` | `FORBIDDEN` or `INSUFFICIENT_SCOPE` | The person behind the token does not have access to Integrations, or the token does not have write permission |
| `404` | `NOT_FOUND` | There is no connection with that id in the workspace |

## Notes

- Enabling a connection that is already enabled changes nothing.
