# Update Chat Attachment

## Update a chat attachment data

> The chat ID is provided in the route.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5102-g2bf281b6"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/helpdesk/chats/{chatId}/attachments/{id}":{"put":{"tags":["ChatAttachment"],"summary":"Update a chat attachment data","description":"The chat ID is provided in the route.","parameters":[{"name":"chatId","in":"path","description":"The chat ID.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The chat attachment ID.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"JSON payload containing the updated data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachment"}},"text/json":{"schema":{"$ref":"#/components/schemas/ChatAttachment"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/ChatAttachment"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatAttachment"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error"}}}}},"components":{"schemas":{"ChatAttachment":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/ChatAttachmentAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"chat":{"type":"object","allOf":[{"$ref":"#/components/schemas/ChatRef"}]},"description":{"type":"string","nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/FileStatus"}]},"file":{"allOf":[{"$ref":"#/components/schemas/File"}],"description":"Represents the file this attachment belongs to."}},"additionalProperties":false},"ChatAttachmentAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"ChatRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/ChatType"}],"description":"Represents the type of chat, indicating whether it is a direct message, group chat, channel, or support case."}},"additionalProperties":false},"ChatType":{"enum":["Direct","Group","Channel","Case"],"type":"string"},"FileStatus":{"enum":["Active","Deleted"],"type":"string"},"File":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectAudit"}]},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/FileType"}],"description":"Specifies the type of the file, such as attachment or icon"},"filename":{"type":"string","description":"Represents the name of the file associated with the attachment."},"size":{"type":"integer","description":"Indicates the size of the file in bytes.","format":"int64","nullable":true},"contentType":{"type":"string","description":"Represents the MIME type of the file content."}},"additionalProperties":false,"description":"Represents a file in the helpdesk module"},"PlatformObjectAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true}},"additionalProperties":false},"FileType":{"enum":["Attachment","Icon","Image","Video"],"type":"string"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```
