Not able to delete artifacts with APIs

I am using cURL command to delete an artifact package, but there I am getting the following error

< HTTP/1.1 403 Forbidden
< Server: Nexus/3.30.0-01 (OSS)
< X-Content-Type-Options: nosniff
< Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
< X-XSS-Protection: 1; mode=block
< Content-Length: 0

Here I am using this command

This command is running as a Jenkins job and all variables are assigned values. Can anyone please confirm why Nexus is giving this error and how to find the root cause.

Hi Pallavi,
Status code 403 Forbidden means you do not have permissions to delete the asset.

403 Forbidden could mean your login credentials were incorrect, or it could mean they were correct but you didn’t have delete permissions on the asset or repository.

Thanks all. I got it resolved. Is there anyway to delete component using Nexus API calls?

You can find the swagger UI for our REST APIs under Admin > System > API. I believe there is a delete on the component API.