# Attributes

## Partially update (merge) dynamic attributes for an entity

> \<p>\<b>Access Control:\</b>\</p>\
> \<ul>\
> &#x20; \<li>\<b>Allowed Roles:\</b> MEMBER\</li>\
> &#x20; \<li>\<b>Impersonated User Allowed:\</b> No\</li>\
> &#x20; \<li>\<b>Organization API Key Allowed:\</b> Yes\</li>\
> \</ul>\
> \
> \<p>\<b>Patch Behavior:\</b>\</p>\
> \<ul>\
> &#x20; \<li>\<b>Attribute not present in request:\</b> A new attribute will be created.\</li>\
> &#x20; \<li>\<b>Attribute set to null:\</b> The request will fail because the attribute has a non-null validation constraint.\</li>\
> &#x20; \<li>\<b>Attribute set to an empty object ({ }):\</b> No changes will be applied.\</li>\
> \</ul><br>

```json
{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://apis.saleschat.pro"}],"security":[{"bearer-key":[]}],"components":{"securitySchemes":{"bearer-key":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UpsertDynamicAttributeRequest":{"required":["attributes"],"type":"object","properties":{"attributes":{"type":"object","additionalProperties":{"type":"string"}}}},"DynamicAttributeResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"org_id":{"type":"string"},"entity_type":{"type":"string"},"entity_id":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ErrorRespDto":{"type":"object","properties":{"error_code":{"type":"integer"},"error_message":{"type":"string"},"error_description":{"type":"string"},"payload":{"type":"object"}}}}},"paths":{"/v1/orgs/{orgId}/dynamic-attributes/{entityType}/{entityId}":{"patch":{"tags":["dynamic-attribute-controller"],"summary":"Partially update (merge) dynamic attributes for an entity","description":"<p><b>Access Control:</b></p>\n<ul>\n  <li><b>Allowed Roles:</b> MEMBER</li>\n  <li><b>Impersonated User Allowed:</b> No</li>\n  <li><b>Organization API Key Allowed:</b> Yes</li>\n</ul>\n\n<p><b>Patch Behavior:</b></p>\n<ul>\n  <li><b>Attribute not present in request:</b> A new attribute will be created.</li>\n  <li><b>Attribute set to null:</b> The request will fail because the attribute has a non-null validation constraint.</li>\n  <li><b>Attribute set to an empty object ({ }):</b> No changes will be applied.</li>\n</ul>\n","operationId":"patchAttributes","parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"entityType","in":"path","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertDynamicAttributeRequest"}}},"required":true},"responses":{"200":{"description":"Successfully patched attributes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DynamicAttributeResponse"}}}},"400":{"description":"Invalid request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}},"401":{"description":"Unauthorized - Authentication is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}},"403":{"description":"Unauthorized access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}},"500":{"description":"Internal Server Error - Something went wrong on the server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorRespDto"}}}}}}}}}
```
