Destinations

Update Destination

Updates the configuration of an existing destination. The request body structure depends on the destination's type. Type itself cannot be updated. May return an OAuth redirect URL for certain types.

patch/tenants/{tenant_id}/destinations/{destination_id}

Request body

OR
OR
OR
OR
OR
OR
OR
OR

Example request

{
  "type": "webhook",
  "filter": {
    "data": {
      "amount": {
        "$gte": 100
      },
      "customer": {
        "tier": "premium"
      }
    }
  },
  "config": {
    "url": "https://example.com/webhooks/user",
    "custom_headers": "{\"x-api-key\":\"secret123\",\"x-tenant-id\":\"customer-456\"}"
  },
  "delivery_metadata": {
    "app-id": "my-app",
    "region": "us-east-1"
  },
  "metadata": {
    "internal-id": "123",
    "team": "platform"
  }
}

Response

Destination updated successfully or OAuth redirect needed.

OR
OR
OR
OR
OR
OR
OR
OR

Example response

{
  "id": "des_webhook_123",
  "type": "webhook",
  "topics": [
    "user.created",
    "order.shipped"
  ],
  "disabled_at": null,
  "created_at": "2024-02-15T10:00:00Z",
  "updated_at": "2024-02-15T10:00:00Z",
  "config": {
    "url": "https://my-service.com/webhook/handler"
  },
  "credentials": {
    "secret": "whsec_abc123def456",
    "previous_secret": "whsec_prev789xyz012",
    "previous_secret_invalid_at": "2024-02-16T10:00:00Z"
  }
}

Changes

Changed in 6 of the 50 revisions of this API.10162

  • 71247f4d271d9129See the full diff
    • added the new required request property oneOf[DestinationUpdateAWSKinesis]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateAWSS3]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateAWSSQS]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateAzureServiceBus]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateGCPPubSub]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateHookdeck]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateKafka]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateRabbitMQ]/type

      new-required-request-property

    • added the new required request property oneOf[DestinationUpdateWebhook]/type

      new-required-request-property

    • removed the request property oneOf[DestinationUpdateHookdeck]/config

      request-property-removed

    • added request discriminator

      request-body-discriminator-added

    • the request property oneOf[DestinationUpdateAWSKinesis]/config/region became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSKinesis]/config/stream_name became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSKinesis]/credentials/key became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSKinesis]/credentials/secret became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSS3]/config/bucket became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSS3]/config/region became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSS3]/credentials/key became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSS3]/credentials/secret became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSSQS]/config/queue_url became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSSQS]/credentials/key became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAWSSQS]/credentials/secret became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAzureServiceBus]/config/name became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateAzureServiceBus]/credentials/connection_string became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateGCPPubSub]/config/project_id became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateGCPPubSub]/config/topic became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateGCPPubSub]/credentials/service_account_json became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateHookdeck]/credentials/token became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateKafka]/config/brokers became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateKafka]/config/sasl_mechanism became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateKafka]/config/topic became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateKafka]/credentials/password became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateKafka]/credentials/username became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateRabbitMQ]/config/exchange became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateRabbitMQ]/config/server_url became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateRabbitMQ]/credentials/password became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateRabbitMQ]/credentials/username became optional

      request-property-became-optional

    • the request property oneOf[DestinationUpdateWebhook]/config/url became optional

      request-property-became-optional

    • the tls request property default value true was removed

      request-property-default-value-removed

    • added the new optional request property oneOf[DestinationUpdateAWSKinesis]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateAWSS3]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateAWSSQS]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateAzureServiceBus]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateGCPPubSub]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateHookdeck]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateKafka]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateRabbitMQ]/disabled_at

      new-optional-request-property

    • added the new optional request property oneOf[DestinationUpdateWebhook]/disabled_at

      new-optional-request-property

  • 4e68e64777ea12See the full diff
    • added DestinationKafka to the oneOf[Destination]/ response property oneOf list for the response status 200

      response-property-one-of-added

    • added DestinationUpdateKafka to the request body oneOf list

      request-body-one-of-added

    • added kafka discriminator mapping keys to the oneOf[Destination]/ response property for the response status 200

      response-property-discriminator-mapping-added

    • request property oneOf[DestinationUpdateAWSKinesis]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateAWSKinesis]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateAWSS3]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateAWSS3]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateAWSSQS]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateAWSSQS]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateAzureServiceBus]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateAzureServiceBus]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateGCPPubSub]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateGCPPubSub]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateHookdeck]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateHookdeck]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateRabbitMQ]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateRabbitMQ]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateWebhook]/delivery_metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property oneOf[DestinationUpdateWebhook]/metadata/additionalProperties/ list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • added the media type application/json for the response with the status 404

      response-media-type-added

    • added the non-success response with the status 401

      response-non-success-status-added

    • added the non-success response with the status 422

      response-non-success-status-added

    • added the non-success response with the status 500

      response-non-success-status-added

    • removed the non-success response with the status 400

      response-non-success-status-removed

    • endpoint added

      endpoint-added