How to Attach a File to a Message with GraphQL
In this guide, we will walk you through the process of attaching a file to a message using GraphQL. This process involves three main steps and utilizes the Upload Information Type and Message Type .
Step 1: Get an Upload Link
First, use the
mutation to obtain an
in the response. Make sure to store all three values, as you'll need them later.
Step 2: Upload the File
This step depends on your specific platform. Upload the file to the
obtained in Step 1. Remember to include the headers from the response of the previous step.
Step 3: Send the Message
This step uses the
from Step 1. Pass it into the mutation's variables as the
. In this example, we are using
to create a proactive message to a user using a template. The same workflow applies for
Media Message Create
This uses the
In your variables,
could look like this:
List All Contacts