How to upload a new certificate programmatically in a device provisioning ? I am able to it manually but how can you upload it from a C# code ? Is there any Api ? I don't see anything about it on the Microsoft Documentation.
Moreover, is it possible to use the certificates from the Azure Key Vault ?
EDIT:
I found how to do it with Azure Cli, but I would like to do it with C#
az iot dps certificate create --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate --path /certificates/Certificate.pem
EDIT:
I found how to do it by API.
https://learn.microsoft.com/en-us/rest/api/iot-dps/dps-certificate/create-or-update

Thank you draco951 for providing your answer in question section itself. I am keeping this in answer section to help other community member.
You can use an API in your C# code to upload a new certificate in a device provisioning Service
HTTP API --
and pass the certificate in request body
Reference: https://learn.microsoft.com/en-us/rest/api/iot-dps/dps-certificate/create-or-update