Skip to main content

CarbonCopyAdd

Creates a new carbon copy rule that automatically duplicates EDI traffic flowing in the specified direction from one mailbox to another.

:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::

Method Signature​

int CarbonCopyAdd(string SessionID, int FromMailboxID, int ToMailboxID, Direction Direction)

Parameters​

ParameterTypeRequiredDescription
SessionIDstringYesActive session token from Login()
FromMailboxIDintYesMailbox whose inbound or outbound traffic will be copied
ToMailboxIDintYesMailbox that will receive the duplicate traffic
DirectionDirectionYesWhich traffic direction to copy (InBox, OutBox)

Response​

Returns an int representing the newly created CarbonCopyID. Store this value to manage or terminate the rule later.

<!-- Example response XML -->
<CarbonCopyAddResult>301</CarbonCopyAddResult>

ENUMs​

Direction​

ValueDescription
NoDirNo direction specified (not valid for this call)
OutBoxCopy outbound traffic from FromMailboxID to ToMailboxID
InBoxCopy inbound traffic arriving at FromMailboxID to ToMailboxID

See Appendix — ENUMs for the complete Direction enumeration.

Code Examples​

// .NET 10 — dotnet-svcutil generated proxy
// Mirror all inbound parcels from mailbox 100 to mailbox 200 for archival
int carbonCopyId = await client.CarbonCopyAddAsync(
sessionID,
fromMailboxID: 100,
toMailboxID: 200,
direction: Direction.InBox);

Console.WriteLine($"Carbon copy rule created. CarbonCopyID: {carbonCopyId}");

REST Equivalent​

See Create Carbon Copy — POST /v2/carboncopies/create.