## Create connection

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    containerTag: '<string>',
    containerTags: ['<string>'],
    documentLimit: 5000,
    metadata: {},
    redirectUrl: '<string>'
  })
};

fetch('https://api.supermemory.ai/v3/connections/{provider}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Response Codes

#### 200

```json
{
  "authLink": "<string>",
  "expiresIn": "<string>",
  "id": "<string>",
  "redirectsTo": "<string>"
}
```

### Path Parameters

- **provider**  
  - Type: enum<string>  
  - Required: Yes  
  - Available options:  
    - `notion`
    - `google-drive`
    - `onedrive`
    - `gmail`
    - `github`
    - `web-crawler`
    - `s3`

### Body

- **containerTag**  
  - Type: string  
  - Maximum string length: `100`  
  - Pattern: `^[a-zA-Z0-9_:-]+$`  
- **containerTags**  
  - Type: string[]  
  - Maximum string length: `100`  
  - Pattern: `^[a-zA-Z0-9_:-]+$`  
- **documentLimit**  
  - Type: integer  
  - Required range: `1 <= x <= 10000`  
- **metadata**  
  - Type: object  
- **redirectUrl**  
  - Type: string

### Response

#### 200

- **authLink**  
  - Type: string  
  - Required: Yes  
- **expiresIn**  
  - Type: string  
  - Required: Yes  
- **id**  
  - Type: string  
  - Required: Yes  
- **redirectsTo**  
  - Type: string
