---
type: api
title: Update a custom integration
description: Update the datasets of an existing custom integration package.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all AND integrations-all.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-put-fleet-epm-custom-integrations-pkgname
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-put-fleet-epm-custom-integrations-pkgname
products:
  - Kibana
---

# Update a custom integration

- Server: `https://{kibana_url}`

## Paths

- `PUT` `/api/fleet/epm/custom_integrations/{pkgName}`

#### Path parameters

- `pkgName` (string) — required
  Package name

## Description

Update the datasets of an existing custom integration package.

## Required authorization

- Privileges: `fleet-settings-all` and `integrations-all`

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `categories` (string[] · max items: 10) — optional
- `readMeData` (string) — required

## Responses

#### `200`

Successful response

`application/json`

#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### Console

```console
PUT kbn:/api/fleet/epm/custom_integrations/PKG_NAME
{
  "datasets": [
    {
      "name": "my_custom_logs.access",
      "type": "logs"
    }
  ],
  "integrationName": "my_custom_logs"
}
```

#### curl

```curl
curl -X PUT "${KIBANA_URL}/api/fleet/epm/custom_integrations/${PKG_NAME}" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "datasets": [
      {
        "name": "my_custom_logs.access",
        "type": "logs"
      }
    ],
    "integrationName": "my_custom_logs"
  }'
```

## Response examples

#### Put update custom integration

Custom integration successfully updated

```json
{}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

