> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.conversive.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conversive.ai/_mcp/server.

# Send Bulk MMS

> Send MMS messages with text or media only, including media URL requirements, response handling, and record creation details.

Use `sendBulkMMS()` to send the same multimedia message to one or more Salesforce records.

## What this API supports

This API supports both:

* **MMS with text and media**
* **MMS with media only**

To send an MMS, the subscriber must provide at least one valid **public media URL**.

When the request is accepted, the SDK creates outbound records on **Message History** and queues them for delivery.

## Method signature

```apex
public static ConversiveAPI.MessageResponse sendBulkMMS(
    List<Id> contactIds,
    String message,
    List<String> mediaUrls,
    List<String> phoneList,
    Id senderId
)
```

## Inputs

| Parameter    | Type           | Required | Description                                                            |
| ------------ | -------------- | -------- | ---------------------------------------------------------------------- |
| `contactIds` | `List<Id>`     | Yes      | Salesforce record IDs that should receive the MMS                      |
| `message`    | `String`       | No       | Text body for the MMS. Can be blank for media-only MMS                 |
| `mediaUrls`  | `List<String>` | Yes      | Publicly accessible media URLs to attach                               |
| `phoneList`  | `List<String>` | Yes      | Ordered phone field API names used to resolve recipient phone numbers  |
| `senderId`   | `Id`           | Yes      | Salesforce ID of the `Sender_Id__c` record used for outbound messaging |

## Input examples

```apex
new List<Id>{ con1.Id, con2.Id }
'Hello, this is the invite for our new Product Launch Event.'
new List<String>{ 'https://images.unsplash.com/photo-1516387938699-a93567ec168e' }
new List<String>{ 'MobilePhone', 'Phone' }
senderRec.Id
```

## Media URL requirements

The Confluence page documents the following rules:

* at least one media URL is required
* the URL must be **public and reachable**
* the URL should point directly to the media asset
* one or more media URLs may be provided
* MMS can be sent with text or without text, but **not without media**

## Response type

```apex
public class MessageResponse {
    public String response;         // SUCCESS / ERROR
    public String responseMessage;  // Human-readable message
}
```

## Documented validation failures

| Condition                     | Documented result                                                                                 |
| ----------------------------- | ------------------------------------------------------------------------------------------------- |
| `contactIds` is null or empty | `response = 'ERROR'`, `responseMessage = 'No contacts provided'`                                  |
| `mediaUrls` is null or empty  | `response = 'ERROR'`, `responseMessage = 'At least one valid public media URL must be provided.'` |
| `phoneList` is null or empty  | `response = 'ERROR'`, `responseMessage = 'At least one phone field must be provided.'`            |
| `senderId` is null            | `response = 'ERROR'`, `responseMessage = 'Sender Id is required.'`                                |

## Message processing behavior

When validation passes, the SDK:

1. validates input parameters
2. resolves recipient phone numbers from `phoneList`
3. validates that at least one media URL exists
4. uses the provided sender record
5. creates outbound records on **Message History**
6. stores each media URL in the **MMS Detail** child object
7. submits the messages to the Conversive platform

## Record creation behavior

### Message History

The parent outbound record is created on **Message History**.

### MMS Detail

Each media URL is stored as a child record in **MMS Detail**, including:

* the media URL
* a lookup to the parent **Message History** record

### Multiple media URLs

If multiple URLs are passed:

* 1 parent **Message History** record is created
* 1 **MMS Detail** child record is created per media URL

## Message status lifecycle

| Status      | Meaning                                          |
| ----------- | ------------------------------------------------ |
| `Submitted` | Message record created and queued for delivery   |
| `ERROR`     | Delivery failed during the callout to Conversive |

### Callout failure behavior

If the message record is created but the platform callout fails:

* initial status = `Submitted`
* later status = `ERROR`

## Example

```apex
Contact con1 = new Contact(
    LastName = 'Mark Smith',
    MobilePhone = '9876543210'
);

Contact con2 = new Contact(
    LastName = 'Eugene Taylor',
    MobilePhone = '9876543211'
);

insert new List<Contact>{ con1, con2 };

Sender_Id__c senderRec = new Sender_Id__c(
    Label__c = 'Marketing',
    Phone__c = '9330909119'
);
insert senderRec;

ConversiveAPI.MessageResponse resp =
    ConversiveAPI.sendBulkMMS(
        new List<Id>{ con1.Id, con2.Id },
        'Hello, this is the invite for our new Product Launch Event.',
        new List<String>{
            'https://images.unsplash.com/photo-1516387938699-a93567ec168e'
        },
        new List<String>{ 'MobilePhone', 'Phone' },
        senderRec.Id
    );

System.debug('Response: ' + resp.response);
System.debug('Message: ' + resp.responseMessage);
```

## Media-only example

```apex
ConversiveAPI.MessageResponse resp =
    ConversiveAPI.sendBulkMMS(
        new List<Id>{ con.Id },
        '',
        new List<String>{ 'https://images.unsplash.com/photo-1516387938699-a93567ec168e' },
        new List<String>{ 'MobilePhone', 'Phone' },
        senderRec.Id
    );
```

## Example success response

```apex
response = 'SUCCESS'
responseMessage = 'Messages queued for delivery'
```

## Example error responses

### No contacts provided

```apex
response = 'ERROR'
responseMessage = 'No contacts provided'
```

### Missing media URLs

```apex
response = 'ERROR'
responseMessage = 'At least one valid public media URL must be provided.'
```

### Missing sender ID

```apex
response = 'ERROR'
responseMessage = 'Sender Id is required.'
```

### Missing phone fields

```apex
response = 'ERROR'
responseMessage = 'At least one phone field must be provided.'
```

## What success means here

A successful `MessageResponse` means the MMS was accepted and queued. It does not mean final carrier delivery has completed.

## Best practices

* always provide at least one reachable public media URL
* test media URLs before using them in production
* use small-scale testing before high-volume sends
* review both **Message History** and **MMS Detail** when troubleshooting