You can use the AXL interface, which is based on SOAP. You can find information about the AXL interface at http://developer.cisco.com. Select Cisco Unified Administration AXL (AXL) in the dropdown. There is a lot of material there.
To create Authorization code you need to send xml according to below. Be aware that from CUCM version 8.5 the AXL API has changed a bit, and namespaces is very important in the later versions. Also since CUCM's usually use self-signed certificates you might need to override invalid certificates in your code.
I've been programming toward the AXL interface (not in .net or C# though) for many years and it works pretty well.
Request:
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<addFacInfo xmlns="http://www.cisco.com/AXL/API/8.5">
<facInfo xmlns="">
<name>testcode</name>
<code>12345</code>
<authorizationLevel>5</authorizationLevel>
</facInfo>
</addFacInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response: (The returned GUID is the GUID of the new fac code in the db, and when a GUID is returned it indicates that it was successful).
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:addFacInfoResponse xmlns:ns="http://www.cisco.com/AXL/API/8.5">
<return>{60484313-4FD3-FF7A-615D-DFCE1172B799}</return>
</ns:addFacInfoResponse>
</soapenv:Body>
</soapenv:Envelope>