# FeatureWebhookDTO

DTO to configure outbound webhook delivery (project/account)

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**authMethod** | **string** | Authentication method for webhook delivery. HMAC_SHA256: Signs payload with shared secret (most secure, recommended). BEARER_TOKEN: Sends a static token in Authorization header. NONE: No authentication (not recommended). | [default to AuthMethodEnum_None]
**bearerToken** | **string** | Bearer token for BEARER_TOKEN auth method. Sent as \&#39;Authorization: Bearer &lt;token&gt;\&#39; header. Required when authMethod is BEARER_TOKEN. Min 16 characters for security. | [optional] [default to undefined]
**customHeaders** | **{ [key: string]: string; }** | Custom HTTP headers to include in every webhook delivery. Useful for routing, identification, or receiver-side filtering. Max 10 headers. Header names must not override reserved headers (Content-Type, Authorization, X-MetaCopier-*). | [optional] [default to undefined]
**description** | **string** | Optional description/label for this webhook endpoint (for dashboard display). | [optional] [default to undefined]
**enableOutboundWebhook** | **boolean** | Enable or disable webhook delivery. When disabled, events are not sent but configuration is preserved. | [default to true]
**enabled** | **boolean** |  | [optional] [default to undefined]
**endpointUrl** | **string** | The destination URL where webhook payloads will be delivered via HTTP POST. Must be HTTPS in production. | [default to undefined]
**hmacSecret** | **string** | HMAC signing secret for HMAC_SHA256 auth method. Used to compute: HMAC-SHA256(timestamp + \&#39;.\&#39; + body, secret). Verify on your side by recomputing and comparing signatures. Required when authMethod is HMAC_SHA256. Min 32 characters for security. | [optional] [default to undefined]
**includeAccountMetadata** | **boolean** | Include additional account metadata (broker name, login number) in webhook payload. The accountId is always included by default. When enabled, extra identifying fields are added so receivers can distinguish accounts without a separate lookup. | [optional] [default to false]
**includePositionDetails** | **boolean** | Include full position details in webhook payload (symbol, volume, prices, profit, etc.). When false, only accountId and ticket are sent (minimal payload). Full payload is useful for analytics; minimal reduces bandwidth. | [optional] [default to true]
**includeTimestampInSignature** | **boolean** | Include a timestamp in the HMAC signature for replay protection. When enabled, the X-MetaCopier-Timestamp header is included and the signature is computed as HMAC-SHA256(timestamp + \&#39;.\&#39; + body, secret). Receivers can reject old timestamps to prevent replay attacks. Only relevant for HMAC_SHA256 auth method. | [optional] [default to true]
**initialRetryDelayMs** | **number** | Initial retry delay in milliseconds. Each subsequent retry doubles the delay (exponential backoff). E.g., 2000ms → retries at 2s, 4s, 8s. | [optional] [default to 2000]
**initialRetryDelayMsOrDefault** | **number** |  | [optional] [default to undefined]
**maxRetries** | **number** | Maximum number of retry attempts on delivery failure (5xx or network error). Retries use exponential backoff. 0 &#x3D; no retries. | [optional] [default to 3]
**maxRetriesOrDefault** | **number** |  | [optional] [default to undefined]
**rateLimitPerMinute** | **number** | Maximum webhook deliveries per minute per endpoint. Protects the receiver from being overwhelmed during high-frequency trading. Events exceeding the limit are queued and delivered when the window resets. 0 &#x3D; unlimited. | [optional] [default to 60]
**rateLimitPerMinuteOrDefault** | **number** |  | [optional] [default to undefined]
**requestTimeoutSeconds** | **number** | Request timeout in seconds. If the receiver does not respond within this time, the delivery is considered failed and may be retried. | [optional] [default to 30]
**requestTimeoutSecondsOrDefault** | **number** |  | [optional] [default to undefined]
**subscribedEvents** | **Array&lt;string&gt;** | List of events that trigger webhook delivery. Null or empty means ALL events are subscribed. Available events: POSITION_OPENED, POSITION_CLOSED, HISTORY_UPDATED. | [optional] [default to undefined]

## Example

```typescript
import { FeatureWebhookDTO } from 'js-metacopier-api';

const instance: FeatureWebhookDTO = {
    authMethod,
    bearerToken,
    customHeaders,
    description,
    enableOutboundWebhook,
    enabled,
    endpointUrl,
    hmacSecret,
    includeAccountMetadata,
    includePositionDetails,
    includeTimestampInSignature,
    initialRetryDelayMs,
    initialRetryDelayMsOrDefault,
    maxRetries,
    maxRetriesOrDefault,
    rateLimitPerMinute,
    rateLimitPerMinuteOrDefault,
    requestTimeoutSeconds,
    requestTimeoutSecondsOrDefault,
    subscribedEvents,
};
```

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
