POST
/
projects
/
{projectIdOrName}
/
destinations
Create a new destination
curl --request POST \
  --url https://api.withampersand.com/v1/projects/{projectIdOrName}/destinations \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "name": "leadConvertedWebhook",
  "type": "webhook",
  "secrets": {
    "awsKeyId": "AKIAIOSFODNN7EXAMPLE",
    "awsSecretKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "awsSessionToken": "AQoEXAMPLEH4aoAH0gNCAPy..."
  },
  "metadata": {
    "url": "https://webhooks.mailmonkey.com/salesforce-lead-converted",
    "headers": {
      "Authorization": "Bearer 1234"
    },
    "kinesisRegion": "us-east-1",
    "kinesisStreamName": "my-kinesis-stream",
    "kinesisEndpointUrl": "https://kinesis.us-east-1.amazonaws.com",
    "kinesisPartitionKeyTemplate": "data.user_id"
  }
}'
{
  "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.

Body

application/json
name
string
required

Name for the new destination. Must be unique within the project and can only contain letters, numbers and dashes.

Example:

"leadConvertedWebhook"

type
enum<string>
required

The type of the destination.

Available options:
webhook,
kinesis
Example:

"webhook"

metadata
object
required
secrets
object

Secrets for the destination.

Response

Created

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)