# Link a Furcate database by id

`POST /datasources` · Rivier · hosting

Link a Furcate database by id; the database service checks the read role was made for this project.

- Scope: hosting:write
- Sdk: hosting.dataSource.link
- Cli: hosting data source link
- Events: hosting.dataSource.linked

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "databaseId": {
      "type": "string",
      "maxLength": 64
    },
    "label": {
      "type": "string",
      "maxLength": 120
    },
    "roleName": {
      "type": "string",
      "maxLength": 63
    }
  },
  "required": [
    "databaseId"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/datasources' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "databaseId": "string"
}'
```
