# Create Mongo Collection Sync

**POST** `/v0/documentCollections/mongodb/createMongoSync`

Credal lets you easily sync your MongoDB data for use in Collections and Agents. Create a new sync from a MongoDB collection to a Credal collection.

Base URL: `https://api.credal.ai/api`

Tags: `documentCollections`

## Authorization

| Option | Scheme | Type | Sent as | Scopes |
| --- | --- | --- | --- | --- |
| Option 1 | `BearerAuthScheme` | `http` | `Authorization: Bearer <token>` | — |

## Request body

Optional. Media type: `application/json`

### Example request body

```json
{
  "collectionId": "00000000-0000-0000-0000-000000000000",
  "config": {
    "collectionName": "string",
    "filterExpression": null,
    "sourceFields": {
      "body": "string",
      "sourceName": "string",
      "sourceSystemUpdated": "string",
      "sourceUrl": "string"
    },
    "syncName": "string"
  },
  "mongoURI": "string"
}
```

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `200` | Response with status 200 | `application/json` |

### Example response: 200 — Response with status 200

```json
{
  "mongoCredentialId": "00000000-0000-0000-0000-000000000000",
  "resourceId": "string",
  "syncLaunched": true
}
```

## Related pages

- [Add Collection To Copilot](./copilots_addcollectiontocopilot.md)
- [Add Documents To Collection](./documentcollections_adddocumentstocollection.md)
- [API Reference](../../api.md)
- [copilots](./tags/copilots.md)
- [Create Collection](./documentcollections_createcollection.md)
- [Create Conversation](./copilots_createconversation.md)
- [Create Copilot](./copilots_createcopilot.md)
- [Delete Collection](./documentcollections_deletecollection.md)
- [Delete Copilot](./copilots_deletecopilot.md)
- [documentCatalog](./tags/documentcatalog.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
