Developers
API ReferenceChat File

Upload a file to ChatTopic using ICP's internal storage

POST
/chat/internal-file-upload

Upload a file to ChatTopic using ICP's internal storage

Authorization<token>

Value for the Authorization header parameter.

In: header

Request Body

multipart/form-data

The new ChatFileUpload resource

TypeScript Definitions

Use the request body type in TypeScript.

file?string
chatTopic?string
Formatuuid
identifier?string|null
isCreatedFromSystem?boolean
Defaultfalse

Response Body

curl -X POST "https://example.com/chat/internal-file-upload"
{  "repliesTo": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "content": "string",    "createdBy": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "firstName": "string",      "lastName": "string",      "email": "string",      "pictureSm": "string",      "contractorName": "string",      "jobPositionName": "string",      "shortCode": "string",      "isExternal": true    },    "chatFile": {      "createdBy": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "firstName": "string",        "lastName": "string",        "email": "string",        "pictureSm": "string",        "contractorName": "string",        "jobPositionName": "string",        "shortCode": "string",        "isExternal": true      },      "previewImageUrl": "string",      "duration": 0,      "waveformPeaks": [        0      ],      "isCreatedFromSystem": false,      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "displayedName": "string",      "extension": "string",      "size": 0,      "source": "internal",      "createdAt": "2019-08-24T14:15:22Z"    },    "chatPoll": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "content": "string",      "isMultiChoice": true,      "options": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "content": "string",          "weight": 0        }      ],      "chatPollVotes": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "optionId": "dee15a0e-f1fe-4cd8-88ac-c090810707f8",          "createdBy": {},          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "multiChoice": true    },    "messageType": "message",    "createdAt": "2019-08-24T14:15:22Z",    "isEmoji": true,    "isPinned": true,    "pinnedBy": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "firstName": "string",      "lastName": "string",      "email": "string",      "pictureSm": "string",      "contractorName": "string",      "jobPositionName": "string",      "shortCode": "string",      "isExternal": true    },    "pinnedAt": "2019-08-24T14:15:22Z",    "chatMessageMentions": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "canView": true,        "chatUser": {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "firstName": "string",          "lastName": "string",          "email": "string",          "pictureSm": "string",          "contractorName": "string",          "jobPositionName": "string",          "shortCode": "string",          "isExternal": true        }      }    ]  },  "chatMessageReactions": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "chatUser": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "firstName": "string",        "lastName": "string",        "email": "string",        "pictureSm": "string",        "contractorName": "string",        "jobPositionName": "string",        "shortCode": "string",        "isExternal": true      },      "reactionType": "string"    }  ],  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "content": "string",  "createdBy": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "firstName": "string",    "lastName": "string",    "email": "string",    "pictureSm": "string",    "contractorName": "string",    "jobPositionName": "string",    "shortCode": "string",    "isExternal": true  },  "chatFile": {    "createdBy": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "firstName": "string",      "lastName": "string",      "email": "string",      "pictureSm": "string",      "contractorName": "string",      "jobPositionName": "string",      "shortCode": "string",      "isExternal": true    },    "previewImageUrl": "string",    "duration": 0,    "waveformPeaks": [      0    ],    "isCreatedFromSystem": false,    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "displayedName": "string",    "extension": "string",    "size": 0,    "source": "internal",    "createdAt": "2019-08-24T14:15:22Z"  },  "chatPoll": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "content": "string",    "isMultiChoice": true,    "options": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "content": "string",        "weight": 0      }    ],    "chatPollVotes": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "optionId": "dee15a0e-f1fe-4cd8-88ac-c090810707f8",        "createdBy": {},        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "multiChoice": true  },  "messageType": "message",  "createdAt": "2019-08-24T14:15:22Z",  "isEmoji": true,  "isPinned": true,  "pinnedBy": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "firstName": "string",    "lastName": "string",    "email": "string",    "pictureSm": "string",    "contractorName": "string",    "jobPositionName": "string",    "shortCode": "string",    "isExternal": true  },  "pinnedAt": "2019-08-24T14:15:22Z",  "chatMessageMentions": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "canView": true,      "chatUser": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "firstName": "string",        "lastName": "string",        "email": "string",        "pictureSm": "string",        "contractorName": "string",        "jobPositionName": "string",        "shortCode": "string",        "isExternal": true      }    }  ]}