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

# Enable Geolocation

> Enables geolocation functionality in Apinizer. After enabling, geolocation features will be available for use in policies and other components.

## Endpoint

```
PUT /apiops/settings/geolocation/enable
```

## Authentication

Requires a Personal API Access Token with admin privileges.

### Header

```
Authorization: Bearer YOUR_TOKEN
```

## Request

### Headers

| Header        | Value          | Required |
| ------------- | -------------- | -------- |
| Authorization | Bearer {token} | Yes      |

### Path Parameters

None.

### Request Body

None.

## Response

### Success Response (200 OK)

```json theme={null}
{
  "success": true,
  "deploymentResult": {
    "success": true,
    "message": "Deployment completed successfully",
    "environmentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Deployed successfully"
      }
    ]
  }
}
```

### Error Response (401 Unauthorized)

```json theme={null}
{
  "error": "unauthorized_client",
  "error_description": "User does not have privilege to access admin settings!"
}
```

## cURL Example

```bash theme={null}
curl -X PUT \
  "https://demo.apinizer.com/apiops/settings/geolocation/enable" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Notes and Warnings

* **Admin Only**:
  * This endpoint requires admin privileges
  * Only sysAdmin users can enable geolocation
* **MMDB File Required**:
  * MMDB file should be uploaded before enabling
  * Geolocation may not work properly without MMDB file
* **Automatic Deployment**:
  * Setting is automatically deployed to all environments
  * Deployment results are returned in the response

## Related Documentation

* [Upload MMDB File](/api-reference/geolocation/upload-mmdb-file) - Upload MMDB file
* [Disable Geolocation](/api-reference/geolocation/disable-geolocation) - Disable geolocation
