# Find One Document **POST /action/findOne** Find a single document that matches a query. ## Servers - Global App: https://data.mongodb-api.com/app/your-app-id/endpoint/data/v1 (Global App) - Local App: https://us-east-1.aws.data.mongodb-api.com/app/your-app-id/endpoint/data/v1 (Local App) ## Authentication methods - Access token - Email & Password - Api key - Custom jwt ## Parameters ## Body parameters Content-type: application/json - **dataSource** (string) The name of a linked MongoDB Atlas data source. This is commonly `"mongodb-atlas"` though it may be different in your App if you chose a different name when you created the data source. - **database** (string) The name of a database in the specified data source. - **collection** (string) The name of a collection in the specified database. - **filter** (object) A MongoDB query filter that matches documents. For a list of all query operators that the Data API supports, see [Query Operators](https://www.mongodb.com/docs/atlas/app-services/mongodb/crud-and-aggregation-apis/#query-operators). - **projection** (object) A [MongoDB projection](https://www.mongodb.com/docs/manual/tutorial/project-fields-from-query-results/) for matched documents returned by the operation. ## Responses ### 200: Found #### Body Parameters: application/json (object) - **document** (object | null) A document that matches the specified filter. If no documents match, this is `null`. ### 400: The request was malformed or incomplete. #### Body Parameters: application/json (object) - **error** (string) A message that describes the error. - **error_code** (string) The error type. - **link** (string) A link to a [log entry](https://www.mongodb.com/docs/atlas/app-services/logs/endpoint/) for the failed operation. ### 401: The authenticated user does not have permission to access this endpoint. #### Body Parameters: application/json (object) - **error** (string) A message that describes the error. - **error_code** (string) The error type. - **link** (string) A link to a [log entry](https://www.mongodb.com/docs/atlas/app-services/logs/endpoint/) for the failed operation. [Powered by Bump.sh](https://bump.sh)