> ## Documentation Index
> Fetch the complete documentation index at: https://www.ravion.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create NotificationDestination

> Create a notification destination. POST /notification-destinations in the Ravion API reference.



## OpenAPI

````yaml https://api.ravion.com/openapi.yaml post /notification-destinations
openapi: 3.0.0
info:
  title: Ravion
  version: 0.0.0
servers:
  - url: https://api.ravion.com
security:
  - BearerAuth: []
tags:
  - name: Projects
  - name: Environments
  - name: FeatureFlags
  - name: Pipelines
  - name: PipelineRuns
  - name: TerraformResources
  - name: TerraformExecutionSummaries
  - name: PipelineStepExecutions
  - name: AwsCloudWatch
  - name: AwsAmp
  - name: PipelineVersions
  - name: Organizations
  - name: Stacks
  - name: StackWorkspaces
  - name: Auth
  - name: OAuth
  - name: User
  - name: Health
  - name: Memberships
  - name: ServiceAccounts
  - name: Integrations
  - name: AwsDefaultNetworks
  - name: AwsAccounts
  - name: ApiKeys
  - name: EksPrometheus
  - name: EksLoki
  - name: ExecutionEnvironments
  - name: ModuleDefinitions
  - name: ModuleCategories
  - name: ModuleVersions
  - name: ModuleInstances
  - name: DefaultValueDefinitions
  - name: DefaultValues
  - name: CodeSources
  - name: Github
  - name: GitHub Actions
  - name: Alerts
  - name: Gitlab
  - name: Slack
  - name: Git
  - name: MergeQueues
  - name: Values
  - name: Deployments
  - name: DeploymentResources
  - name: InfrastructureEvents
  - name: WebSocket
  - name: Domains
  - name: AcmCertificates
  - name: NotificationDestinations
  - name: NotificationDispatches
  - name: NotificationEvents
  - name: NotificationRules
  - name: Activity
  - name: Describe
  - name: Reports
  - name: BillingPlans
  - name: BillingAccounts
  - name: BillingCycles
  - name: BillingUsageSummaries
  - name: BillingAddOns
  - name: BillingInvoices
  - name: Authorization
  - name: Sandboxes
  - name: SandboxCommands
  - name: SandboxPorts
  - name: Apps
paths:
  /notification-destinations:
    post:
      tags:
        - NotificationDestinations
      summary: Create NotificationDestination
      description: >-
        Create a notification destination. A WEBHOOK destination's URL must be
        one Ravion will send to: an https:// URL whose host is not localhost and
        does not resolve to a private, loopback, link-local or otherwise
        reserved address. Any other URL is refused with 400 and the
        `UrlValidation` error that names the problem, such as
        `UrlValidation:HTTPS_REQUIRED` or
        `UrlValidation:PRIVATE_IP_NOT_ALLOWED`. An EMAIL destination's address
        must be the email address of a current member of the organization,
        compared without regard to case; any other address is refused with 422
        `NotificationDestination:EMAIL_ADDRESS_NOT_MEMBER`. Available to
        organizations with notifications enabled; refused with 403 otherwise.
      operationId: CreateNotificationDestination
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              description: >-
                Request body for creating resources, excluding read-only
                properties
              properties:
                data:
                  additionalProperties: false
                  description: >-
                    Filters a model to only include properties visible during
                    Create lifecycle.
                  properties:
                    config:
                      allOf:
                        - $ref: >-
                            #/components/schemas/Events.NotificationDestinationConfig
                      description: >-
                        The destination's address, discriminated by `kind` — a
                        webhook URL, a Slack channel or user, or an email
                        address.
                    connectionId:
                      description: >-
                        Id of the active integration this destination delivers
                        through. Required, and must reference an integration
                        whose provider matches `kind` (SLACK for SLACK_CHANNEL
                        and SLACK_DM, WEBHOOK for WEBHOOK). Absent for EMAIL,
                        which carries no credential.
                      nullable: true
                      type: string
                    enabled:
                      description: >-
                        Whether matched notification rules deliver to this
                        destination.
                      type: boolean
                    kind:
                      allOf:
                        - $ref: >-
                            #/components/schemas/Events.NotificationDestinationKind
                      description: >-
                        Which channel this destination delivers to. Fixed at
                        creation — create a new destination to change kind.
                    label:
                      description: User-facing label shown in destination lists.
                      minLength: 1
                      type: string
                  required:
                    - kind
                    - label
                    - enabled
                    - config
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/NotificationDestination'
                required:
                  - data
                type: object
          description: >-
            The request has succeeded and a new resource has been created as a
            result.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The request is invalid or malformed.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You are not authenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You do not have permission to access this resource.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Client error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Server error
components:
  schemas:
    Events.NotificationDestinationConfig:
      description: |-
        A notification destination's address configuration, discriminated by
        `kind`. Carries only the fields that kind of destination needs to be
        reached — a webhook URL, a Slack channel or user, or an email address.
      discriminator:
        mapping:
          EMAIL: '#/components/schemas/Events.EmailNotificationDestinationConfig'
          SLACK_CHANNEL: >-
            #/components/schemas/Events.SlackChannelNotificationDestinationConfig
          SLACK_DM: '#/components/schemas/Events.SlackDmNotificationDestinationConfig'
          WEBHOOK: '#/components/schemas/Events.WebhookNotificationDestinationConfig'
        propertyName: kind
      oneOf:
        - $ref: >-
            #/components/schemas/Events.SlackChannelNotificationDestinationConfig
        - $ref: '#/components/schemas/Events.SlackDmNotificationDestinationConfig'
        - $ref: '#/components/schemas/Events.EmailNotificationDestinationConfig'
        - $ref: '#/components/schemas/Events.WebhookNotificationDestinationConfig'
      type: object
    Events.NotificationDestinationKind:
      description: The channel a notification destination delivers to.
      enum:
        - SLACK_CHANNEL
        - SLACK_DM
        - EMAIL
        - WEBHOOK
      type: string
    NotificationDestination:
      additionalProperties: false
      properties:
        config:
          allOf:
            - $ref: '#/components/schemas/Events.NotificationDestinationConfig'
          description: >-
            The destination's address, discriminated by `kind` — a webhook URL,
            a Slack channel or user, or an email address.
        connectionId:
          description: >-
            Id of the active integration this destination delivers through.
            Required, and must reference an integration whose provider matches
            `kind` (SLACK for SLACK_CHANNEL and SLACK_DM, WEBHOOK for WEBHOOK).
            Absent for EMAIL, which carries no credential.
          nullable: true
          type: string
        createdAt:
          allOf:
            - $ref: '#/components/schemas/UtcDateTime'
          readOnly: true
        createdById:
          description: Audit-only user id for the member who created the destination.
          readOnly: true
          type: string
        enabled:
          description: Whether matched notification rules deliver to this destination.
          type: boolean
        id:
          readOnly: true
          type: string
        kind:
          allOf:
            - $ref: '#/components/schemas/Events.NotificationDestinationKind'
          description: >-
            Which channel this destination delivers to. Fixed at creation —
            create a new destination to change kind.
        label:
          description: User-facing label shown in destination lists.
          minLength: 1
          type: string
        organizationId:
          readOnly: true
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/NotificationDestination.Status'
          description: Verification/access state. System-managed.
          readOnly: true
        updatedAt:
          allOf:
            - $ref: '#/components/schemas/UtcDateTime'
          readOnly: true
      required:
        - id
        - createdAt
        - updatedAt
        - organizationId
        - kind
        - label
        - enabled
        - status
        - config
        - createdById
      type: object
    Errors.UserFacingErrorData:
      additionalProperties: false
      description: |-
        User-facing error presentation data.
        This is what the API returns to the frontend after formatting ErrorData
        using CEL templates from the error registry.

        Used for both:
        - Error fields on domain models (e.g., PipelineRun.error)
        - API error response bodies (HTTP 4xx/5xx responses)
      properties:
        action:
          allOf:
            - $ref: '#/components/schemas/Errors.Action'
          description: Optional action to help resolve the error
        code:
          description: Full error code, e.g., "Ravion:Pipeline:NOT_FOUND"
          type: string
        description:
          description: Additional description with more details
          type: string
        details:
          description: Structured details rendered as user-facing sections.
          items:
            $ref: '#/components/schemas/Errors.UserFacingErrorDetailSection'
          type: array
        isInternal:
          description: >-
            Indicates whether this error is internal (only set when
            ShowInternal=true).

            This allows SUPERADMINs to identify internal errors while viewing
            full details.
          type: boolean
        message:
          description: Main error message (required)
          type: string
        metadata:
          additionalProperties: {}
          description: >-
            Error params/metadata. Stripped for internal errors unless
            superadmin.
          type: object
        requestId:
          description: Request ID for correlating errors with server logs.
          type: string
      required:
        - code
        - message
      type: object
    Events.EmailNotificationDestinationConfig:
      additionalProperties: false
      description: Address configuration for an email notification destination.
      properties:
        address:
          description: Email address the notification is sent to.
          type: string
        kind:
          enum:
            - EMAIL
          type: string
      required:
        - kind
        - address
      type: object
    Events.SlackChannelNotificationDestinationConfig:
      additionalProperties: false
      description: Address configuration for a Slack-channel notification destination.
      properties:
        channel_id:
          description: Slack channel ID, for example "C0123456789".
          type: string
        channel_name:
          description: Human-readable Slack channel name, shown in destination lists.
          type: string
        kind:
          enum:
            - SLACK_CHANNEL
          type: string
        slack_connection_id:
          description: ID of the Slack integration this channel is posted through.
          type: string
      required:
        - kind
        - slack_connection_id
        - channel_id
        - channel_name
      type: object
    Events.SlackDmNotificationDestinationConfig:
      additionalProperties: false
      description: >-
        Address configuration for a Slack-direct-message notification
        destination.
      properties:
        kind:
          enum:
            - SLACK_DM
          type: string
        slack_connection_id:
          description: ID of the Slack integration this direct message is sent through.
          type: string
        slack_user_id:
          description: Slack user ID of the message recipient.
          type: string
      required:
        - kind
        - slack_connection_id
        - slack_user_id
      type: object
    Events.WebhookNotificationDestinationConfig:
      additionalProperties: false
      description: Address configuration for a webhook notification destination.
      properties:
        kind:
          enum:
            - WEBHOOK
          type: string
        method:
          allOf:
            - $ref: '#/components/schemas/Events.WebhookNotificationMethod'
          description: >-
            HTTP method the event is sent with: POST, PUT or PATCH. The event is

            always the JSON request body. The X-Ravion-Signature-256 header is
            an

            HMAC-SHA256 of the request body only, so it is the same for every

            method. Defaults to POST when omitted.
        url:
          description: HTTPS endpoint the event payload is sent to.
          type: string
      required:
        - kind
        - url
      type: object
    UtcDateTime:
      description: UTC RFC3339 timestamp with a required Z suffix
      format: date-time
      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$
      type: string
      x-go-type: apitypes.UTCDateTime
      x-go-type-import:
        name: apitypes
        path: ravion/api-go/pkg/apitypes
    NotificationDestination.Status:
      description: >-
        Lifecycle state of a notification destination. ACTIVE destinations
        receive dispatches; PENDING_VERIFICATION and REVOKED destinations do
        not.
      enum:
        - ACTIVE
        - PENDING_VERIFICATION
        - REVOKED
      type: string
    Errors.Action:
      additionalProperties: false
      description: Action to help user resolve the error
      properties:
        label:
          description: Button/link label text
          type: string
        url:
          description: URL to navigate to for resolution
          type: string
      required:
        - label
        - url
      type: object
    Errors.UserFacingErrorDetailSection:
      additionalProperties: false
      description: Structured user-facing error detail section.
      properties:
        items:
          description: List of detail values for this section.
          items:
            type: string
          type: array
        object:
          additionalProperties: {}
          description: Structured detail payload for object rendering.
          type: object
        render:
          description: Rendering hint for clients. Valid values are list or object.
          type: string
        title:
          description: Detail section title shown in the UI.
          type: string
      required:
        - title
        - render
      type: object
    Events.WebhookNotificationMethod:
      description: |-
        HTTP method a webhook notification destination is sent with. Every value
        carries a request body; GET and DELETE are not offered because the event
        is delivered as the JSON request body.
      enum:
        - POST
        - PUT
        - PATCH
      type: string
  securitySchemes:
    BearerAuth:
      scheme: Bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.