---
title: "POST /userprofiles/{userprofilesId}/subaccounts"
method: POST
path: "/userprofiles/{userprofilesId}/subaccounts"
tags: ["subaccounts"]
---

# POST /userprofiles/{userprofilesId}/subaccounts

`POST /userprofiles/{userprofilesId}/subaccounts`

## Request

- Base URL: `https://dfareporting.googleapis.com/dfareporting/v5`
- URL: `https://dfareporting.googleapis.com/dfareporting/v5/userprofiles/{userprofilesId}/subaccounts`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/dfatrafficking`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/dfatrafficking`
- TypeScript: <https://skmtc.dev/google/apis/dfareporting/docs/userprofiles/:userprofilesId/subaccounts/post.ts> (a function with typed inputs; its response is checked against the schema)

Inserts a new subaccount.

## Path parameters

- `userprofilesId` string, required

## Request body

- Subaccount: Contains properties of a Campaign Manager subaccount.
  - `accountId` string, int64: ID of the account that contains this subaccount. This is a read-only field that can be left blank.
  - `availablePermissionIds` string[]: IDs of the available user role permissions for this subaccount.
  - `id` string, int64: ID of this subaccount. This is a read-only, auto-generated field.
  - `kind` string: Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccount".
  - `name` string: Name of this subaccount. This is a required field. Must be less than 128 characters long and be unique among subaccounts of the same account.

## Response `200`

Successful response

- Subaccount: Contains properties of a Campaign Manager subaccount.
  - `accountId` string, int64: ID of the account that contains this subaccount. This is a read-only field that can be left blank.
  - `availablePermissionIds` string[]: IDs of the available user role permissions for this subaccount.
  - `id` string, int64: ID of this subaccount. This is a read-only, auto-generated field.
  - `kind` string: Identifies what kind of resource this is. Value: the fixed string "dfareporting#subaccount".
  - `name` string: Name of this subaccount. This is a required field. Must be less than 128 characters long and be unique among subaccounts of the same account.

---

[API](https://skmtc.dev/google/apis/dfareporting.md) - [All operations](https://skmtc.dev/google/apis/dfareporting/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/dfareporting/revisions/be73a9a450de?raw)
