---
agentTools:
  projectIndex: https://docs.datananas.com/llms.txt
---

# Delete variable

Delete a variable

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API",
    "description": "Datananas API Reference",
    "termsOfService": "https://www.datananas.com/legal/terms",
    "contact": {
      "name": "Development team",
      "url": "https://docs.datananas.com",
      "email": "dev@datananas.com"
    },
    "version": "2.5.60"
  },
  "servers": [
    {
      "url": "https://api.datananas.com",
      "description": "Production"
    },
    {
      "url": "https://api.staging.datananas.com",
      "description": "Staging"
    }
  ],
  "tags": [
    {
      "name": "Variables"
    }
  ],
  "paths": {
    "/variables/{id}": {
      "delete": {
        "tags": [
          "Variables"
        ],
        "summary": "Delete variable",
        "description": "Delete a variable",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "202": {
            "description": "The variables has been deleted",
            "content": {}
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableEntity"
                }
              }
            },
            "description": "Unable to delete the variable because: \n  variable_in_datadesk: The variable is currently used in the datadesk mapping\n"
          }
        },
        "security": [
          {
            "api_auth": [
              "variables:delete:own",
              "variables:delete:company"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "id": {
        "in": "path",
        "name": "id",
        "description": "Resource unique identifier",
        "required": true,
        "schema": {
          "type": "string",
          "format": "objectId"
        },
        "example": "61e16ae52c0d6431cbe5db9d"
      }
    },
    "responses": {
      "Forbidden": {
        "description": "The user does not have the rights to access this resource",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/HTTPError"
            },
            "example": {
              "name": "Forbidden",
              "status": 403
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource the user wants to access can't be found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/HTTPError"
            },
            "example": {
              "name": "NotFound",
              "status": 404
            }
          }
        }
      }
    },
    "schemas": {
      "HTTPError": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Error name"
          },
          "status": {
            "type": "integer",
            "description": "http status"
          }
        }
      },
      "UnprocessableEntity": {
        "allOf": [
          {
            "$ref": "#/components/schemas/HTTPError"
          },
          {
            "properties": {
              "data": {
                "type": "object",
                "description": "Contains additional information about the reason why the request was unprocessable"
              },
              "reason": {
                "type": "string",
                "description": "Key explaining what is the error to adapt translation front side"
              }
            }
          }
        ]
      }
    },
    "securitySchemes": {
      "api_auth": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://api.datananas.com/users/authorize",
            "scopes": {
              "accounts:domain:own": "Find domains from company name",
              "accounts:email:own": "Find possible emails for a contact",
              "accounts:bulk:own": "Find possible emails for multiple contacts",
              "activities:filter:own": "Filter activities owned by own",
              "activities:filter:company": "Filter activities owned by his company",
              "activities:filter-user:own": "Filter user activities owned by own",
              "activities:filter-user:company": "Filter user activities owned by his company",
              "activities:filter-contact:own": "Filter contact activities owned by own",
              "activities:filter-contact:company": "Filter contact activities owned by his company",
              "calls:send:own": "Send calls from Twillio",
              "calls:receive:own": "Receive calls from Twillio",
              "campaigns:create:own": "Create a campaign owned by him",
              "campaigns:delete:company": "Delete a campaign owned by his company",
              "campaigns:delete:own": "Delete a campaign owned by him",
              "campaigns:filter:own": "Filter campaigns owned by him",
              "campaigns:filter:company": "Filter campaigns owned by his company",
              "campaigns:get:all": "Get a campaign",
              "campaigns:get:company": "Get a campaign owned by his company",
              "campaigns:get:own": "Get a campaign owned by him",
              "campaigns:test:own": "Test a user sequence for a contact of the user",
              "campaigns:test:company": "Test a company sequence for a contact of the company",
              "campaigns:update:own": "Update an existing campaign owned by him",
              "campaigns:update:company": "Update an existing campaign by his company",
              "campaigns:complete:own": "Generate a campaign with OpenAI",
              "contacts:create:own": "Create a new contact in a list owned by him",
              "contacts:create:company": "Create a new contact in a list owned by his company",
              "contacts:create-bulk:own": "Create contacts in a list owned by him",
              "contacts:create-bulk:company": "Create contacts in a list owned by his group",
              "contacts:engage:own": "Engage contacts owned by a user on a sequence",
              "contacts:engage:company": "Engage contacts owned by a company on a sequence",
              "contacts:engage-solo:own": "Engage contacts for the current user",
              "contacts:engage-other:own": "Engage contacts for a user",
              "contacts:engage-multi:own": "Engage contacts for many users",
              "contacts:export:company": "Export contacts owned by the company",
              "contacts:get:all": "Get a contact",
              "contacts:get:company": "Get a contact owned by his company",
              "contacts:get:own": "Get a contact owned by him",
              "contacts:update:own": "Update an existing contact in a list owned by him",
              "contacts:update:company": "Update an existing contact in a list owned by his company",
              "contacts:upgrade:company": "Upgrade the contacts of its own company",
              "contacts:delete:own": "Delete an existing contact in a list owned by him",
              "contacts:delete:company": "Delete an existing contact in a list owned by his company",
              "contacts:filter:company": "Filter contacts in the company",
              "contacts:filter:own": "Filter owned contacts",
              "contacts:import:own": "Import a file containing contacts",
              "contacts:unsubscribe-contact:own": "Unsubscribe his own contacts",
              "contacts:unsubscribe-contact:company": "Unsubscribe contacts from the company",
              "companies:list:all": "List all companies",
              "companies:get:all": "Get a company",
              "companies:get:company": "Get a company from the same company",
              "companies:update:all": "Update a company",
              "companies:update:company": "Update a company from the same company",
              "companies:create:all": "Create a company",
              "companies:delete:all": "Soft delete a company",
              "companies:subscribe:own": "Manage company subscription",
              "companies:update-subscription:company": "Update company subscription",
              "companies:update-subscription:all": "Update company in all companies",
              "companies:quotas:all": "Get quotas for all companies",
              "companies:quotas:company": "Get quotas from one company",
              "email:score:own": "Score an email",
              "feedback:feedback:own": "Submit a feedback about Engage",
              "feedback:feedback:company": "Submit a feedback about Engage",
              "filters:filter:own": "List filters owned by the a user",
              "filters:filter:company": "List filters owned by a company",
              "filters:create:own": "Create a filter for a user",
              "filters:update:own": "Updates a user filter",
              "filters:update:company": "Updates filters for a company",
              "filters:delete:own": "Delete a user filter",
              "filters:delete:company": "Delete filters for a company",
              "filters:get:own": "Get a filter for a user",
              "filters:get:company": "Get a filter for a company",
              "groups:list:all": "List all groups of all companies",
              "invoices:create:all": "Create invoices for any company",
              "invoices:update:all": "Update an invoice for any company",
              "invoices:get:all": "Get any invoice of any company",
              "invoices:get:company": "Get any invoice of one company",
              "invoices:filter:all": "Apply filters on all companies",
              "invoices:filter:company": "Apply filters on one company",
              "lists:list:own": "List lists owned by him",
              "lists:list:company": "List lists owned by the company",
              "lists:create:own": "Create a new list of contacts owned by him",
              "lists:get:own": "Get one list of a user",
              "lists:get:company": "Get one list of a company",
              "lists:update:own": "Edit a list of contacts owned by him",
              "lists:update:company": "Edit a list of contacts owned by the company",
              "lists:delete:own": "Delete a list owned by him",
              "lists:delete:company": "Delete a list owned by the company",
              "messages:filter:own": "Filter messages owned by him",
              "messages:list:own": "List messages owned by him (compatibility)",
              "messages:filter:company": "Filter messages owned by the company",
              "messages:list:company": "Filter messages owned by the company",
              "messages:get:own": "Get a message owned by him",
              "messages:get:company": "Get a message owned by the company",
              "messages:create:own": "Creates a new message owned by the user",
              "messages:create:company": "Creates a new message for another user",
              "messages:update:own": "Update a message owned by him",
              "messages:update:company": "Update a message owned by the company",
              "pending-emails:filter:own": "Get the list of scheduled emails for the user",
              "pending-emails:filter:company": "Get the list of scheduled emails for the company",
              "pending-emails:update:own": "Update a pending for a contact",
              "pending-emails:update:company": "Update a pending for a company",
              "plannings:create:own": "Create a planning",
              "plannings:delete:own": "Delete a planning for a user",
              "plannings:delete:company": "Delete a planning for a company",
              "plannings:filter:company": "Filter plannings for a company",
              "plannings:get:company": "Get a planning for a company",
              "plannings:set-default:own": "Users can set a default planning among its own plannings",
              "plannings:set-default:company": "Users can set a default planning among the ones of its company",
              "plannings:update:own": "Update a planning for a user",
              "plannings:update:company": "Update a planning for a company",
              "scopes:get:own": "Get own scopes",
              "scopes:get:company": "Get company scopes",
              "scopes:get:all": "Get a single scope",
              "scopes:list:all": "List all scopes",
              "stages:create:company": "Create a company stage",
              "stages:delete:company": "Delete a company stage",
              "stages:filter:company": "Get some company stages",
              "stages:get:company": "Get one stage of the company",
              "stages:update:company": "Update a stage",
              "stats:get:own": "Access to user allowed stats",
              "stats:get:company": "Access to all the stats of a company",
              "tasks:create:own": "Create a new task owned by him",
              "tasks:create:company": "Create a task owned someone in the same company",
              "tasks:update:own": "Update an existing email template owned by him",
              "tasks:update:company": "Update an existing email template by his company",
              "tasks:filter:own": "Filter tasks owned by him",
              "tasks:filter:company": "Filter tasks owned by the company",
              "templates:use:own": "CRUD templates owned by a user",
              "users:create:company": "Create user in own company",
              "users:list:all": "List all users in every companies, groups",
              "users:list:company": "List all users in own company",
              "users:revoke-token:company": "Revoke an access token for a company",
              "users:revoke-token:own": "Revoke an access token for a user",
              "users:get:all": "Get every user",
              "users:get:company": "Get a user among users in a company",
              "users:get:own": "Get the connected user",
              "users:update:all": "Update a user in every companies, groups",
              "users:update:company": "Update users in company",
              "users:update:own": "Update his own information",
              "users:list-roles:all": "List all roles of a user",
              "users:logout:own": "Log out a user",
              "users:manage-roles:all": "Grant/Revoke role to all users",
              "users:manage-roles:company": "Grant/Revoke role to users within the company",
              "users:delete:company": "Delete a user in his company",
              "users:delete:all": "Delete a user",
              "users:sudo:all": "Sudo to user accounts",
              "roles:create:all": "Create a role",
              "roles:update:all": "Update a role",
              "roles:list:all": "List all roles",
              "roles:get:all": "Get a role",
              "roles:list-scopes:all": "List all scopes in a role",
              "variables:filter:own": "Filter his own variables",
              "variables:filter:company": "Filter his company variables",
              "variables:delete:own": "Delete variable owned by him",
              "variables:delete:company": "Delete variable owned by his company",
              "variables:create:own": "Create a variable",
              "integrations:list:all": "List all integrations",
              "integrations:list:company": "List company integrations",
              "integrations:list:own": "List users integrations",
              "integrations:create:all": "Create integration for a company",
              "integrations:delete:all": "Delete and revoke an integration for a company",
              "integrations:get-fields:company": "Get available fields for an integration",
              "blacklist:count:own": "Count blacklisted entries owned by the user",
              "blacklist:count:company": "Count blacklisted entries owned by the company",
              "blacklist:create:company": "Add a blacklist owned by the company",
              "blacklist:delete:own": "Delete a blacklisted email owned by the user",
              "blacklist:delete:company": "Delete a blacklisted email owned by the company",
              "blacklist:export:company": "Export the company blacklist",
              "blacklist:filter:company": "Filter his company blacklisted emails",
              "media:filter:company": "Filter media owned by company",
              "media:upload:company": "Upload a media file",
              "notes:create:own": "Add a note to a contact owned by him",
              "notes:create:company": "Add a note to a contact owned by the company",
              "notes:update:own": "Update an existing contact's note owned by him",
              "notes:update:company": "Update an existing contact's note owned by his company",
              "notes:filter:own": "Filter notes owned by him",
              "notes:filter:company": "Filter a note owned by his company",
              "notes:get:own": "Get a note owned by him",
              "notes:get:company": "Get a note owned by his company",
              "notes:delete:own": "Delete a note owned by him",
              "notes:delete:company": "Delete a note owned by his company",
              "notifications:filter:own": "Get the user notification",
              "providers:revoke-briteverify:own": "Disconnect a Briteverify account",
              "providers:revoke-clearbit:own": "Disconnect a Clearbit account",
              "providers:revoke-imap-ews:own": "Disconnect an email directly with imap/ews",
              "providers:revoke-imap-smtp:own": "Disconnect an email directly with imap/smtp",
              "providers:revoke-google:own": "Disconnect a Google account",
              "providers:revoke-microsoft:own": "Disconnect a Microsoft account",
              "providers:revoke-nylas:own": "Disconnect a Nylas account",
              "providers:revoke-pipedrive:own": "Disconnect a Pipedrive account",
              "providers:revoke-calendly:own": "Disconnect a Calendly account",
              "providers:authorize-briteverify:own": "Connect a Briteverify account",
              "providers:authorize-clearbit:own": "Connect a Clearbit account",
              "providers:authorize-google:own": "Connect a Google account",
              "providers:authorize-imap-ews:own": "Connect an email directly with imap/ews",
              "providers:authorize-imap-smtp:own": "Connect an email directly with imap/smtp",
              "providers:authorize-nylas:own": "Connect a Nylas account",
              "providers:authorize-microsoft:own": "Connect a Microsoft account",
              "providers:authorize-pipedrive:own": "Connect a Pipedrive account",
              "providers:authorize-calendly:own": "Connect a Calendly account",
              "webhooks:get:own": "Get own webhooks url",
              "webhooks:create:company": "Create a webhook owned by the company",
              "webhooks:update:company": "Update a webhook owned by the company",
              "webhooks:delete:company": "Delete a webhook owned by the company"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 93,
      "1": 1,
      "2": 60,
      "3": 224,
      "4": 62,
      "5": 158,
      "6": 165,
      "7": 0,
      "8": 75,
      "9": 198,
      "10": 118,
      "11": 30
    }
  }
}
```