Returns a WhatsApp ID for an uploaded file

Prev Next
Post
/whatsapp/uploadmedia/{ENCRYPTED_STREAM_ID}

This API returns the name of an uploaded file (doc/image/video) and the generated ID for it. The ID can then be used in any requests to retrieve the media stored in the WhatsApp Business API client.

Security
HTTP
Type bearer

API key is needed to authorize requests. You can get your API key via the management console.
A Bearer Token is needed to be set in the Authorization header of every API call.
For additional support you can contact us.

Path parameters
ENCRYPTED_STREAM_ID
Required

CommBox generated encryption for the channel

Body parameters
object
pic
string (binary)
Responses
200

OK

Expand All
object
status
string
Example200
description
string
ExampleOperation successful
response_time
string
Example2024-08-06T07:51:52.2581942Z
data
Array of object
object
filename
string
Examplevideo_sample.mp4
id
string
Example257250616863050
400

Bad request, could not process the input data

{
  "status": "400",
  "description": "Missing parameter templateName",
  "response_time": "2024-08-06T07:51:52.258Z",
  "data": [
    {
      "recipient": "9725551234",
      "status": 400,
      "failed": "Missing required parameter"
    }
  ]
}
Expand All
object
status
string

Error status code as string

Example400
description
string

Human-readable description of the error

ExampleMissing parameter templateName
response_time
string

Timestamp of the response

Example2024-08-06T07:51:52.2581942Z
data
Array of object

Array of recipient error details

object
recipient
string

Recipient's phone number

Example9725551234
status
integer

Error status code

Example400
failed
string

Failure reason

ExampleMissing required parameter
401

Unauthorized - The supplied credentials, if any, are not sufficient to access the resource

object
status
integer
Example401
description
string
ExampleUnauthorized
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
404

Not found - The requested resource is not found

object
status
integer
Example404
description
string
ExampleNot Found
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
429

Too Many Requests - Too many requests have been made in a short period of time (Throttling)

object
status
integer
Example429
description
string
ExampleToo Many Requests
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z
500

Server Error - The server could not return the representation due to an internal server error

object
status
integer
Example500
description
string
ExampleInternal Server Error
response_time
string (date-time)
Example2025-02-06T07:51:52.258Z