ChatKitty
Search…
Files
Upload files to ChatKitty or integrate your existing file hosting solution.
Files like pictures, videos, documents, etc. can be uploaded to ChatKitty. If you prefer hosting your own files, you can also create external file references pointing to your file servers.

Properties

Name
Type
Description
type
Enum
The type of this file. Possible values are HOSTED and EXTERNAL
url
String
URL pointing to this file's content
name
String
The name of this file
contentType
String
MIME type of this file
size
Long
64 bit integer size of this file in bytes

File Uploads

To upload a file to ChatKitty, make a multipart form data POST request to a file upload endpoint:
    Your HTTP request content type header must be set to multipart/form-data.
    The content-disposition header for the part containing the file content must have a "name" parameter with the value file.
    The form data must be the content of the file.

Additional file upload properties

    Additional properties specific to the file upload endpoint can be sent using additional content parts
    The content-disposition header for the part containing the property must have a "name" parameter with the property name.
    The form data must be the value of the property.
The HTTP request for a file upload looks like this:
1
curl --location --request POST 'https://api.chatkitty.com/v1/file-upload-path' \
2
--header 'Content-Type: multipart/form-data' \
3
--header 'Authorization: Bearer {{access_token}}' \
4
--form '[email protected]/file-path/file_name.png' \
5
--form 'extraPropertyName=extraPropertyValue'
Copied!

External Files

If you'd rather host your own files, you can create an external file reference.
To create an external file reference, set the external file's parameters on the file property of an endpoint expecting an external file reference:

External File Parameters

Parameter
Type
Description
url
String
External URL pointing to this file's content
name
String
The name of this file
contentType
String
MIME type of this file
size
Long
64 bit integer size of this file in bytes
Last modified 12d ago