---
updatedAt: 2026-09-01T14:05:29.000Z
agentTools:
  siteIndex: https://developer.jamf.com/llms.txt
  projectIndex: https://developer.jamf.com/platform-api/llms.txt
---

# Clear Custom Hostname Mappings

Clears all tenant Custom Hostname Mappings.

**Required Permissions:** `custom-hostname-mappings:delete`

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Security Cloud DNS API",
    "description": "Manage DNS Zones, Search Domains, and Custom Hostname Mappings",
    "version": "1.0.0",
    "termsOfService": "https://www.jamf.com/developer-resources/api-license-agreement/",
    "contact": {
      "name": "Jamf Developer",
      "url": "https://developer.jamf.com"
    }
  },
  "tags": [
    {
      "name": "custom-hostname-mappings",
      "description": "Operations for managing tenant Custom Hostname Mappings."
    }
  ],
  "paths": {
    "/v1/dns/custom-hostname-mappings": {
      "delete": {
        "tags": [
          "custom-hostname-mappings"
        ],
        "operationId": "clearCustomHostnameMappings",
        "summary": "Clear Custom Hostname Mappings",
        "description": "Clears all tenant Custom Hostname Mappings.\n\n**Required Permissions:** `custom-hostname-mappings:delete`",
        "responses": {
          "204": {
            "description": "The Custom Hostname Mappings were cleared. No content is returned."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-required-privileges": [
          "custom-hostname-mappings:delete"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/X-Tenant-Id"
          },
          {
            "$ref": "#/components/parameters/X-Environment-Id"
          }
        ],
        "security": [
          {
            "oauth2": [
              "custom-hostname-mappings:delete"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "headers": {
      "RateLimit-Limit": {
        "description": "The request quota allotted for the current rate-limit window.",
        "schema": {
          "type": "integer",
          "example": 100
        }
      },
      "RateLimit-Remaining": {
        "description": "The number of requests remaining in the current rate-limit window.",
        "schema": {
          "type": "integer",
          "example": 99
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the current rate-limit window resets and the quota is refilled.",
        "schema": {
          "type": "integer",
          "example": 3600
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Unauthorized. The access token is missing, invalid, or expired, or the token belongs to a different organization than the tenant in the request path.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "httpStatus": 401,
              "traceId": "ecf2ca07e23c0abc12393472f2b783df",
              "errors": [
                {
                  "field": "Authorization",
                  "description": "The access token is missing, invalid, or expired.",
                  "id": null
                }
              ]
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden. The authenticated principal does not hold the privilege required to perform this operation.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "httpStatus": 403,
              "traceId": "ecf2ca07e23c0abc12393472f2b783df",
              "errors": [
                {
                  "field": null,
                  "description": "The principal lacks the privilege required for this operation.",
                  "id": null
                }
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too Many Requests. The client has exceeded the rate limit for this endpoint. Inspect the `RateLimit-*` and `Retry-After` headers to determine when to retry.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "description": "The number of requests remaining in the current rate-limit window.",
            "schema": {
              "type": "integer",
              "example": 0
            }
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          },
          "Retry-After": {
            "description": "Seconds the client SHOULD wait before issuing another request.",
            "schema": {
              "type": "integer",
              "example": 3600
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "httpStatus": 429,
              "traceId": "ecf2ca07e23c0abc12393472f2b783df",
              "errors": [
                {
                  "field": null,
                  "description": "Rate limit exceeded for this endpoint.",
                  "id": null
                }
              ]
            }
          }
        }
      }
    },
    "schemas": {
      "ApiErrorItem": {
        "type": "object",
        "description": "A single error detail within an ApiError response.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error-specific code that can be used to identify a localization string, etc.",
            "enum": [
              "INVALID_FIELD",
              "LIST_SIZE_EXCEEDED",
              "DOMAIN_CONFLICT",
              "GATEWAY_NOT_FOUND",
              "NAMESERVER_IP_OUT_OF_RANGE",
              "NAMESERVER_IP_RESTRICTED",
              "ZONE_NOT_FOUND",
              "SEARCH_DOMAIN_NOT_SET",
              "NOT_ENTITLED"
            ],
            "example": "INVALID_FIELD"
          },
          "field": {
            "type": "string",
            "nullable": true,
            "description": "Name of the field that caused the error. Optional.",
            "example": "name"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "A general description of the error for troubleshooting and debugging. Generally this text should not be displayed to a user; instead refer to the code and its localized text. May be null.",
            "example": "The supplied zone name is already in use."
          },
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Identifier of the object with the error. Optional.",
            "example": "3f1a2b3c-4d5e-6f70-8a9b-0c1d2e3f4a5b"
          }
        }
      },
      "ApiError": {
        "type": "object",
        "description": "Standard Jamf error response body returned for non-2xx/3xx responses.",
        "required": [
          "httpStatus",
          "errors"
        ],
        "properties": {
          "httpStatus": {
            "type": "integer",
            "description": "HTTP status code of the response.",
            "example": 422
          },
          "traceId": {
            "type": "string",
            "nullable": true,
            "description": "Trace identifier correlating the response with server-side logs. May be absent on infrastructure errors such as bare 500/503.",
            "example": "ecf2ca07e23c0abc12393472f2b783df"
          },
          "errors": {
            "type": "array",
            "description": "The list of individual errors that occurred while processing the request.",
            "items": {
              "$ref": "#/components/schemas/ApiErrorItem"
            }
          }
        }
      }
    },
    "parameters": {
      "X-Tenant-Id": {
        "name": "X-Tenant-Id",
        "in": "header",
        "required": false,
        "description": "The tenant UUID identifier. Send it to address tenant scope. This API is also published at environment scope — send that scope's header instead. Send exactly one scope header per request.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "example": "e77c1408-10c8-4007-b177-abc9157fbcaa"
        }
      },
      "X-Environment-Id": {
        "name": "X-Environment-Id",
        "in": "header",
        "required": false,
        "description": "The environment UUID identifier. Send it to address environment scope. This API is also published at tenant scope — send that scope's header instead. Send exactly one scope header per request.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "example": "e77c1408-10c8-4007-b177-abc9157fbcaa"
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "Obtain an access token by calling the API Gateway's token endpoint using the OAuth2 client-credentials flow.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{region}.api.jamfcloud.com/auth/token",
            "scopes": {
              "custom-hostname-mappings:delete": "",
              "custom-hostname-mappings:read": "",
              "custom-hostname-mappings:update": "",
              "search-domains:delete": "",
              "search-domains:read": "",
              "search-domains:update": "",
              "ztna:create": "",
              "ztna:delete": "",
              "ztna:read": "",
              "ztna:update": ""
            }
          }
        }
      }
    }
  },
  "x-scope-types": [
    "tenant",
    "environment"
  ],
  "servers": [
    {
      "url": "https://{region}.api.jamfcloud.com/securitycloud",
      "description": "Jamf Beta API Gateway - prod",
      "variables": {
        "region": {
          "default": "us",
          "enum": [
            "us",
            "eu",
            "apac"
          ],
          "description": "Geographic deployment region"
        }
      }
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ]
}
```