Set chat background
/chats/{chatId}/backgroundSet or update the background image for a conversation. Works for both 1-on-1 and group chats.
The request body must be multipart/form-data with a single background field containing the raw image file bytes (not a URL or base64 string). Supported formats: JPEG, PNG, GIF, WebP, HEIC/HEIF. Maximum file size: 10 MB.
Example with curl — note the @ prefix that tells curl to read the file from disk:
curl -X PUT "https://api.blooio.com/v2/api/chats/%2B15551234567/background" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "background=@/path/to/image.jpg;type=image/jpeg"When the chat id is a phone number, percent-encode the leading + as %2B in the URL path.
Path parameters
chatIdRequiredstringChat identifier. Can be: (1) phone number in E.164 format (e.g., +15551234567), (2) email address, (3) group ID (grp_xxxx), or (4) comma-separated list of phone numbers/emails for multi-recipient group chats (e.g., +15551234567,+15559876543). All values should be URL-encoded.
Headers
AuthorizationRequiredstringYour API key, sent as a bearer token: Authorization: Bearer <api_key>. Editing this stays in sync with the API key box on the right.
Body parameters
form-databackgroundRequiredstringBinary image file upload (JPEG, PNG, GIF, WebP, HEIC/HEIF, max 10 MB). Send as a file field in multipart/form-data — e.g. -F "background=@/path/to/image.jpg" with curl, or a File/Blob appended to FormData in JavaScript. Do NOT send a URL or base64 string.
Returns
chat_idoptionalstringNormalized chat identifier (phone number, email, or group ID)
has_backgroundoptionalbooleanWhether the chat currently has a background set
background_idoptionalstring | nullUnique identifier for the current background, or null if none
background_urloptionalstring | nullPublic URL of the persisted background image stored in R2. Returned after a successful PUT and on GET when a background has been set through the API. May be null if persistence failed or the background was set outside of the API.
background_versionoptionalinteger | nullVersion number of the background (for cache invalidation)
changedoptionalbooleanWhether the background was changed by this operation (only present on PUT)
Response codes
Sends a live request with your values and shows the real response below. Your key is stored only in this browser.
curl -X PUT https://api.blooio.com/v2/api/chats/chat_a1b2c3d4/background \ -H "Authorization: Bearer bl_live_..." \ -F "file=@/path/to/file"{ "chat_id": "chat_a1b2c3d4", "has_background": true, "background_id": "obj_a1b2c3d4", "background_url": "https://example.com", "background_version": 0, "changed": false}