---
title: "Deletes a domain pattern for the specified codebase. Engineering role only."
method: DELETE
path: "/codebases/{codebaseId}/domain-patterns/{patternId}"
tags: ["Domain Patterns"]
---

# Deletes a domain pattern for the specified codebase. Engineering role only.

`DELETE /codebases/{codebaseId}/domain-patterns/{patternId}`

## Request

- Base URL: `https://api.acquia.com/v3`
- URL: `https://api.acquia.com/v3/codebases/{codebaseId}/domain-patterns/{patternId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/docs/codebases/:codebaseId/domain-patterns/:patternId/delete.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `codebaseId` string, required
- `patternId` string, required

## Response `202`

Domain pattern deletion initiated. The 202 covers two async operations: (1) removal of the pattern record and (2) a bulk cleanup that disassociates any URLs already generated from this pattern on all associated site instances in the codebase. Both operations complete before the final settled state is observable.

- object
  - `_links` object, required: HAL links for the resource
    - `self` CodebaseServiceAPIHalLink, required: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
  - `_embedded` object: Embedded resources (optional)
  - `message` 'The domain pattern is being removed from all associated sites in this codebase.', required: Confirmation message that the domain pattern is being removed.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api.md) - [All operations](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/revisions/508f8f94456d?raw)
