> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# deleteEnvironmentVariables

> Deletes variables of the workspace or of one of its environments, with the same redeploys as `setEnvironmentVariables`. Needs `env_vars:write`.



**mutation** `deleteEnvironmentVariables(input: DeleteEnvironmentVariablesInput!): DeleteEnvironmentVariablesPayload!`

## Arguments

**`input`**: `DeleteEnvironmentVariablesInput!` (required)

The variables.

## Returns

`DeleteEnvironmentVariablesPayload!`

**`variables`**: `EnvironmentVariableConnection!`

The scope's variables after the deletion.

**Arguments:**

- `first`: `Int` = 100 — How many to return: 100 by default, at most 500. 0 returns only `totalCount`.
- `after`: `String` — The `endCursor` of the previous page.

---

**`deletedNames`**: `[String!]!`

The names that existed and were deleted; empty when none did.

## Examples

```graphql Mutation
mutation DeleteEnvironmentVariables($input: DeleteEnvironmentVariablesInput!) {
  deleteEnvironmentVariables(input: $input) {
    variables {
      edges {
        cursor
        node {
          __typename
        }
      }
      pageInfo {
        startCursor
        endCursor
        hasNextPage
        hasPreviousPage
      }
      totalCount
    }
    deletedNames
  }
}
```

```json Variables
{
  "input": {
    "scope": "WORKSPACE",
    "names": [
      "string"
    ]
  }
}
```

```json Response
{
  "data": {
    "deleteEnvironmentVariables": {
      "variables": {
        "edges": [
          {
            "cursor": "string",
            "node": {
              "__typename": "EnvironmentVariable"
            }
          }
        ],
        "pageInfo": {
          "startCursor": "string",
          "endCursor": "string",
          "hasNextPage": true,
          "hasPreviousPage": true
        },
        "totalCount": 1
      },
      "deletedNames": [
        "string"
      ]
    }
  }
}
```


## Related topics

- [Administration API: Environment variables](https://docs.paradime.io/developers/graphql-api/admin-api/environment-variables.md)
- [Admin client: environment variables](https://docs.paradime.io/developers/python-sdk/modules/admin/environment-variables.md)
- [Administration API: Environments](https://docs.paradime.io/developers/graphql-api/admin-api/environments.md)
- [Admin client: environments](https://docs.paradime.io/developers/python-sdk/modules/admin/environments.md)
- [Agent Environment Variables](https://docs.paradime.io/products/settings/environment-variables/dinoai-background-agent-environment-variables.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.