Generate Media ID API
Use the Generate Media ID API to upload a media file and generate a unique media ID for that file.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wba/templates/media-id |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
| Request Body schema | multipart/form-data |
Request body
Request sample
{
"file": "string"
}Request body parameters
| Field | Required | Type | Description |
|---|---|---|---|
| file | Yes | string | The path of the media file. |
What this returns
A successful request returns a generated media identifier for the uploaded media file. The response schema includes media file details such as media_id, mimetype, size, and status.
Responses
200 Success
Response
{
"h": "4::aW1hZ2UvanBlZw==:ARYAD9GGvpFX_RGLucP0eH7noPnVwMhpd1SdBSz_dkb_ysGy5yeEhSWHZdTPXzwuSVMD5LXvhiayCxDvubaluQ7yRes6-X_eiCl31Y-u2lLEbg:e:1731405563:2221860068064858:100067177466309:ARaJTSVvECKCQXZBF48"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| media_id | string | Unique ID for the media file. |
| mimetype | string | The MIME type of the file. |
| size | string | The size of the file in mega bytes. |
| status | string | The status of the request. |
401 Unauthorized
Response
{
"message": "unable to process campaign request",
"reason": "jwt token expired",
"status": "failure"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the request. |
| message | string | The response message. |
| reason | string | The reason for not generating the media ID. |
404 Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
500 Internal Server Error
Response
{
"status": "failure",
"message": "unable to process request",
"reason": "internal server error"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the request. |
| message | string | The response message. |
| reason | string | The reason for not generating the media ID. |
Updated 12 days ago
Did this page help you?