# Edit a custom API integration (/docs/api-reference/integrations/updateCustomApiIntegration)

> Change a custom API integration. Only the fields you send change; agents it is attached to use the new settings on their next call. Header values come back hidden as from listings: send the real value or leave headers out. Only the person who created the integration can edit it.

**PATCH** `/integrations/custom-api/{integration_id}`

Change a custom API integration. Only the fields you send change; agents it
is attached to use the new settings on their next call. Header values come
back hidden as `********` from listings: send the real value or leave
`headers` out. Only the person who created the integration can edit it.

```yaml
operationId: updateCustomApiIntegration
parameters:
  - name: integration_id
    in: path
    required: true
    schema:
      type: integer
    description: The ID of the custom API integration.
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        properties:
          user_id:
            type: integer
            description: |
              Reseller keys only: act as one of your clients by its user id. Omit
              it to act on your own account.
              [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
            example: 1234
          name:
            type: string
            description: A name for the integration.
          description:
            type: string
            description: What the endpoint does. The agent reads this to decide when to call it.
          url:
            type: string
            format: uri
          method:
            type: string
            enum:
              - GET
              - POST
              - PUT
              - PATCH
              - DELETE
          headers:
            type: array
            description: Fixed headers sent on every request. Replaces the whole list.
            items:
              type: object
              required:
                - key
                - value
              properties:
                key:
                  type: string
                value:
                  type: string
          query_params:
            type: array
            description: Query string parameters. Replaces the whole list.
            items:
              type: object
              description: |
                One query or body parameter of a custom API. With `isLLMGenerated`
                true the agent fills the value from the conversation, guided by
                `description`. With it false, the text in `description` is sent as a
                fixed value.
              required:
                - key
              properties:
                key:
                  type: string
                  description: The parameter name your endpoint expects.
                description:
                  type: string
                  description: >-
                    What the agent should put here, or the fixed value when `isLLMGenerated` is
                    false.
                type:
                  type: string
                  enum:
                    - string
                    - number
                    - boolean
                    - object
                    - array
                  default: string
                required:
                  type: boolean
                  description: Whether the agent must supply this parameter.
                isLLMGenerated:
                  type: boolean
                  default: true
                  description: Let the agent fill this value from the conversation.
                children:
                  type: array
                  description: >-
                    Nested fields of an `object` or `array` body parameter. Query parameters have no
                    children.
                  items: {}
          body_params:
            type: array
            description: Request body fields, sent as JSON. Replaces the whole list.
            items:
              type: object
              description: |
                One query or body parameter of a custom API. With `isLLMGenerated`
                true the agent fills the value from the conversation, guided by
                `description`. With it false, the text in `description` is sent as a
                fixed value.
              required:
                - key
              properties:
                key:
                  type: string
                  description: The parameter name your endpoint expects.
                description:
                  type: string
                  description: >-
                    What the agent should put here, or the fixed value when `isLLMGenerated` is
                    false.
                type:
                  type: string
                  enum:
                    - string
                    - number
                    - boolean
                    - object
                    - array
                  default: string
                required:
                  type: boolean
                  description: Whether the agent must supply this parameter.
                isLLMGenerated:
                  type: boolean
                  default: true
                  description: Let the agent fill this value from the conversation.
                children:
                  type: array
                  description: >-
                    Nested fields of an `object` or `array` body parameter. Query parameters have no
                    children.
                  items: {}
          request_timeout:
            type: integer
            minimum: 1
            description: Seconds to wait for your endpoint before the agent moves on.
      example:
        url: https://api.acme-corp.io/v2/orders/status
        request_timeout: 15
responses:
  '200':
    description: The integration as saved, with stored credentials hidden.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            integration:
              type: object
              additionalProperties: true
  '400':
    description: A value is not valid, the name is taken, or a value is the hidden `********`. Nothing changed.
  '403':
    description: The API key's user cannot change integrations, or did not create this one.
  '404':
    description: No custom API integration with that id in your organization.
```

**curl**

```bash
curl -X PATCH "https://omnidim.io/api/v1/integrations/custom-api/{integration_id}" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://api.acme-corp.io/v2/orders/status",
  "request_timeout": 15
}'
```