Agent file attachments with the chat platform API

With a chat platform API custom app, you can set up a workflow that lets your agents attach files during a chat session.

Agent file attachment workflow

Here's the workflow for an agent attaching a file during a chat session.

  1. An agent attaches a file during a chat session.
  2. Your webhook endpoint receives a message_received event, which includes the media_id value for the attached file. For more information, see Webhooks for the chat API platform.
  3. Send a GET request to the following endpoint to get the attachment file, specifying the media_id value from the previous step. Authenticate using basic authentication.

    https://YOUR_CCAAS_HOST/apps/api/v1/chats/CHAT_ID/media/MEDIA_ID
    

    Replace the following:

    • YOUR_CCAAS_HOST: your Contact Center AI Platform (CCAI Platform) host

    • CHAT_ID: the chat ID

    • MEDIA_ID: the ID of the file that you want to download. Get this from the message_received webhook event.

    A successful request returns the attachment file. For more information, see Chat platform API Guide.

File limitations

Here are the file types that agents can attach to a chat session:

  • Images: JPEG, JPG, PNG, GIF, TIFF, RAW, WebP

  • Video: MP4, MOV, AVI, WMV, WebM

  • Audio: MP3, WAV

  • Documents: PDF, XML, XLS, PPT, CSV, TXT

The maximum file size is 100 MB.