---
updatedAt: 2026-07-16T09:52:48.000Z
agentTools:
  siteIndex: https://developer.rmlconnect.net/llms.txt
  projectIndex: https://developer.rmlconnect.net/route-mobile-project/llms.txt
---

# 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**

```json
{
  "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

<Accordion title="200 Success" icon="fa-solid fa-circle-check">

**Response**

```json
{
  "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. |

</Accordion>

<Accordion title="401 Unauthorized" icon="fa-solid fa-triangle-exclamation">

**Response**

```json
{
  "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. |

</Accordion>

<Accordion title="404 Not Found" icon="fa-solid fa-circle-exclamation">

**Response**

```json
{
  "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. |

</Accordion>

<Accordion title="500 Internal Server Error" icon="fa-solid fa-triangle-exclamation">

**Response**

```json
{
  "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. |

</Accordion>

<br />