Search Results for

    Show / Hide Table of Contents

    Class CreateWebhookOptions

    Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale. Customize the payload sent to your endpoint by setting the requestBodyTemplate property to a string with moustache style variables. Property names from the standard payload model for the given event are available as variables.

    Inheritance
    object
    CreateWebhookOptions
    Implements
    IEquatable<CreateWebhookOptions>
    System.ComponentModel.DataAnnotations.IValidatableObject
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: mailslurp.Model
    Assembly: mailslurp.dll
    Syntax
    [DataContract(Name = "CreateWebhookOptions")]
    public class CreateWebhookOptions : IEquatable<CreateWebhookOptions>, IValidatableObject

    Constructors

    View Source

    CreateWebhookOptions()

    Initializes a new instance of the CreateWebhookOptions class.

    Declaration
    [JsonConstructor]
    protected CreateWebhookOptions()
    View Source

    CreateWebhookOptions(string, BasicAuthOptions, string, EventNameEnum?, WebhookHeaders, string, bool?, bool?)

    Initializes a new instance of the CreateWebhookOptions class.

    Declaration
    public CreateWebhookOptions(string url = null, BasicAuthOptions basicAuth = null, string name = null, CreateWebhookOptions.EventNameEnum? eventName = null, WebhookHeaders includeHeaders = null, string requestBodyTemplate = null, bool? useStaticIpRange = false, bool? ignoreInsecureSslCertificates = null)
    Parameters
    Type Name Description
    string url

    Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. (required).

    BasicAuthOptions basicAuth

    basicAuth.

    string name

    Optional name for the webhook.

    CreateWebhookOptions.EventNameEnum? eventName

    Optional webhook event name. Default is EMAIL_RECEIVED and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name..

    WebhookHeaders includeHeaders

    includeHeaders.

    string requestBodyTemplate

    Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style {{variableName}} templating to use parts of the standard webhook payload for the given event..

    bool? useStaticIpRange

    Use static IP range when calling webhook endpoint (default to false).

    bool? ignoreInsecureSslCertificates

    Ignore insecure SSL certificates when sending request. Useful for self-signed certs..

    Properties

    View Source

    BasicAuth

    Gets or Sets BasicAuth

    Declaration
    [DataMember(Name = "basicAuth", EmitDefaultValue = true)]
    public BasicAuthOptions BasicAuth { get; set; }
    Property Value
    Type Description
    BasicAuthOptions
    View Source

    EventName

    Optional webhook event name. Default is EMAIL_RECEIVED and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name.

    Declaration
    [DataMember(Name = "eventName", EmitDefaultValue = true)]
    public CreateWebhookOptions.EventNameEnum? EventName { get; set; }
    Property Value
    Type Description
    CreateWebhookOptions.EventNameEnum?

    Optional webhook event name. Default is EMAIL_RECEIVED and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name.

    View Source

    IgnoreInsecureSslCertificates

    Ignore insecure SSL certificates when sending request. Useful for self-signed certs.

    Declaration
    [DataMember(Name = "ignoreInsecureSslCertificates", EmitDefaultValue = true)]
    public bool? IgnoreInsecureSslCertificates { get; set; }
    Property Value
    Type Description
    bool?

    Ignore insecure SSL certificates when sending request. Useful for self-signed certs.

    View Source

    IncludeHeaders

    Gets or Sets IncludeHeaders

    Declaration
    [DataMember(Name = "includeHeaders", EmitDefaultValue = false)]
    public WebhookHeaders IncludeHeaders { get; set; }
    Property Value
    Type Description
    WebhookHeaders
    View Source

    Name

    Optional name for the webhook

    Declaration
    [DataMember(Name = "name", EmitDefaultValue = true)]
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Optional name for the webhook

    View Source

    RequestBodyTemplate

    Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style {{variableName}} templating to use parts of the standard webhook payload for the given event.

    Declaration
    [DataMember(Name = "requestBodyTemplate", EmitDefaultValue = true)]
    public string RequestBodyTemplate { get; set; }
    Property Value
    Type Description
    string

    Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style {{variableName}} templating to use parts of the standard webhook payload for the given event.

    View Source

    Url

    Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation.

    Declaration
    [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)]
    public string Url { get; set; }
    Property Value
    Type Description
    string

    Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation.

    View Source

    UseStaticIpRange

    Use static IP range when calling webhook endpoint

    Declaration
    [DataMember(Name = "useStaticIpRange", EmitDefaultValue = true)]
    public bool? UseStaticIpRange { get; set; }
    Property Value
    Type Description
    bool?

    Use static IP range when calling webhook endpoint

    Methods

    View Source

    Equals(CreateWebhookOptions)

    Returns true if CreateWebhookOptions instances are equal

    Declaration
    public bool Equals(CreateWebhookOptions input)
    Parameters
    Type Name Description
    CreateWebhookOptions input

    Instance of CreateWebhookOptions to be compared

    Returns
    Type Description
    bool

    Boolean

    View Source

    Equals(object)

    Returns true if objects are equal

    Declaration
    public override bool Equals(object input)
    Parameters
    Type Name Description
    object input

    Object to be compared

    Returns
    Type Description
    bool

    Boolean

    Overrides
    Object.Equals(Object)
    View Source

    GetHashCode()

    Gets the hash code

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Hash code

    Overrides
    Object.GetHashCode()
    View Source

    ToJson()

    Returns the JSON string presentation of the object

    Declaration
    public virtual string ToJson()
    Returns
    Type Description
    string

    JSON string presentation of the object

    View Source

    ToString()

    Returns the string presentation of the object

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    String presentation of the object

    Overrides
    object.ToString()
    View Source

    Validate(ValidationContext)

    To validate all properties of the instance

    Declaration
    public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
    Parameters
    Type Name Description
    ValidationContext validationContext

    Validation context

    Returns
    Type Description
    IEnumerable<ValidationResult>

    Validation Result

    Implements

    System.IEquatable<T>
    System.ComponentModel.DataAnnotations.IValidatableObject
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.