AI-generated Key Takeaways
- 
          This API endpoint is used to write the Safety Labels declaration of an app. 
- 
          The HTTP request method is POST and the URL includes the package name of the app. 
- 
          The request body requires a JSON object containing the safetyLabelsfield, which is a string representing the contents of a CSV file containing Data Safety responses.
- 
          The response body is empty if the request is successful. 
- 
          Authorization requires the https://www.googleapis.com/auth/androidpublisherOAuth scope.
Writes the Safety Labels declaration of an app.
HTTP request
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/dataSafety
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| packageName | 
 Required. Package name of the app. | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| { "safetyLabels": string } | 
| Fields | |
|---|---|
| safetyLabels | 
 Required. Contents of the CSV file containing Data Safety responses. For the format of this file, see the Help Center documentation at https://support.google.com/googleplay/android-developer/answer/10787469?#zippy=%2Cunderstand-the-csv-format To download an up to date template, follow the steps at https://support.google.com/googleplay/android-developer/answer/10787469?#zippy=%2Cexport-to-a-csv-file | 
Response body
If successful, the response body is empty.
Authorization scopes
Requires the following OAuth scope:
- https://www.googleapis.com/auth/androidpublisher