curl --request POST \
--url https://api.withampersand.com/v1/projects/{projectIdOrName}/integrations/{integrationId}/installations \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"groupRef": "group-123",
"config": {
"content": {
"provider": "hubspot",
"read": {
"objects": {}
},
"write": {
"objects": {}
},
"proxy": {
"enabled": true
},
"subscribe": {
"objects": {}
}
},
"revisionId": "<string>",
"createdBy": "api:create-installation"
},
"connectionId": "<string>"
}
'{
"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.816354Z",
"updateTime": "2023-07-13T21:34:44.816354Z"
},
"consumer": {
"consumerRef": "consumer-123",
"consumerName": "Super Customer",
"projectId": "project-456",
"createTime": "2023-07-13T21:34:44.816354Z",
"updateTime": "2023-07-13T21:34:44.816354Z"
},
"createTime": "2023-07-13T21:34:44.816354Z",
"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.816354Z",
"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.816354Z",
"updateTime": "2023-07-13T21:34:44.816354Z"
},
"updateTime": "2023-11-07T05:31:56Z"
}curl --request POST \
--url https://api.withampersand.com/v1/projects/{projectIdOrName}/integrations/{integrationId}/installations \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"groupRef": "group-123",
"config": {
"content": {
"provider": "hubspot",
"read": {
"objects": {}
},
"write": {
"objects": {}
},
"proxy": {
"enabled": true
},
"subscribe": {
"objects": {}
}
},
"revisionId": "<string>",
"createdBy": "api:create-installation"
},
"connectionId": "<string>"
}
'{
"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.816354Z",
"updateTime": "2023-07-13T21:34:44.816354Z"
},
"consumer": {
"consumerRef": "consumer-123",
"consumerName": "Super Customer",
"projectId": "project-456",
"createTime": "2023-07-13T21:34:44.816354Z",
"updateTime": "2023-07-13T21:34:44.816354Z"
},
"createTime": "2023-07-13T21:34:44.816354Z",
"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.816354Z",
"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.816354Z",
"updateTime": "2023-07-13T21:34:44.816354Z"
},
"updateTime": "2023-11-07T05:31:56Z"
}The Ampersand project ID or project name.
The integration ID.
The ID of the user group that has access to this installation.
"group-123"
The config of the installation.
Show child attributes
Show child attributes
The SaaS API that we are integrating with.
"hubspot"
Show child attributes
This is a map of object names to their configuration. This is a map of object names to their configuration.
Show child attributes
Show child attributes
The name of the object to read from. The name of the object to read from. The name of the object to read from.
"account"
This is a map of field names to booleans indicating whether they should be read. If a field is already included in selectedFieldMappings, it does not need to be included here.
This is a map of field names to booleans indicating whether they should be read. If a field is already included in selectedFieldMappings, it does not need to be included here.
This is a map of field names to booleans indicating whether they should be read. If a field is already included in selectedFieldMappings, it does not need to be included here.
Show child attributes
"{ phone: true, fax: true }"
This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.) This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.) This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.)
Show child attributes
"{ phoneNumber: phone, faxNumber: fax }"
The schedule for reading the object, in cron syntax. The schedule for reading the object, in cron syntax. The schedule for reading the object, in cron syntax.
"*/15 * * * *"
If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed. If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed. If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed.
The name of the destination that the result should be sent to. The name of the destination that the result should be sent to. The name of the destination that the result should be sent to.
"accountWebhook"
This is a map of field names to their value mappings. This is a map of field names to their value mappings. This is a map of field names to their value mappings.
Show child attributes
This is a map of values to their mappings. The key is the value delivered to the webhook, the value is the value coming from the provider API. This is a map of values to their mappings. The key is the value delivered to the webhook, the value is the value coming from the provider API. This is a map of values to their mappings. The key is the value delivered to the webhook, the value is the value coming from the provider API.
Show child attributes
{
"open": "scheduled",
"closedWon": "won",
"closedLost": "lost"
}{
"stage": {
"open": "scheduled",
"closedWon": "won",
"closedLost": "lost"
}
}An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property. An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property. An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property.
Show child attributes
The name of the field in your application. The name of the field in your application. The name of the field in your application.
Optional display name of the field to show the user in the mapping UI. Optional display name of the field to show the user in the mapping UI. Optional display name of the field to show the user in the mapping UI.
Optional prompt to show the user in the mapping UI. Optional prompt to show the user in the mapping UI. Optional prompt to show the user in the mapping UI.
If you would like the user to map a set of possible values, this is the list of possible values of the field in your application. If you would like the user to map a set of possible values, this is the list of possible values of the field in your application. If you would like the user to map a set of possible values, this is the list of possible values of the field in your application.
The name of the field in SaaS provider, if present, then we will not prompt the user to map the field. The name of the field in SaaS provider, if present, then we will not prompt the user to map the field. The name of the field in SaaS provider, if present, then we will not prompt the user to map the field.
If selectedFieldsAuto is set to all, all fields will be read. If selectedFieldsAuto is set to all, all fields will be read. If selectedFieldsAuto is set to all, all fields will be read.
all Show child attributes
Show child attributes
Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set. Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set. Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set.
x >= 030
If true, backfill all history. Required if days is not set. If true, backfill all history. Required if days is not set. If true, backfill all history. Required if days is not set.
false
Show child attributes
This is a map of object names to their configuration. This is a map of object names to their configuration.
Show child attributes
Show child attributes
The name of the object to write to. The name of the object to write to. The name of the object to write to.
"account"
This is a map of field names to default values. These values will be used when writing to the object. This is a map of field names to default values. These values will be used when writing to the object. This is a map of field names to default values. These values will be used when writing to the object.
Show child attributes
Show child attributes
The value to be used as a default. The value to be used as a default. The value to be used as a default.
Whether the default value should be applied when updating a record.
If set to always, the default value will be applied when updating a record.
If set to never, the default value will not be applied when updating a record,
only when creating a record.
If unspecified, then always is assumed.
Whether the default value should be applied when updating a record.
If set to always, the default value will be applied when updating a record.
If set to never, the default value will not be applied when updating a record,
only when creating a record.
If unspecified, then always is assumed.
Whether the default value should be applied when updating a record.
If set to always, the default value will be applied when updating a record.
If set to never, the default value will not be applied when updating a record,
only when creating a record.
If unspecified, then always is assumed.
always, never This is a map of field names to their settings. This is a map of field names to their settings. This is a map of field names to their settings.
Show child attributes
Show child attributes
Only use one of stringValue, integerValue, booleanValue. Only use one of stringValue, integerValue, booleanValue. Only use one of stringValue, integerValue, booleanValue.
Show child attributes
The default string value to apply to a field The default string value to apply to a field The default string value to apply to a field
The default integer value to apply to a field The default integer value to apply to a field The default integer value to apply to a field
The default boolean value to apply to a field The default boolean value to apply to a field The default boolean value to apply to a field
Whether the default value should be applied when creating a record. Whether the default value should be applied when creating a record. Whether the default value should be applied when creating a record.
always, never Whether the default value should be applied when updating a record. Whether the default value should be applied when updating a record. Whether the default value should be applied when updating a record.
always, never Show child attributes
Show child attributes
Show child attributes
Whether to inherit fields and mappings from the read config. Whether to inherit fields and mappings from the read config.
true
The name of the object to subscribe to. The name of the object to subscribe to.
"account"
The name of the destination that the result should be sent to. The name of the destination that the result should be sent to.
"accountWebhook"
Show child attributes
Conditions to enable update events. Conditions to enable update events.
always, never "always"
Whether to watch fields all fields automatically. Whether to watch fields all fields automatically.
all "all"
The fields that should be watched. The fields that should be watched.
["name", "description"]Deprecated: This field will be automatically set to the latest revision.
The person who created the config, in the format of "consumer:{consumer-id}" or "builder:{builder-id}".
The ID of the SaaS connection tied to this installation. If omitted the default connection for this group will be used.
Created
The installation ID.
The Ampersand project ID.
"project-456"
The integration ID.
The health status of the installation ("healthy", "unhealthy").
"healthy"
Show child attributes
The connection ID.
"connection-123"
The Ampersand project ID.
"project-456"
The SaaS provider that this Connection is for.
"salesforce"
Show child attributes
The ID of the user group that has access to this installation.
"group-123"
The name of the user group that has access to this installation.
"Super Customer"
The Ampersand project ID.
"project-456"
The time the group was created.
"2023-07-13T21:34:44.816354Z"
The time the group was last updated.
"2023-07-13T21:34:44.816354Z"
Show child attributes
The consumer reference.
"consumer-123"
The name of the consumer.
"Super Customer"
The Ampersand project ID.
"project-456"
The time the consumer was created.
"2023-07-13T21:34:44.816354Z"
The time the consumer was last updated.
"2023-07-13T21:34:44.816354Z"
The time the connection was created.
"2023-07-13T21:34:44.816354Z"
The authentication scheme used for this connection.
none, apiKey, basic, oauth2/authorizationCode, oauth2/authorizationCodePKCE, oauth2/clientCredentials, oauth2/password "oauth2/authorizationCode"
The status of the connection.
created: The connection has just been created or the access token was just refreshed.working: The connection has successfully been used to make a request.bad_credentials: The connection encountered credential-related issues when making a request, or when attempting to refresh the access token.created, working, bad_credentials "working"
Show child attributes
The provider app ID.
"provider-app-123"
The Ampersand project ID.
"project-456"
The SaaS provider that this app connects to.
"salesforce"
The OAuth client ID for this app.
"client-id-123"
The time the provider app was created.
The ID used by the provider to identify the app (optional).
"external-id-123"
The OAuth scopes for this app.
The time the provider app was updated.
If available, the identifier for the provider workspace (e.g. the Salesforce subdomain)
"provider-workspace-123"
If available, the ID that Salesforce/Hubspot uses to identify this user (e.g. Salesforce has IDs in the form of https://login.salesforce.com/id/00D4x0000019CQTEA2/0054x000000orJ4AA)
"provider-consumer-123"
The time the connection was last updated.
"2023-07-13T21:34:44.816354Z"
Show child attributes
The access token for the connection.
Show child attributes
The refresh token to use for the connection.
Show child attributes
The scopes for the tokens.
The API key used while making the connection.
"api-key-123"
Show child attributes
Show child attributes
The value of the metadata field
"1234567890"
The source of the metadata field
input, token, provider "input"
The human-readable name for the field
"Account ID"
The time the integration was first installed.
The person who did the installation, in the format of "consumer:{consumer-id}".
"consumer:consumer-123"
Show child attributes
The config ID.
"config-123"
The ID of the revision that this config is based on.
"revision-123"
The time the config was created.
The person who created the config, in the format of "consumer:{consumer-id}" or "builder:{builder-id}".
"builder:builder-123"
Show child attributes
The SaaS API that we are integrating with.
"hubspot"
Show child attributes
This is a map of object names to their configuration. This is a map of object names to their configuration.
Show child attributes
Show child attributes
The name of the object to read from. The name of the object to read from. The name of the object to read from.
"account"
This is a map of field names to booleans indicating whether they should be read. If a field is already included in selectedFieldMappings, it does not need to be included here.
This is a map of field names to booleans indicating whether they should be read. If a field is already included in selectedFieldMappings, it does not need to be included here.
This is a map of field names to booleans indicating whether they should be read. If a field is already included in selectedFieldMappings, it does not need to be included here.
Show child attributes
"{ phone: true, fax: true }"
This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.) This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.) This is a map of mapToNames to field names. (A mapTo name is the name the builder wants to map a field to when it lands in their destination.)
Show child attributes
"{ phoneNumber: phone, faxNumber: fax }"
The schedule for reading the object, in cron syntax. The schedule for reading the object, in cron syntax. The schedule for reading the object, in cron syntax.
"*/15 * * * *"
If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed. If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed. If this flag is set to true, scheduled reads associated with this object will be paused, and on-demand reads will not be allowed.
The name of the destination that the result should be sent to. The name of the destination that the result should be sent to. The name of the destination that the result should be sent to.
"accountWebhook"
This is a map of field names to their value mappings. This is a map of field names to their value mappings. This is a map of field names to their value mappings.
Show child attributes
This is a map of values to their mappings. The key is the value delivered to the webhook, the value is the value coming from the provider API. This is a map of values to their mappings. The key is the value delivered to the webhook, the value is the value coming from the provider API. This is a map of values to their mappings. The key is the value delivered to the webhook, the value is the value coming from the provider API.
Show child attributes
{
"open": "scheduled",
"closedWon": "won",
"closedLost": "lost"
}{
"stage": {
"open": "scheduled",
"closedWon": "won",
"closedLost": "lost"
}
}An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property. An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property. An array containing all available dynamic field and value mappings for this installation, provided by the InstallIntegration component. This array represents the complete set of possible mappings, regardless of which ones are currently selected. The actual selected mappings are stored separately in the selectedFieldMappings property.
Show child attributes
The name of the field in your application. The name of the field in your application. The name of the field in your application.
Optional display name of the field to show the user in the mapping UI. Optional display name of the field to show the user in the mapping UI. Optional display name of the field to show the user in the mapping UI.
Optional prompt to show the user in the mapping UI. Optional prompt to show the user in the mapping UI. Optional prompt to show the user in the mapping UI.
If you would like the user to map a set of possible values, this is the list of possible values of the field in your application. If you would like the user to map a set of possible values, this is the list of possible values of the field in your application. If you would like the user to map a set of possible values, this is the list of possible values of the field in your application.
The name of the field in SaaS provider, if present, then we will not prompt the user to map the field. The name of the field in SaaS provider, if present, then we will not prompt the user to map the field. The name of the field in SaaS provider, if present, then we will not prompt the user to map the field.
If selectedFieldsAuto is set to all, all fields will be read. If selectedFieldsAuto is set to all, all fields will be read. If selectedFieldsAuto is set to all, all fields will be read.
all Show child attributes
Show child attributes
Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set. Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set. Number of days in past to backfill from. 0 is no backfill. e.g) if 10, then backfill last 10 days of data. Required if fullHistory is not set.
x >= 030
If true, backfill all history. Required if days is not set. If true, backfill all history. Required if days is not set. If true, backfill all history. Required if days is not set.
false
Show child attributes
This is a map of object names to their configuration. This is a map of object names to their configuration.
Show child attributes
Show child attributes
The name of the object to write to. The name of the object to write to. The name of the object to write to.
"account"
This is a map of field names to default values. These values will be used when writing to the object. This is a map of field names to default values. These values will be used when writing to the object. This is a map of field names to default values. These values will be used when writing to the object.
Show child attributes
Show child attributes
The value to be used as a default. The value to be used as a default. The value to be used as a default.
Whether the default value should be applied when updating a record.
If set to always, the default value will be applied when updating a record.
If set to never, the default value will not be applied when updating a record,
only when creating a record.
If unspecified, then always is assumed.
Whether the default value should be applied when updating a record.
If set to always, the default value will be applied when updating a record.
If set to never, the default value will not be applied when updating a record,
only when creating a record.
If unspecified, then always is assumed.
Whether the default value should be applied when updating a record.
If set to always, the default value will be applied when updating a record.
If set to never, the default value will not be applied when updating a record,
only when creating a record.
If unspecified, then always is assumed.
always, never This is a map of field names to their settings. This is a map of field names to their settings. This is a map of field names to their settings.
Show child attributes
Show child attributes
Only use one of stringValue, integerValue, booleanValue. Only use one of stringValue, integerValue, booleanValue. Only use one of stringValue, integerValue, booleanValue.
Show child attributes
The default string value to apply to a field The default string value to apply to a field The default string value to apply to a field
The default integer value to apply to a field The default integer value to apply to a field The default integer value to apply to a field
The default boolean value to apply to a field The default boolean value to apply to a field The default boolean value to apply to a field
Whether the default value should be applied when creating a record. Whether the default value should be applied when creating a record. Whether the default value should be applied when creating a record.
always, never Whether the default value should be applied when updating a record. Whether the default value should be applied when updating a record. Whether the default value should be applied when updating a record.
always, never Show child attributes
Show child attributes
Show child attributes
Whether to inherit fields and mappings from the read config. Whether to inherit fields and mappings from the read config.
true
The name of the object to subscribe to. The name of the object to subscribe to.
"account"
The name of the destination that the result should be sent to. The name of the destination that the result should be sent to.
"accountWebhook"
Show child attributes
Conditions to enable update events. Conditions to enable update events.
always, never "always"
Whether to watch fields all fields automatically. Whether to watch fields all fields automatically.
all "all"
The fields that should be watched. The fields that should be watched.
["name", "description"]Show child attributes
The ID of the user group that has access to this installation.
"group-123"
The name of the user group that has access to this installation.
"Super Customer"
The Ampersand project ID.
"project-456"
The time the group was created.
"2023-07-13T21:34:44.816354Z"
The time the group was last updated.
"2023-07-13T21:34:44.816354Z"
The time the installation was last updated with a new config.
Was this page helpful?