Update DNS Zone using api

Avatar
  • Answered
I'm trying to update a DNS A record using a custom script, but it always gives me Access Denied. What would be the correct api call for this? And where can I get an authorization token to include in the call? Here's the api url I'm using to test fetching some info, using Postman: https://.com:2083/cpsessXXXXXXXXX/json-api/cpanel?cpanel_jsonapi_user=&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=fetchzone_records&domain=.com Thanks
Avatar
johnpaulb-imhs1
Hello, Thank you for your question regarding updating a DNS Zone using an API. Here is a helpful link to the official cPanel documentation on the edit_zone_record functions, it includes information on the 'A record' parameters. This feature would require root access on a VPS, or Dedicated server to be enabled in WHM, so it would not be possible on a shared server. API Authentication Tokens would also need a VPS, or Dedicated server to setup but would not require root access. Thank you, John-Paul