Get Resumable Media

GET Method

The Get Resumable Media API allows you to get the details related to resumable media ID stored in the database.

Prerequisites

  1. Before you get started, Create an API Key. To view the API Key and the SID, see View API Key and SID.
    A prerequisite for using Kaleyra WhatsApp APIs is to have an active WhatsApp plan on kaleyra platform.
  2. To set up a WhatsApp account on kaleyra.io, see Manual Signup
    and Embedded Signup.
  3. An active WhatsApp for Business API plan that includes:
    • A WhatsApp business number.
    • An associated profile with the business number.
    • A WhatsApp verified and approved profile.
    • A WABA ID onboarded on Kaleyra WhatsApp API V2.

Base URL

https://<api_domain>/v2/<SID>

API Domain and Value

api_domainValue
IN podapi.in.kaleyra.io
SG Podapi.kaleyra.io
EU Podapi.eu.kaleyra.io
NA podapi.na.kaleyra.ai

API request to get Resumable Media

To get the resumable media API, use the https://<api_domain>/v2/<sid>/whatsapp/<waba_id>/resumable_media endpoint.

Request Format

The following is the request format to get the resumable media:

curl -L -X GET 'https://<api_domain>/v2/<sid>/whatsapp/<waba_id>/resumable_media?id=<id>&limit=<limit>&offset=<offset>' \
-H 'Content-Type: <content_type>' \
-H 'api-key: <api-key>'

Sample Request Format

The following is the sample request format to get the resumable media:

curl -L -X GET 'https://api.in.kaleyra.io/v2/HXAP16XXXXXX97IN/whatsapp/15044XXXX142241/resumable_media?id=639&limit=25&offset=0' \
-H 'content-type: application/json' \
-H 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3'

URL Parameters and Header Parameters

Following is the list of header parameters:

Parameter / HeadersData TypeDescriptionExampleMandatory?
sidStringAccount SID (Security Identifier).HXAP16XXXXXX97INYes
waba_idStringWhatsApp Business Account ID.15044XXXX142241Yes
content-typeStringIndicates the format of the content the API will be processing.The only allowed value is application/json.Yes
api-keyStringAPI key generated from Kaleyra platform account.Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes

Following is the list of query parameters:

ParameterData TypeDescriptionExampleMandatory?
idStringGet the resumable media details by progressive Id which is given to end users at the time of resumable media creation.639No
limitIntegerThe number of resumable media shown in the GET response. If the value is not provided, by default 25 resumable media are returned.25No
offsetIntegerIf the GET response cannot be displayed on a single page, you can ask for the following set of resumable media to change the offset value. Setting offset to a multiple of the limit value will scroll through the different pages of the API response. If the value is not provided, by default its value is 0.0No

Sample Success Response

The following is the success response:

{
    "code": "WA200",
    "message": "Request Processed Successfully",
    "data": [
        {
            "company_id": "Z535a90inXXX",
            "file_link": "https://stage-hexa-whatsapp.s3.ap-south-1.amazonaws.com/Z535a90in932/1751013459_e5df6eee-759d-4c42-ab8d-5a653bcd136ajpeg.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3CTTVRRVTUKQKV5R%2F20250627%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20250627T083739Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3D175XXXX159_e5df6eee-759d-4c42-ab8d-5a653bcd136ajpeg.jpg&X-Amz-Signature=3f4ff97fd448825250e9245c96e31c85e46369491f29a5e7c7f8ae734d5f6b28",
            "file_name": "jpeg.jpg",
            "file_type": "image/jpg",
            "id": "639",
            "status": "UPLOADED",
            "uploaded_file_handle": "4:anBlZy5qcGc=:aW1hZ2UvanBn:ARauCfg53sZnDqMFlHeGkiDEXXXXXXXXb9wrYQ1HEIOrBH-oL1GPx51fiZ1-wAkCTLxTp98pUvBJ1NMM8gWRf_BDE7oHV2X8C-K9ycJwcBIFRQ:e:1751359059:538208851148003:100080877455884:ARYmIOBBQtQjBz9GlIg",
            "waba_id": "4485XXXXXXXX370"
        }
    ],
    "error": {},
    "limit": 25,
    "offset": 0,
    "total": 1
}

Following is the description of the fields that are being fetched:

ParameterDescription
company_idA unique identifier for the company associated with the file. This ID is used to reference the specific company in the system.
file_linkLink to the uploaded file.
file_nameThe name of the uploaded file. This field stores the name as it was originally provided by the end user or system during the upload process.
file_typeThe MIME type of the uploaded file. This indicates the format of the file, such as "application/pdf", "image/jpeg", "image/jpg", "image/png", and "video/mp4".
idA unique identifier assigned to the file within the system. This field allows the system to reference the file independently of other attributes like the file name.
statusThe current status of the file upload. This could be any of a predefined set of statuses indicating the state of the file. For example, "UPLOADED", "PENDING", and "FAILED".
uploaded_file_handleA unique handle given by meta when the file is successfully uploaded.
waba_idThe identifier of the WhatsApp Business Account (WABA) linked to the file.

Sample Failure Response

The following are the sample failure responses:

401 Unauthorized
{
    "code": "RBC001",
    "message": "Incorrect SID or API key.",
    "data": [],
    "error": {
        "error": "Incorrect SID or API key."
    }
}
401 Wrong account
{
    "code": "WA-401",
    "message": "API is not available for given customer.Please contact support for more info",
    "data": {},
    "error": "API is not available for given customer.Please contact support for more info"
}
401 Unauthorized WABA
{
    "code": "WA401",
    "message": "Waba_Id is not present or does not belong to the account.",
    "data": {},
    "error": {
        "waba_id": "Waba_Id is not present or does not belong to the account."
    }
}
401 Unauthorized WABA version
{
    "code": "WA401",
    "message": "The waba_id you're using is associated with different Version of our WA API. Please use the appropriate endpoint.",
    "data": {},
    "error": {
        "waba_id": "The waba_id you're using is associated with different Version of our WA API. Please use the appropriate endpoint."
    }
}
400 Invalid limit
{
    "code": "WA400",
    "message": "please provide a valid positive number",
    "data": [],
    "error": {
        "limit": "please provide a valid positive number"
    }
}
400 Invalid Offset
{
    "code": "WA400",
    "message": "please provide a valid positive number",
    "data": [],
    "error": {
        "offset": "please provide a valid positive number"
    }
}
429 Too many requests
{
    "code": "WA429",
    "message": "Too many requests",
    "data": {},
    "error": {
        "error": "Too many requests sent from this waba in a short period of time, please try after sometime"
    }
}
500 Internal Server Error
{
    "code": "WA-500",
    "message": "Please try again later",
    "data": {},
    "error": {
        "error": "Internal server error"
    }
}