> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/reference/frends-platform-api/platform-api-reference/environment-variables.md).

# Environment Variables

## GET /api/v1/environment-variables

> List Environment Variables

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"EnvironmentVariables"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/environment-variables":{"get":{"tags":["EnvironmentVariables"],"summary":"List Environment Variables","operationId":"GetEnvironmentVariables","parameters":[{"name":"PageNumber","in":"query","description":"Current page number. Default value is 1.","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}},{"name":"PageSize","in":"query","description":"Maximum page size is 200. Default page size is 30.","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}},{"name":"environmentVariableName","in":"query","description":"Name of the Environment Variable(s)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseOfDtoEnvironmentVariableSchemaGet"}}}}}}}},"components":{"schemas":{"PagedResponseOfDtoEnvironmentVariableSchemaGet":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DtoEnvironmentVariableSchemaGet"},"description":"Response data"},"paging":{"description":"Response paging","$ref":"#/components/schemas/PagingModel"}}},"DtoEnvironmentVariableSchemaGet":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/JsonElement"},"childSchemas":{"type":"array","items":{"$ref":"#/components/schemas/DtoEnvironmentVariableSchemaBase"}},"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/EnvironmentVariableType"},"values":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DtoEnvironmentVariableValue"}}}},"JsonElement":{},"DtoEnvironmentVariableSchemaBase":{"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/EnvironmentVariableType"},"values":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DtoEnvironmentVariableValue"}}}},"EnvironmentVariableType":{"enum":["String","Object","Array","Secret","Number","Boolean"]},"DtoEnvironmentVariableValue":{"type":"object","properties":{"environment":{"$ref":"#/components/schemas/DtoEnvironmentBase"},"value":{"type":"array","items":{"type":"array","items":{"type":"array","items":{}}}},"modifiedUtc":{"type":"string","format":"date-time"},"modifier":{"type":"string"},"version":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}}},"DtoEnvironmentBase":{"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Unique identifier for the Environment","format":"int64"},"displayName":{"type":["null","string"],"description":"Display name for the Environment"}}},"PagingModel":{"type":"object","properties":{"currentPage":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Current page","format":"int32"},"pageSize":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Number of entries per page","format":"int32"},"totalCount":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Total number of entries","format":"int32"},"firstPage":{"type":["null","string"],"description":"Url of the first page","format":"uri"},"lastPage":{"type":["null","string"],"description":"Url of the last page","format":"uri"},"nextPage":{"type":["null","string"],"description":"Url of the next page","format":"uri"},"previousPage":{"type":["null","string"],"description":"Url of the previous page","format":"uri"}}}}}}
```

## POST /api/v1/environment-variables

> Add Environment Variable

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"EnvironmentVariables"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/environment-variables":{"post":{"tags":["EnvironmentVariables"],"summary":"Add Environment Variable","requestBody":{"description":"Type of schema to be created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoRootSchemaCreate"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"description":"Details the created Environment Variable group.","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"}},"application/json":{"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"}},"text/json":{"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"}}}}}}}},"components":{"schemas":{"DtoRootSchemaCreate":{"type":"object","properties":{"name":{"type":"string"}}}}}}
```

## GET /api/v1/environment-variables/{id}

> Get an Environment Variable

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"EnvironmentVariables"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/environment-variables/{id}":{"get":{"tags":["EnvironmentVariables"],"summary":"Get an Environment Variable","operationId":"GetEnvironmentVariable","parameters":[{"name":"id","in":"path","description":"Id of the Environment Variable","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOfDtoEnvironmentVariableSchemaGet"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ResponseOfDtoEnvironmentVariableSchemaGet":{"required":["data"],"type":"object","properties":{"data":{"oneOf":[{"type":"null"},{"description":"Response data","$ref":"#/components/schemas/DtoEnvironmentVariableSchemaGet"}]}}},"DtoEnvironmentVariableSchemaGet":{"type":"object","properties":{"description":{"$ref":"#/components/schemas/JsonElement"},"childSchemas":{"type":"array","items":{"$ref":"#/components/schemas/DtoEnvironmentVariableSchemaBase"}},"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/EnvironmentVariableType"},"values":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DtoEnvironmentVariableValue"}}}},"JsonElement":{},"DtoEnvironmentVariableSchemaBase":{"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/EnvironmentVariableType"},"values":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DtoEnvironmentVariableValue"}}}},"EnvironmentVariableType":{"enum":["String","Object","Array","Secret","Number","Boolean"]},"DtoEnvironmentVariableValue":{"type":"object","properties":{"environment":{"$ref":"#/components/schemas/DtoEnvironmentBase"},"value":{"type":"array","items":{"type":"array","items":{"type":"array","items":{}}}},"modifiedUtc":{"type":"string","format":"date-time"},"modifier":{"type":"string"},"version":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}}},"DtoEnvironmentBase":{"type":"object","properties":{"id":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Unique identifier for the Environment","format":"int64"},"displayName":{"type":["null","string"],"description":"Display name for the Environment"}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## POST /api/v1/environment-variables/{rootSchemaId}

> Create child Environment Variable

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"EnvironmentVariables"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/environment-variables/{rootSchemaId}":{"post":{"tags":["EnvironmentVariables"],"summary":"Create child Environment Variable","parameters":[{"name":"rootSchemaId","in":"path","description":"Id of the parent Environment Variable schema.","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int64"}}],"requestBody":{"description":"Type of the child Environment Variable to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoChildSchemaCreate"}}},"required":true},"responses":{"201":{"description":"Created","headers":{"Location":{"description":"Details of the created Environment Variable.","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int64"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"DtoChildSchemaCreate":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/EnvironmentVariableChildType"},"name":{"type":"string"}}},"EnvironmentVariableChildType":{"enum":["String","Array","Secret","Number","Boolean"]},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## DELETE /api/v1/environment-variables/{schemaId}

> Delete Environment Variable

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"EnvironmentVariables"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/environment-variables/{schemaId}":{"delete":{"tags":["EnvironmentVariables"],"summary":"Delete Environment Variable","parameters":[{"name":"schemaId","in":"path","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int64"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## PATCH /api/v1/environment-variables/{schemaId}

> Update the description of an Environment Variable.

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"EnvironmentVariables"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/environment-variables/{schemaId}":{"patch":{"tags":["EnvironmentVariables"],"summary":"Update the description of an Environment Variable.","parameters":[{"name":"schemaId","in":"path","description":"Identifier of the Environment Variable being updated.","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int64"}}],"requestBody":{"description":"New description for the Environment Variable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DtoEnvironmentVariableDescriptionUpdate"}}},"required":true},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"DtoEnvironmentVariableDescriptionUpdate":{"required":["description"],"type":"object","properties":{"description":{"type":"string"}},"description":"New description."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```

## PUT /api/v1/environment-variables/{schemaId}/values/{environmentId}

> Update Environment Variable

```json
{"openapi":"3.1.1","info":{"title":"Frends API","version":"1.0.0"},"tags":[{"name":"EnvironmentVariables"}],"servers":[{"url":"https://example.v64.frendsapp.com/"}],"security":[{}],"paths":{"/api/v1/environment-variables/{schemaId}/values/{environmentId}":{"put":{"tags":["EnvironmentVariables"],"summary":"Update Environment Variable","parameters":[{"name":"schemaId","in":"path","description":"Identifier of the Environment Variable being updated.","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int64"}},{"name":"environmentId","in":"path","description":"Identifier of the Environment being updated.","required":true,"schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":"integer","format":"int64"}}],"requestBody":{"description":"New value for the Environment Variable. The value type depends on the type of the Environment Variable schema.","content":{"application/json":{"schema":{"type":"array","items":{"type":"array","items":{"type":"array","items":{}}}}}},"required":true},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found"},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.frends.com/reference/frends-platform-api/platform-api-reference/environment-variables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
