> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create merchant group

> To create a merchant group, send a POST request to the /merchantgroups endpoint.

POST/merchantgroups

To create a merchant group, send a `POST` request to the `/merchantgroups` endpoint.

## Request body

| Fields | Description |
| - | - |
| active boolean  Optional | Indicates if the merchant group is active or not. **Allowable Values:**  `true`, `false` **Default value:** `false` |
| mids array of strings  Optional | Comma-separated list of alphanumeric merchant identifiers. You can include merchant identifiers in multiple merchant groups. Use the exact MID value as it appears in the `card_acceptor.mid` field of your Gateway JIT Funding request or transaction webhook. Marqeta performs an exact match on this value — no normalization or formatting is applied. If a merchant presents multiple MID formats across transactions (for example, with or without leading zeros), include all observed forms to ensure consistent matching. **Allowable Values:**  Valid array of one or more merchant identifiers |
| name string  Required | Name of the merchant group. **Allowable Values:**  1–40 chars |
| token string  Optional | Unique identifier of the group. If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated. **Allowable Values:**  1–36 chars |

## Sample request body

```json JSON lines wrap theme={null}
{
  "token": "my_merchantgroup",
  "name": "My Merchant Group",
  "mids": [
    "123456789012345",
    "345123456789012",
    "123456789012"
  ],
  "active": true
}
```

## Response body

| Fields | Description |
| - | - |
| active boolean  Conditionally returned | Indicates if the merchant group is active or not. **Allowable Values:**  `true`, `false` |
| created\_time datetime  Conditionally returned | Date and time when the resource was created, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| last\_modified\_time datetime  Conditionally returned | Date and time when the resource was last modified, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| mids array of strings  Conditionally returned | Comma-separated list of alphanumeric merchant identifiers. **Allowable Values:**  Valid array of one or more merchant identifiers |
| name string  Conditionally returned | Name of the merchant group. **Allowable Values:**  40 char max |
| token string  Conditionally returned | Unique identifier of the merchant group. **Allowable Values:**  Existing merchant group token |

## Sample response body

```json JSON lines wrap theme={null}
{
  "token": "my_merchantgroup",
  "name": "My Merchant Group",
  "mids": [
    "123456789012345",
    "345123456789012",
    "123456789012"
  ],
  "active": true,
  "created_time": "2022-05-01T13:22:07Z",
  "last_modified_time": "2022-05-01T13:22:07Z"
}
```


## Related topics

- [Merchant Groups Overview](https://www.marqeta.com/docs/core-api/merchant-groups.md)
- [Create MCC group](https://www.marqeta.com/docs/core-api/mcc-groups/create-mcc-group.md)
- [Update merchant group](https://www.marqeta.com/docs/core-api/merchant-groups/update-merchant-group.md)
- [Retrieve merchant group](https://www.marqeta.com/docs/core-api/merchant-groups/retrieve-merchant-group.md)
- [List merchant groups](https://www.marqeta.com/docs/core-api/merchant-groups/list-merchant-groups.md)
