To create secrets using the REST API, you must have write access to the repository or admin access to the organization. For more information, see "[{% data variables.product.prodname_actions %} secrets API](/v3/actions/secrets/)."