# updateProjectIntegration

```graphql
mutation UpdateProjectIntegration($projectReference: String!, $name: String!, $input: UpdateProjectIntegrationInput!) {
  updateProjectIntegration(projectReference: $projectReference, name: $name, input: $input) {
    name
    configured
    createdAt
    updatedAt
    displayName
    icon
    description
    authType
    toolCount
    promptCount
    connectedForProject
    scope
    allowedTools
    config
    executionMode
    projectConnections {
      connected
      expired
      disconnected
    }
    projectUserConnections {
      connected
      expired
      disconnected
    }
    resolution {
      catalogAvailable
      catalogState
    }
    configSchema
  }
}
```

Change the scope, allowed tools, configuration or execution mode of a project integration by sending only the fields to change, so that an omitted field keeps its stored value; returns the updated project integration. Requires project.integrations.configure.

## Arguments

| Name                  | Type                           | Required | Description                                                                                                                          |
| --------------------- | ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `projectReference`    | String!                        | Yes      |                                                                                                                                      |
| `name`                | String!                        | Yes      |                                                                                                                                      |
| `input`               | UpdateProjectIntegrationInput! | Yes      |                                                                                                                                      |
| `input.scope`         | String                         |          | Credential scope the integration uses: project or user. The legacy end\_user and endUser inputs are aliases of user.                 |
| `input.allowedTools`  | \[String!]                     |          | Unprefixed tool IDs the project allows. Null allows all tools. Each entry must exist in the catalog of the effective execution mode. |
| `input.config`        | JSON                           |          | Integration-specific configuration that must match configSchema.                                                                     |
| `input.executionMode` | String                         |          | Execution mode: real or mock.                                                                                                        |

## Variables

```json
{
  "projectReference": "string",
  "name": "string",
  "input": {}
}
```

## Responses

| Status | Description                                                      |
| ------ | ---------------------------------------------------------------- |
| 200    | The ManagedProjectIntegration! in data.updateProjectIntegration. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation UpdateProjectIntegration($projectReference: String!, $name: String!, $input: UpdateProjectIntegrationInput!) {\n  updateProjectIntegration(projectReference: $projectReference, name: $name, input: $input) {\n    name\n    configured\n    createdAt\n    updatedAt\n    displayName\n    icon\n    description\n    authType\n    toolCount\n    promptCount\n    connectedForProject\n    scope\n    allowedTools\n    config\n    executionMode\n    projectConnections {\n      connected\n      expired\n      disconnected\n    }\n    projectUserConnections {\n      connected\n      expired\n      disconnected\n    }\n    resolution {\n      catalogAvailable\n      catalogState\n    }\n    configSchema\n  }\n}",
  "variables": {
    "projectReference": "string",
    "name": "string",
    "input": {}
  }
}'
```

## Example response

```json
{
  "data": {
    "updateProjectIntegration": {
      "name": "string",
      "configured": false,
      "createdAt": "string",
      "updatedAt": "string",
      "displayName": "string",
      "icon": "string",
      "description": "string",
      "authType": "string",
      "toolCount": 0,
      "promptCount": 0,
      "connectedForProject": false,
      "scope": "string",
      "allowedTools": [
        "string"
      ],
      "config": {},
      "executionMode": "string",
      "projectConnections": {
        "connected": 0,
        "expired": 0,
        "disconnected": 0
      },
      "projectUserConnections": {
        "connected": 0,
        "expired": 0,
        "disconnected": 0
      },
      "resolution": {
        "catalogAvailable": false,
        "catalogState": "string"
      },
      "configSchema": {}
    }
  }
}
```
