Project
Create an environment variable
Creates a new environment variable.
post/project/{project-slug}/envvar
Request
- Base URLhttps://circleci.com/api/v2
- URLhttps://circleci.com/api/v2/project/{project-slug}/envvar
- Auth
- API key in header Circle-Token
- or HTTP bearer
- or HTTP basic
- or API key in query parameter circle-token
Path parameters
project-slugstring required
Project slug in the form vcs-slug/org-name/repo-name. The / characters may be URL-escaped. For projects that use GitLab or GitHub App, use circleci as the vcs-slug, replace org-name with the organization ID (found in Organization Settings), and replace repo-name with the project ID (found in Project Settings).
Request body
Example request
{
"name": "foo",
"value": "xxxx1234"
}Response
The environment variable.
Example response
{
"name": "foo",
"value": "xxxx1234",
"created-at": "#joda/inst 2023-04-14T21:20:14+0000"
}Changes
No recorded changes to this operation across all 1 revision of this API.