PATCH
/
projects
/
{projectIdOrName}
/
provider-apps
/
{providerAppId}
Update a provider app
curl --request PATCH \
  --url https://api.withampersand.com/v1/projects/{projectIdOrName}/provider-apps/{providerAppId} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "updateMask": [
    "externalRef",
    "clientId"
  ],
  "providerApp": {
    "externalRef": "external-id-123",
    "provider": "salesforce",
    "clientId": "client-id-123",
    "clientSecret": "client-secret-123",
    "scopes": [
      [
        "read",
        "write"
      ]
    ]
  }
}'
{
  "id": "provider-app-123",
  "projectId": "project-456",
  "externalRef": "external-id-123",
  "provider": "salesforce",
  "clientId": "client-id-123",
  "scopes": [
    [
      "oauth",
      "offline",
      "crm.read"
    ]
  ],
  "createTime": "2023-11-07T05:31:56Z",
  "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.

providerAppId
string
required

ID of the provider app, returned by the CreateProviderApp call.

Body

application/json
updateMask
string[]
required

Array of field paths specifying which fields to update. Allowed values include:

  • externalRef
  • clientId
  • clientSecret
  • provider
  • scopes
Example:
["externalRef", "clientId"]
providerApp
object
required

The provider app fields to update. (Only include the fields you'd like to update.)

Response

The updated provider app

id
string
required

The provider app ID.

Example:

"provider-app-123"

projectId
string
required

The Ampersand project ID.

Example:

"project-456"

provider
string
required

The SaaS provider that this app connects to.

Example:

"salesforce"

clientId
string
required

The OAuth client ID for this app.

Example:

"client-id-123"

createTime
string<date-time>
required

The time the provider app was created.

externalRef
string

The ID used by the provider to identify the app (optional).

Example:

"external-id-123"

scopes
string[]

The OAuth scopes for this app.

updateTime
string<date-time>

The time the provider app was updated.