---
title: "Create a Google user and, if request body is not provided, generate a Google auth token for a specific device on the Google EMM side."
method: POST
path: "/v2/devices/{deviceId}/google-accounts/"
tags: ["device_Device Enrollment in EMM"]
---

# Create a Google user and, if request body is not provided, generate a Google auth token for a specific device on the Google EMM side.

`POST /v2/devices/{deviceId}/google-accounts/`

## Path parameters

- `deviceId` string, uuid, required

## Request body

- DeviceGoogleAccount
  - `tenant_id` string, uuid, required — The ID of the tenant associated with the Google account.
  - `google_user_id` string, required — The unique identifier for the Google user.
  - `device_id` string, uuid, required — The ID of the device associated with the Google account.
  - `google_device_id` string — The unique identifier for the Google device.
  - `account_identifier` string — An identifier for the account.
  - `account_type` integer, required — The type of the Google account.
  - `google_authentication_token` string — The authentication token for the Google account.
  - `created_at` string, date-time — The timestamp when the Google account was created.
  - `updated_at` string, date-time — The timestamp when the Google account was last updated.

## Response `200`

Successfully updated the Google account details.

- object
  - `content` DeviceGoogleAccount
    - `tenant_id` string, uuid, required — The ID of the tenant associated with the Google account.
    - `google_user_id` string, required — The unique identifier for the Google user.
    - `device_id` string, uuid, required — The ID of the device associated with the Google account.
    - `google_device_id` string — The unique identifier for the Google device.
    - `account_identifier` string — An identifier for the account.
    - `account_type` integer, required — The type of the Google account.
    - `google_authentication_token` string — The authentication token for the Google account.
    - `created_at` string, date-time — The timestamp when the Google account was created.
    - `updated_at` string, date-time — The timestamp when the Google account was last updated.

## Other responses

- `401` — Unauthorized access.
- `404` — Device not found for the provided deviceId.
- `409` — Conflict
- `500` — Internal server error occurred while processing the request.

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/versions/e1f64cbb488e/schema)
