Mega icon

Mega

Work with Mega API

Contact → Create Inbox

AI-generated

Summary

Create a new inbox association for a specified contact by providing the contact's ID, the inbox ID to associate, and optionally a source identifier for the contact inbox record.

Inputs

  • Contact ID (required) — ID of the contact to which the inbox will be added.
  • Inbox ID (required) — ID of the inbox to associate with the contact.
  • Source ID — Optional source identifier for the contact inbox record.

Output shape

a single record confirming the creation of the contact inbox association, typically containing details such as identifiers of the contact and inbox and any metadata returned by the API.

The operation requires valid numeric IDs for both the contact and the inbox. The Source ID is optional and used as a string. Error handling depends on API response; ensure IDs correspond to existing entities.

Examples

Example 1: Associate an inbox with a contact to route messages through that inbox.

Set Contact ID to the existing contact's numeric ID, set Inbox ID to the target inbox's numeric ID, optionally provide a Source ID string if needed.

Links

Discussion