> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/dynamic-lookup-table-api/create-attribute-library-group.md).

# Create Attribute Library Group

Create a new, empty attribute library group. A group is the container for your lookup values - you add the entries to it in a second call.

The response returns `data.id`. Save it: pass it as `moduleId` when you create entries in the group, and use it as `entity-id` for get and update calls.

## Create attribute library group

> Create a new, empty attribute library group.\
> \
> \*\*Required fields:\*\* \`name\` and \`description\`. The description can be an empty string.\
> \
> \*\*Next step:\*\* on success, \`data.id\` is the group's ID. Pass it as \`moduleId\` to \*\*Create attribute library entry\*\* (\`POST /dev/v1/module\_schema\`) to add entries to the group. Use it as \`entity-id\` for get and update calls. Store \`data.checksum\` — you need it to update the group.

```json
{"openapi":"3.0.3","info":{"title":"Nected Dynamic Lookup Table API (Attribute Library, Dev V1)","version":"1.0"},"tags":[{"name":"Dynamic Lookup Table API (Attribute Library)","description":"The Dynamic Lookup Table API lets you list, create, read and update **attribute library groups** (lookup tables) in your workspace. Each group holds one or more **attributes**, and each attribute has a name, a data type, a list of predefined values and a usage.\n\nUse it to update lookup values in bulk, sync them from your systems of record, or promote them between environments in CI/CD. For a no-code walkthrough, see Dynamic Lookup Tables (Attribute Library).\n\n**Entity type:** all paths use the entity type `module`.\n\n**Supported operations:** list, create, get and update only. Publish, test, schedule and version listing are not available for attribute libraries.\n\n**Update rules:** after an attribute is created, you can change its predefined values and usage. You can't change its name or data type, the same as in the UI.\n\n**Data types:** `String`, `Numeric`, `Date`, `DateTime`, `Boolean`, `List`, `JSON`.\n\n## Why use the API?\n\nUse the API when you need:\n\n* **Bulk updates** (large value lists in one or a few calls)\n* **Automated sync** from your systems of record\n* **CI/CD / environment promotion** of lookup values\n* **Programmatic governance** with controlled access and auditability\n\n## How it works\n\nAttribute libraries are created in two steps:\n\n1. **Create the group** with `POST /dev/v1/module`. The response returns the group's `id`.\n2. **Create the entries inside the group** with `POST /dev/v1/module_schema`, passing the group's `id` as `moduleId`.\n\nTo change things later, use `PATCH /dev/v1/module/{entity-id}` to rename the group or change its description, and `PATCH /dev/v1/module_schema/{entity-id}` to change the values or usage of an entry. Both need the current `checksum`."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"security":[{"DevAuth":[]}],"components":{"securitySchemes":{"DevAuth":{"type":"apiKey","in":"header","name":"Nected-API-Key","description":"Your Nected API key. Obtain from your workspace settings."}},"schemas":{"CreateAttributeGroupPayload":{"type":"object","required":["name","description"],"properties":{"name":{"type":"string","description":"Name of the group"},"description":{"type":"string","description":"Description of the group. Can be an empty string."}}},"CreateResponse":{"type":"object","description":"Success response for create calls","properties":{"code":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","description":"Entity ID of the created group or entry"},"checksum":{"type":"string","description":"Checksum of the created group or entry — required for the next update"}}}}},"ErrorResponse":{"type":"object","description":"Error response wrapper","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Human-readable error message"},"data":{"nullable":true}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/dev/v1/module":{"post":{"operationId":"createAttributeGroup","tags":["Dynamic Lookup Table API (Attribute Library)"],"summary":"Create attribute library group","description":"Create a new, empty attribute library group.\n\n**Required fields:** `name` and `description`. The description can be an empty string.\n\n**Next step:** on success, `data.id` is the group's ID. Pass it as `moduleId` to **Create attribute library entry** (`POST /dev/v1/module_schema`) to add entries to the group. Use it as `entity-id` for get and update calls. Store `data.checksum` — you need it to update the group.","parameters":[{"name":"Nected-Branch","in":"header","required":false,"description":"Branch name (optional)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAttributeGroupPayload"}}}},"responses":{"201":{"description":"Created — `data.id` is the new group's ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

### Request body

| Field                           | Type   | Required | Description                                                                |
| ------------------------------- | ------ | -------- | -------------------------------------------------------------------------- |
| `name`                          | string | Yes      | Name of the group, for example `OrderAttributes`.                          |
| `attributes`                    | array  | No       | Attributes (lookup tables) in the group.                                   |
| `attributes[].name`             | string | Yes      | Name of the attribute, for example `OrderStatus`.                          |
| `attributes[].dataType`         | string | Yes      | One of `String`, `Numeric`, `Date`, `DateTime`, `Boolean`, `List`, `JSON`. |
| `attributes[].predefinedValues` | array  | No       | The allowed values for the attribute.                                      |
| `attributes[].usage`            | string | Yes      | `Mandatory` or `Optional`.                                                 |

{% hint style="info" %}
You can't change an attribute's `name` or `dataType` after it's created, so check them before you send the request. Only `predefinedValues` and `usage` can be updated later.
{% endhint %}
