ChakraHQ APIs
HomeSign In
HomeSign In
  1. Whatsapp
  • API Keys
  • Response Format
  • Whatsapp
    • Inbound Events Webhook
    • Pass Through APIs
      • Create WhatsApp Message Template (pass-through)
      • List WhatsApp Message Templates (pass-through)
      • Update WhatsApp Message Template (pass-through)
    • Send Whatsapp Template Message For Process
      POST
    • Send Whatsapp Template Message For A Phone Number
      POST
    • Upload Public Media
      POST
    • Whatsapp Messages API (pass-through)
      POST
  • Platform
    • Process
      • Fetch Process By Id
      • List Processes
      • Create Process
      • Update Process
      • Update Process By Primary Key
      • Delete Process
      • Delete Process By Primary Key Value
      • Bulk Create Process API
      • Bulk Update Process API
    • Task
      • Create Task API
    • User
      • List Users API
      • List Users API (V2)
      • Fetch User API
      • Fetch User API (V2)
      • Update User API
    • Photo
      • Fetch Photo API
      • Upload Photo API
      • Upload Photo API With Id
    • Background Job
      • Fetch Background Job
      • Fetch Background Job Entries API
    • Fetch Config
      GET
  1. Whatsapp

Upload Public Media

POST
https://api.chakrahq.com/v1/ext/plugin/whatsapp/{pluginId}/upload-public-media
This API allows you to upload a media file like a photo or a video to chakra. This is useful to host your files to be accepte by whatsapp apis while sending whatsapp template messages.
Please note that media uploaded via this api are accessible to anyone with the media url

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
pluginId
string 
required
The whatsapp plugin id where you have connected your whatsapp account. Its an UUID. You can copy it from the plugin details page url /admin/plugin/d83e1d23-50b8-4d87-8f92-842a0ac516f6 The last part of the url is the plugin id
Example:
d83e1d23-50b8-4d87-8f92-842a0ac516f6
Body Params multipart/form-data
file
file 
required
A file object / buffer
filename
string 
optional
The name of the file

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.chakrahq.com/v1/ext/plugin/whatsapp/d83e1d23-50b8-4d87-8f92-842a0ac516f6/upload-public-media' \
--form 'file=@""' \
--form 'filename=""'

Responses

🟢200Success
application/json
Body
_data
object 
required
publicMediaUrl
string 
required
Example
{
	"_data": {
		"publicMediaUrl": "https://chakra-public-media.chakrahq.com/5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee/2024-10-17/9b755981-74f7-4cde-b495-cd7039991964.png"
	}
}
Previous
Send Whatsapp Template Message For A Phone Number
Next
Whatsapp Messages API (pass-through)
Built with