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

FieldValue
URLhttps://apis.rmlconnect.net/wba/templates/media-id
Authorizationjwt
API Keyjwt
Header parameter nameAuthorization
Request Body schemamultipart/form-data

Request body

Request sample

{
  "file": "string"
}

Request body parameters

FieldRequiredTypeDescription
fileYesstringThe 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

FieldTypeDescription
media_idstringUnique ID for the media file.
mimetypestringThe MIME type of the file.
sizestringThe size of the file in mega bytes.
statusstringThe status of the request.
401 Unauthorized

Response

{
  "message": "unable to process campaign request",
  "reason": "jwt token expired",
  "status": "failure"
}

Response Schema: application/json

FieldTypeDescription
statusstringThe status of the request.
messagestringThe response message.
reasonstringThe 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

FieldTypeDescription
messagestringThe response message.
500 Internal Server Error

Response

{
  "status": "failure",
  "message": "unable to process request",
  "reason": "internal server error"
}

Response Schema: application/json

FieldTypeDescription
statusstringThe status of the request.
messagestringThe response message.
reasonstringThe reason for not generating the media ID.


Did this page help you?