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

# Delete service

> Delete a service from an Agent Vault access bundle



## OpenAPI

````yaml DELETE /api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/agent-vault/access-bundles/{accessBundleId}/services/{serviceId}:
    delete:
      tags:
        - Agent Vault Access Bundles
      description: Delete a service from an Agent Vault access bundle
      operationId: deleteAgentVaultService
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: accessBundleId
          required: true
          description: The ID of the access bundle.
        - schema:
            type: string
            format: uuid
          in: path
          name: serviceId
          required: true
          description: The ID of the service.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  service:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: The ID of the service.
                      accessBundleId:
                        type: string
                        format: uuid
                        description: The ID of the access bundle.
                      name:
                        type: string
                        description: The name of the service.
                      hostPattern:
                        type: string
                        description: >-
                          A comma-separated set of hosts this service covers,
                          each optionally with a port (defaults to `443`). A
                          leading `*.` wildcard matches exactly one label. Paths
                          are not supported.
                      allowedMethods:
                        type: array
                        items:
                          type: string
                          enum:
                            - GET
                            - HEAD
                            - POST
                            - PUT
                            - PATCH
                            - DELETE
                            - OPTIONS
                        nullable: true
                        description: >-
                          The HTTP methods this service allows. Null allows
                          every method. Anything else is refused by the proxy
                          with a 403.
                      allowedPathPrefixes:
                        type: array
                        items:
                          type: string
                        nullable: true
                        description: >-
                          The path prefixes this service allows, matched on
                          whole segments, so `/repos` covers `/repos/octo` but
                          not `/repositories`. `null` allows every path. A
                          path-restricted service also refuses any request whose
                          path would have to be normalised to judge.
                      credential:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - bearer
                              headerName:
                                type: string
                                description: >-
                                  The header the credential is written to.
                                  Defaults to `Authorization`.
                              headerPrefix:
                                type: string
                                description: >-
                                  Written before the credential value, separated
                                  by one space. Leave empty for a header that
                                  carries the value alone, such as DD-API-KEY.
                                  On update a field left out keeps its stored
                                  value, so send an empty string to clear the
                                  prefix when changing the header.
                            required:
                              - type
                              - headerName
                              - headerPrefix
                            additionalProperties: false
                            title: Bearer
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - basic
                            required:
                              - type
                            additionalProperties: false
                            title: Basic Auth
                          - type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - passthrough
                            required:
                              - type
                            additionalProperties: false
                            title: Pass-through
                      customHeaders:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: >-
                                The ID of the custom header. Send it to change
                                that header in place. Omit it to match by name.
                            name:
                              type: string
                              description: >-
                                The name of the header, which must not be the
                                credential's own header.
                            prefix:
                              type: string
                              description: >-
                                Written before the header value, separated by
                                one space. Leave empty to send the value alone.
                          required:
                            - id
                            - name
                            - prefix
                          additionalProperties: false
                        description: >-
                          Additional headers the proxy attaches to every request
                          to this service, on top of the credential. Send the
                          full list. A header you leave out is deleted. Send a
                          header's `id` to change it in place and keep its
                          stored value. Without an `id`, a header is matched by
                          name.
                      substitutions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: >-
                                The ID of the substitution. Send it to change
                                that substitution in place. Omit it to match by
                                placeholder.
                            placeholder:
                              type: string
                              description: >-
                                The fake value your agent already sends. The
                                proxy replaces it with the real secret. Matched
                                as a plain string, so a distinctive placeholder
                                is worth choosing.
                            surfaces:
                              type: array
                              items:
                                type: string
                                enum:
                                  - path
                                  - query
                                  - header
                                  - body
                              description: >-
                                Where in the request to look for the
                                placeholder: path, query, header or body.
                          required:
                            - id
                            - placeholder
                            - surfaces
                          additionalProperties: false
                        description: >-
                          Placeholders the proxy swaps for a real secret before
                          forwarding. Send the full list. A substitution you
                          leave out is deleted. Send a substitution's `id` to
                          change it in place and keep its stored value. Without
                          an `id`, it is matched by its placeholder.
                      createdAt:
                        type: string
                        format: date-time
                        description: When the service was added to the access bundle.
                      updatedAt:
                        type: string
                        format: date-time
                        description: When the service was last changed.
                    required:
                      - id
                      - accessBundleId
                      - name
                      - hostPattern
                      - allowedMethods
                      - allowedPathPrefixes
                      - credential
                      - customHeaders
                      - substitutions
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                required:
                  - service
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````