--- title: 'Creating connections' description: 'Create a connection to sync your content with supermemory' --- To create a connection, just make a `POST` request to `/v3/connections/{provider}` ```typescript Typescript import Supermemory from 'supermemory'; const client = new Supermemory({ apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted }); const connection = await client.connections.create('notion'); console.debug(connection.authLink); ``` ```python Python import requests url = "https://api.supermemory.ai/v3/connections/{provider}" payload = { "redirectUrl": "", "containerTags": [""], "metadata": {}, "documentLimit": 5000 } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.request("POST", url, json=payload, headers=headers) print(response.text) ``` ```bash cURL curl --request POST \ --url https://api.supermemory.ai/v3/connections/{provider} \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "redirectUrl": "", "containerTags": [ "" ], "metadata": {}, "documentLimit": 5000 }' ``` ### Parameters - `provider`: The provider to connect to. Currently supported providers are `notion`, `google-drive`, `one-drive` - `redirectUrl`: The URL to redirect to after the connection is created (your app URL) - `containerTags`: Optional. For partitioning users, organizations, etc. in your app. - Example: `["user_123", "project_alpha"]` - `metadata`: Optional. Any metadata you want to associate with the connection. - This metadata is added to every document synced from this connection. - `documentLimit`: Optional. The maximum number of documents to sync from this connection. - Default: 10,000 - This can be used to limit costs and sync a set number of documents for a specific user. ## Response supermemory sends a response with the following schema: ```json { "id": "", "authLink": "", "expiresIn": "", "redirectsTo": "" } ``` You can use the `authLink` to redirect the user to the provider's login page. Next up, managing connections.