Skip to main content
PATCH
/
projects
/
{projectIdOrName}
/
integrations
/
{integrationId}
/
objects
/
{objectName}
/
config-content
Update an installation object
curl --request PATCH \
  --url https://api.withampersand.com/v1/projects/{projectIdOrName}/integrations/{integrationId}/objects/{objectName}/config-content \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "action": "read",
  "changes": [
    {
      "op": "replace",
      "path": "/schedule",
      "value": "*/10 * * * *"
    },
    {
      "op": "add",
      "path": "/selectedFields/phone",
      "value": true
    },
    {
      "op": "remove",
      "path": "/selectedFields/billingcity"
    }
  ],
  "groupRef": "group-123"
}
'
{
  "id": "<string>",
  "projectId": "project-456",
  "integrationId": "<string>",
  "healthStatus": "healthy",
  "connection": {
    "id": "connection-123",
    "projectId": "project-456",
    "provider": "salesforce",
    "group": {
      "groupRef": "group-123",
      "groupName": "Super Customer",
      "projectId": "project-456",
      "createTime": "2023-07-13T21:34:44.816Z",
      "updateTime": "2023-07-13T21:34:44.816Z"
    },
    "consumer": {
      "consumerRef": "consumer-123",
      "consumerName": "Super Customer",
      "projectId": "project-456",
      "createTime": "2023-07-13T21:34:44.816Z",
      "updateTime": "2023-07-13T21:34:44.816Z"
    },
    "createTime": "2023-07-13T21:34:44.816Z",
    "authScheme": "oauth2/authorizationCode",
    "status": "working",
    "providerApp": {
      "id": "provider-app-123",
      "projectId": "project-456",
      "provider": "salesforce",
      "clientId": "client-id-123",
      "createTime": "2023-11-07T05:31:56Z",
      "externalRef": "external-id-123",
      "scopes": [
        [
          "oauth",
          "offline",
          "crm.read"
        ]
      ],
      "updateTime": "2023-11-07T05:31:56Z"
    },
    "providerWorkspaceRef": "provider-workspace-123",
    "providerConsumerRef": "provider-consumer-123",
    "updateTime": "2023-07-13T21:34:44.816Z",
    "oauth2AuthorizationCode": {
      "accessToken": {
        "token": "<string>",
        "issuedAt": "2024-04-22T18:55:28.456076Z",
        "expiresAt": "2024-10-22T18:55:28.456076Z"
      },
      "refreshToken": {
        "token": "<string>",
        "issuedAt": "2024-04-22T18:55:28.456076Z",
        "expiresAt": "2024-10-22T18:55:28.456076Z"
      },
      "scopes": [
        "<string>"
      ]
    },
    "apiKey": "api-key-123",
    "providerMetadata": {}
  },
  "createTime": "2023-11-07T05:31:56Z",
  "createdBy": "consumer:consumer-123",
  "config": {
    "id": "config-123",
    "revisionId": "revision-123",
    "createTime": "2023-11-07T05:31:56Z",
    "createdBy": "builder:builder-123",
    "content": {
      "provider": "hubspot",
      "read": {
        "objects": {}
      },
      "write": {
        "objects": {}
      },
      "proxy": {
        "enabled": true
      },
      "subscribe": {
        "objects": {}
      }
    }
  },
  "group": {
    "groupRef": "group-123",
    "groupName": "Super Customer",
    "projectId": "project-456",
    "createTime": "2023-07-13T21:34:44.816Z",
    "updateTime": "2023-07-13T21:34:44.816Z"
  },
  "updateTime": "2023-11-07T05:31:56Z"
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

projectIdOrName
string
required

The Ampersand project ID or project name.

integrationId
string
required

The integration ID.

objectName
string
required

The object name whose config content will be patched.

Body

application/json
  • Option 1
  • Option 2
action
enum<string>
required

The action type for the object config (read, subscribe, or write).

Available options:
read,
subscribe,
write
Example:

"read"

changes
JSON Patch Operation · object[]
required

Array of JSON Patch operations to apply (RFC 6902). Supported operations: add, remove, replace. All paths must start with "/" (e.g., "/schedule", "/selectedFields/phone").

Minimum array length: 1
Example:
[
{
"op": "replace",
"path": "/schedule",
"value": "*/10 * * * *"
},
{
"op": "add",
"path": "/selectedFields/phone",
"value": true
},
{
"op": "remove",
"path": "/selectedFields/billingcity"
}
]
groupRef
string
required

The ID of the user group that has access to this installation. Either groupRef or installationId must be provided.

Example:

"group-123"

Response

The updated installation

id
string
required

The installation ID.

projectId
string
required

The Ampersand project ID.

Example:

"project-456"

integrationId
string
required

The integration ID.

healthStatus
string
required

The health status of the installation ("healthy", "unhealthy").

Example:

"healthy"

connection
Connection · object
required
createTime
string<date-time>
required

The time the integration was first installed.

createdBy
string
required

The person who did the installation, in the format of "consumer:{consumer-id}".

Example:

"consumer:consumer-123"

config
Config · object
required
group
Group · object
updateTime
string<date-time>

The time the installation was last updated with a new config.