Contacts

Upload contact file

Upload a file to a contact.

post/orgs/contacts/{contact_id}/files

Request

  • Base URL: https://api.useinvent.com
  • URL: https://api.useinvent.com/orgs/contacts/{contact_id}/files
  • Auth: HTTP bearer

Path parameters

contact_idstring required

Contact ID

Request body

file_urlstring

URL of the file to be uploaded

allowed_typesstring[]

The allowed mime types for the file field (e.g. image/*, application/pdf)

Example request

{
  "file": {
    "data": "SGVsbG8sIHdvcmxkIQ==",
    "type": "application/pdf",
    "name": "document.pdf",
    "encoding": "base64"
  },
  "file_url": "https://example.com/files/document.pdf"
}

Response

idstring required

Unique identifier for the file

file_pathstring required

Path to the file in the storage system

file_filenamestring required

Name of the file

file_sizenumber required

Size of the file in bytes

file_mimetypestring required

MIME type of the file

file_urlstring required

URL to access the file

created_atstring date-time nullable required

Timestamp when the file was created

source'direct' | 'comment' | 'chat' required

Where the file came from in the contact: a direct upload, attached to a comment, or sent in a chat

Example response

{
  "file_filename": "document.pdf",
  "file_size": 1024,
  "file_mimetype": "application/pdf"
}

Changes

No recorded changes to this operation across all 1 revision of this API.