---
title: "Modify the Data API"
method: PATCH
path: "/groups/{groupId}/apps/{appId}/data_api/config"
tags: ["data-api"]
---

# Modify the Data API

`PATCH /groups/{groupId}/apps/{appId}/data_api/config`

Update your app's [Data API](https://www.mongodb.com/docs/atlas/app-services/data-api/generated-endpoints/) configuration.

## Request body

- DataApiConfig
  - `disabled` boolean, required
  - `versions` DataApiVersion[], required
  - `return_type` 'JSON' | 'EJSON', required — A [data format](https://mongodb.com/docs/atlas/app-services/data-api/#data-formats) supported by the Data API & custom endpoints.
  - `create_user_on_auth` boolean
  - `run_as_user_id` string — An application user's account ID. If defined, endpoints will always run as the specified user.
  - `run_as_user_id_script_source` string — Stringified source code for a function that returns an application user's account ID. If defined, endpoints execute the function on every request and run as the user with the ID returned from the function.
  - `validation_method` 'NO_VALIDATION' | 'SECRET_AS_QUERY_PARAM' | 'VERIFY_PAYLOAD', required
  - `secret_name` string — If `validation_method` is set to `"SECRET_AS_QUERY_PARAM"` or `"VERIFY_PAYLOAD"`, this is the `name` of the [Secret](https://www.mongodb.com/docs/atlas/app-services/values-and-secrets/) that authorizes requests.
  - `can_evaluate` object — A JSON expression that evaluates to `true` if an endpoint is allowed to run in response to an incoming request.

## Response `204`

No content

---

[API](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.net/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/revisions/1365ab72bc03/schema)
