Create environment variables by API for Pages & Workers

Create environment variables by API (https:// api.Cloudflare .com/) for Pages & Workers. So that secrets can be easily managed by universal secret platforms like Doppler https:// doppler .com/

You can for Pages :slightly_smiling_face:
Pretty sure you can for Workers too, I can’t find the API docs section but Doppler offers integration directly: Cloudflare Workers Integrations | Doppler Universal Secrets Platform

Link: https://api.cloudflare.com/#pages-project-update-project

@mcfadyeni Great, the Link for Pages is already helping a lot. For Workers, I was scrolling now through the complete worker API section, but was not seeing something. Maybe it’s really only for Pages existing, atm?

The problem with Doppler is: they have a guide, but no native integration. (https:// docs.doppler .com/docs/Cloudflare-workers) You need to sync by yourself with GitHub workflow or similar. And they said, they will only integrate with Cloudflare if they have an API, because they don’t want to integrate CLIs.

You can indeed put secrets via the API (just remembered that I could look at the CLI code since it’s open-source).

It doesn’t seem to be documented in the API documentation but it’s here:

1 Like

Awesome - thank you - Then I think we can rephrase this feature request to: Document Cloudflare Workers environment variables endpoint in the API documentation :wink: