Upload a new certificate to the MDM certificate repository

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Upload a certificate to the MDM certificate repository. The certificate file must first be uploaded via the file upload API to obtain a file_id. Supports replacing existing certificates and optionally redistributing associated profiles.

Request URL

https://{serverurl}/api/v1/mdm/profiles/certificates

Scope

MDMOnDemand.MDMDeviceMgmt.CREATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

- Request Body

application/json
JSON object
Hide Sub-Attributes
certificate_file_uploadlongMandatory

File ID of the certificate file obtained from the file upload API

certificate_passwordstringOptional

Password for the certificate. Required for identity certificates (.p12, .pfx). Maximum 250 characters

certificate_typeintegerOptional

Type of certificate. Default 0 (CA uploaded certificate)

old_certificate_idlongOptional

Certificate ID of an existing certificate to replace. When provided, the new certificate replaces the old one in all associated profiles. Obtain from the Get Certificates response

redistribute_profilesbooleanOptional

If true and old_certificate_id is provided, automatically redistributes profiles that used the old certificate. Default false

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/v1/mdm/profiles/certificates \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'content-type: application/json' \
  --data '{"certificate_file_upload":9210}'
Show full

Sample Request Body

Upload a new CA certificate to the repository

Copied!
  {
    "certificate_password": "mySecurePassword",
    "certificate_type": 0,
    "old_certificate_id": 0,
    "certificate_file_upload": 9210,
    "redistribute_profiles": false
  }
                
Show full

Replace an existing certificate and redistribute associated profiles

Copied!
  {
    "certificate_password": "newPassword",
    "certificate_type": 0,
    "old_certificate_id": 9007199254741000,
    "certificate_file_upload": 9211,
    "redistribute_profiles": true
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json

JSON object
Hide Sub-Attributes
certificate_idlong

Unique identifier of the newly created certificate

certificate_namestring

Display name of the certificate (extracted from the certificate CN)

certificate_serial_numberstring

Serial number of the certificate

certificate_subject_dnstring

Full Subject Distinguished Name

certificate_issuer_dnstring

Full Issuer Distinguished Name

certificate_notbeforestring

Certificate validity start time in Unix milliseconds

certificate_notafterstring

Certificate expiry time in Unix milliseconds

issuer_orgstring

Organization name of the issuer

issuer_namestring

Common Name (CN) of the issuer

days_to_expireinteger

Number of days until certificate expiry

Possible HTTP Status Codes

200HTTP code

Sample Response: HTTP 200

Certificate successfully uploaded with parsed details

Copied!
  {
    "certificate_id": 9007199254740996,
    "certificate_issuer_dn": "C=US,O=Apple Inc.,OU=Apple Certification Authority,CN=Apple Application Integration 2 Certification Authority",
    "days_to_expire": 364,
    "issuer_org": "Apple Inc.",
    "certificate_notbefore": "1542767387054",
    "certificate_subject_dn": "C=US, CN=APSP:dee10de6-00c5-4860-b6ec-3ed5ca4a8b3a, UID=com.apple.mgmt.External.dee10de6-00c5-4860-b6ec-3ed5ca4a8b3a",
    "certificate_name": "APSP:dee10de6-00c5-4860-b6ec-3ed5ca4a8b3a",
    "certificate_serial_number": "3977386725918465264",
    "certificate_notafter": "1574303387054",
    "issuer_name": "Apple Application Integration 2 Certification Authority"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.