POST /api/tenants/{FedmemberID}/theme/{theme}/pki

Adds PKI information for the specified tenant theme.

Note: Before uploading the security certificate and assigning it in the developer portal, you must define it in Policy Manager so that trust is established. For instructions, see Import CA Certificate (Policy Manager help).

Authorization Roles/Permissions: Must be logged in. Must have Modify permission for the tenant; Site Admin or Business Admin.

This topic includes the following sections:

HTTP Method


Back to top



Back to top

Sample Request

The example below shows upload of a digital certificate. The request body includes the keystore file name, alias name, password, and content.

Request URL


Sample request headers

Accept: text/html,application/xhtml+xml,application/xml
Content-Type: multipart/form-data; boundary=---------------------------75021945131717
Host: acmepaymentscorp
Cookie: _ga=GA1.2.126252262.1516220845; _mkto_trk=id:629-REV-7

Sample request body

The example below has been abbreviated for display purposes.


Content-Disposition: form-data; name="path"; filename="acmepaymentscorp_cert.jks"
Content-Type: application/octet-stream

þíþí\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0001\u0000\u0000\ . . .

Content-Disposition: form-data; name="keystorePass"



Content-Disposition: form-data; name="alias"



Content-Disposition: form-data; name="aliasPass"



Content-Disposition: form-data; name="X-Csrf-Token_acmepaymentscorp"

TokenID%3D7529bcc2-9046-11e8-ac6f-e9decb05b61d%2Cexpiration . . .

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/xml, application/vnd.soa.v85+json
Content-Type multipart/form-data
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
FedmemberID Path String Required Unique ID for a specific tenant, in a federation (multi-tenant) scenario; for example, acmepaymentscorp.
theme Path String Required The name of the platform theme.
FileName Body The uploaded file Required The uploaded PKI file; for example, acmepaymentscorp.p12.
alias Query String Required Specifies the alias in the keystore that the platform should use.
keystorePass Optional String Optional Optional keystore password.
aliasPass Optional String Optional Optional alias password. Can be omitted if not needed or if the value is the same as the keystore password.
forceTrust Optional Boolean Optional Default: false. If this parameter is included and set to true, the information is added to the trust store if not trusted already. If this parameter is included and set to false, and the information is not trusted, an error is returned.

Back to top


If successful, this operation returns HTTP status code 200, with information about the digital certificate that was uploaded.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/json

Cache-Control: no-cache, no-store
Content-Type: text/html
Date: Wed, 25 Jul 2018 20:36:23 GMT

Sample response body: application/json

In this example, the response content is wrapped in HTML. In the below, line breaks have been added for readability.

<!DOCTYPE html><html lang="en" status="201" statusText="success"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta name="description" content="Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Mauris lacus elit, ornare eget luctus vel, porta id elit. Maecenas molestie, libero sit amet 
blandit faucibus, orci nisi aliquet nisi, id mollis mauris ipsum a enim. Morbi lacus velit, 
placerat sit amet luctus eget, pulvinar a massa. Lorem ipsum dolor sit amet, consectetur 
adipiscing elit. Morbi eleifend tincidunt pellentesque. Cras eu sapien massa, vitae rutrum sapien. 
Aenean id condimentum sem. Suspendisse tempor luctus ipsum, vel metus."></head>
<body status="201" statusText="success">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
&lt;PKIAndCertificateInfo xmlns=&quot;;&gt;
&lt;certificateInfo&gt;&lt;subjectDN&gt;CN=GenCert, OU=acmepaymentscorpBilling, 
O=acmepaymentscorp, L=NA, ST=FL, C=US&lt;/subjectDN&gt;&lt;issuerDN&gt;CN=GenCert, 
OU=acmepaymentscorpBilling, O=acmepaymentscorp, L=NA, ST=FL, 
&lt;/certificateInfo&gt;&lt;Links&gt;&lt;Link rel=&quot;delete&quot; 
&quot;/&gt;&lt;Link rel=&quot;self&quot; 

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/xml, application/vnd.soa.v85+json

Back to top

Response Body

Name Type Description
PKIInfo PKIInfo The response includes information about the digital certificate that was uploaded.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics