---
title: "Create a location group and replace its Company Attributes with the payload"
method: POST
path: "/api/serviceworkforce/processes/locationGroups/custom_attributes"
tags: ["locationGroups"]
---

# Create a location group and replace its Company Attributes with the payload

`POST /api/serviceworkforce/processes/locationGroups/custom_attributes`

Creates a Location Group and upserts its Company Attributes in one request. The provided customAttributesPayload replaces the entire set of attributes attached to the location group: omit the field to create the location group without company attributes; provide an empty array ([]) to create the location group with no attributes. Values must match the attribute data type configured for the company attribute.

## Request body

- object
  - `locationGroupPayload` LocationGroup, required
    - `uuid` string, uuid
    - `createdAt` string, date-time — Creation timestamp
    - `createdBy` string, uuid — Creator UUID
    - `lastUpdatedAt` string, date-time — Last update timestamp
    - `lastUpdatedBy` string, uuid — Last updater UUID
    - `lastUpdatedByAudience` string — Audience of last updater
    - `lastUpdatedByAudienceUuid` string, uuid — Audience UUID of last updater
    - `lastUpdatedByImpersonatedBy` string, uuid — Impersonator UUID
    - `lastUpdatedByCompanyUuid` string, uuid — Company UUID of last updater
    - `lastUpdatedByEnterpriseUuid` string, uuid — Enterprise UUID of last updater
    - `name` string, required — Location group name
    - `description` string
    - `companyUuid` string, uuid — Company UUID
    - `ownerUuid` string
    - `hireLocationGroupUuid` string
    - `parentGroupUuid` string
  - `customAttributesPayload` object[], required — List of Company Attributes to attach to the location group. If the field is omitted, the location group will be created without company attributes. If you provide an empty array ([]) the location group will be created with no attributes.
    - `attribute` string, required — Attribute UUID or key
    - `value` unknown, required

## Response `201`

Created Successfully

## Other responses

- `400` — default error response

---

[API](https://skmtc.dev/fountain/apis/hire-public-api.md) · [All operations](https://skmtc.dev/fountain/apis/hire-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fountain/hire-public-api/revisions/5f406c0e9462/schema)
