---
title: "POST /userprofiles/{userprofilesId}/billingProfiles/{billingProfilesId}/billingAssignments"
method: POST
path: "/userprofiles/{userprofilesId}/billingProfiles/{billingProfilesId}/billingAssignments"
tags: ["billingAssignments"]
---

# POST /userprofiles/{userprofilesId}/billingProfiles/{billingProfilesId}/billingAssignments

`POST /userprofiles/{userprofilesId}/billingProfiles/{billingProfilesId}/billingAssignments`

## Request

- Base URL: `https://dfareporting.googleapis.com/dfareporting/v5`
- URL: `https://dfareporting.googleapis.com/dfareporting/v5/userprofiles/{userprofilesId}/billingProfiles/{billingProfilesId}/billingAssignments`
- 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/billingProfiles/:billingProfilesId/billingAssignments/post.ts> (a function with typed inputs; its response is checked against the schema)

Inserts a new billing assignment and returns the new assignment. Only one of advertiser_id or campaign_id is support per request. If the new assignment has no effect (assigning a campaign to the parent advertiser billing profile or assigning an advertiser to the account billing profile), no assignment will be returned.

## Path parameters

- `userprofilesId` string, required
- `billingProfilesId` string, required

## Request body

- BillingAssignment: List account, subaccount, advertiser, and campaign associated with a given Billing Profile.
  - `accountId` string: ID of the account associated with the billing assignment.This is a read-only, auto-generated field.
  - `advertiserId` string: ID of the advertiser associated with the billing assignment.Wildcard (*) means this assignment is not limited to a single advertiser
  - `campaignId` string: ID of the campaign associated with the billing assignment. Wildcard (*) means this assignment is not limited to a single campaign
  - `kind` string: Identifies what kind of resource this is. Value: the fixed string "dfareporting#billingAssignment".
  - `subaccountId` string: ID of the subaccount associated with the billing assignment.Wildcard (*) means this assignment is not limited to a single subaccountThis is a read-only, auto-generated field.

## Response `200`

Successful response

- BillingAssignment: List account, subaccount, advertiser, and campaign associated with a given Billing Profile.
  - `accountId` string: ID of the account associated with the billing assignment.This is a read-only, auto-generated field.
  - `advertiserId` string: ID of the advertiser associated with the billing assignment.Wildcard (*) means this assignment is not limited to a single advertiser
  - `campaignId` string: ID of the campaign associated with the billing assignment. Wildcard (*) means this assignment is not limited to a single campaign
  - `kind` string: Identifies what kind of resource this is. Value: the fixed string "dfareporting#billingAssignment".
  - `subaccountId` string: ID of the subaccount associated with the billing assignment.Wildcard (*) means this assignment is not limited to a single subaccountThis is a read-only, auto-generated field.

---

[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)
