Developer

You can send events from your own integrations to Assembly.

API Key

You must first create an API Key in Assembly. It is located under “Manage Integrations”, then scroll to the bottom and click “Manage API Keys”.

Here, you can see your existing keys, their names and expiration. You can delete existing ones.

When creating a new API key, the name must be unique in your organization. Once the key has been created, you will be shown a one-time dialog box with your new API key. You should copy this down somewhere safe — we will not show this again.

If you lose your API key, you will need to make a new one.

Sending Events

Here is the API endpoint for sending events to Assembly. The only required field is query:

curl -X \
 POST https://chat-widget-7vb6.onrender.com/interaction \
 -F "query=Sample query text" \
 -H "Authorization: <API_KEY>" \
 -H "Content-Type: multipart/form-data" 

You can also pass in additional fields, as seen below. These are all optional, but they include the title, information about the user (user_name, user_email, user_image_url, user_username), and the query.

curl -X \
 POST https://chat-widget-7vb6.onrender.com/interaction \
 -F "title=Sample title" \
 -F "query=Sample query text" \
 -F "user_name=John Doe" \
 -F "user_email=john@example.com" \
 -F "user_image_url=https://example.com/profile.jpg" \
 -F "user_username=johndoe" \
 -H "Authorization: <API_KEY>" \
 -H "Content-Type: multipart/form-data"

You can also pass in a base64 encoded image if you prefer, or an image URL:

curl -X POST https://chat-widget-7vb6.onrender.com/interaction \
-F "title=Sample title" \
-F "query=Sample query text" \
-F "user_name=John Doe" \
-F "user_email=john@example.com" \
-F "user_image_url=https://example.com/profile.jpg" \
-F "files_base64=<base64 encoded image>" \
-H "Authorization: 3fb05781f6504431e7e38c4ba0617097d59aa09e611893f9dfbc306158bffa4e8a3e86f239a3cba19ebe4c5a4bae10d2" \
-H "Content-Type: multipart/form-data"
curl -X POST https://chat-widget-7vb6.onrender.com/interaction \
-F "title=Sample title" \
-F "query=Sample query text" \
-F "user_name=John Doe" \
-F "user_email=john@example.com" \
-F "user_image_url=https://example.com/profile.jpg" \
-F "files_image_url=https://example.com/img.jpg" \
-H "Authorization: 3fb05781f6504431e7e38c4ba0617097d59aa09e611893f9dfbc306158bffa4e8a3e86f239a3cba19ebe4c5a4bae10d2" \
-H "Content-Type: multipart/form-data"

You can attach multiple images by passing in multiple files.

curl -X POST https://chat-widget-7vb6.onrender.com/interaction \
-F "title=Sample title" \
-F "query=Sample query text" \
-F "user_name=John Doe" \
-F "user_email=john@example.com" \
-F "user_image_url=https://example.com/profile.jpg" \
-F "files_base64=<base64 encoded image_1>" \
-F "files_base64=<base64 encoded image_2>" \
-H "Authorization: 3fb05781f6504431e7e38c4ba0617097d59aa09e611893f9dfbc306158bffa4e8a3e86f239a3cba19ebe4c5a4bae10d2" \
-H "Content-Type: multipart/form-data"

The files field is used to send images to Assembly. You can currently send JPG and PNG images up to 4MB in size.

Here are some of the errors that may be returned:

  • 400: Invalid request - missing title, file too large, couldn’t be opened, etc.
  • 401: Invalid API Key or expired API Key
  • 503: Assembly server error has been logged and our team has been notified

Errors take on the following format in JSON:

{"error": "message"}

Successful responses take on the following format in JSON:

{"created_ticket_number": "AAA-111"}

Rate Limiting

There is a rate limit of 30 events per second. If you exceed this, you will receive a 429 response code.

If you need a higher rate, please let us know.