v1
latestOpenAPI 3.1.02026-08-04103211436.0 KBAttributes
Create attribute
Creates an attribute. If customId is omitted, Embat auto-generates one. If an attribute with the given customId already exists, its fields are overwritten instead of raising a duplicate error — this endpoint behaves as an upsert. Sending values replaces the attribute's full value list, and omitting values on an existing attribute removes all of its current values — always resend the values you want to keep.
post/attributes/{companyId}
Path parameters
companyIdstring required
Request body
Example request
{
"customId": "cost-center",
"name": "Cost Center",
"values": [
{
"customId": "madrid",
"name": "Madrid",
"parentCustomId": "spain"
}
],
"parentCustomId": "country"
}Response
Successful Response