PATCH
/
projects
/
{projectIdOrName}
/
destinations
/
{destination}
Update a destination
curl --request PATCH \
  --url https://api.withampersand.com/v1/projects/{projectIdOrName}/destinations/{destination} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "updateMask": [
    "name",
    "metadata.url",
    "metadata.region",
    "metadata.streamName"
  ],
  "destination": {
    "name": "leadConvertedWebhook",
    "metadata": {
      "url": "https://webhooks.mailmonkey.com/salesforce-lead-converted",
      "headers": {
        "Authorization": "Bearer 1234"
      },
      "region": "us-east-1",
      "streamName": "my-kinesis-stream",
      "endpointUrl": "https://kinesis.us-east-1.amazonaws.com",
      "partitionKeyTemplate": "data.user_id"
    },
    "secrets": {
      "awsKeyId": "AKIAIOSFODNN7EXAMPLE",
      "awsSecretKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
      "awsSessionToken": "AQoEXAMPLEH4aoAH0gNCAPy..."
    }
  }
}'
{
  "id": "<string>",
  "name": "leadConvertedWebhook",
  "type": "webhook",
  "metadata": {
    "url": "https://webhooks.mailmonkey.com/salesforce-lead-converted",
    "headers": {
      "Authorization": "Bearer 1234"
    }
  },
  "createTime": "2023-11-07T05:31:56Z",
  "updateTime": "2023-11-07T05:31:56Z",
  "secrets": {
    "webhookSigningKey": "<string>"
  }
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

projectIdOrName
string
required

The Ampersand project ID or project name.

destination
string
required

The destination ID.

Body

application/json
updateMask
string[]
required

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

  • name
  • metadata.url
  • metadata.headers
  • metadata.region
  • metadata.streamName
  • metadata.endpointUrl
  • metadata.partitionKeyTemplate
  • secrets.awsKeyId
  • secrets.awsSecretKey
  • secrets.awsSessionToken
Example:
[
"name",
"metadata.url",
"metadata.region",
"metadata.streamName"
]
destination
object
required

Response

Updated

id
string
required

The destination ID.

name
string
required

User-defined name for the destination

Example:

"leadConvertedWebhook"

type
string
required

The type of the destination

Example:

"webhook"

metadata
object
required
createTime
string<date-time>
required

The time the destination was created.

updateTime
string<date-time>

The time the destination was updated.

secrets
object

Destination secrets (only included when includeSecrets is true)