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

# Create a webhook connection

> Creates a webhook connection (a destination URL plus a generated HMAC signing secret) that alerts can target as a WEBHOOK notification channel. The signing secret is returned only in this response — store it securely; it cannot be retrieved again. The URL must be https and must resolve to a public address.



## OpenAPI

````yaml /openapi.json post /v1/projects/{projectId}/webhooks/connections
openapi: 3.1.0
info:
  description: Public API for Particle — news intelligence, financial data, and analysis.
  title: Particle API
  version: 0.1.0
servers:
  - url: https://api.particle.pro
security:
  - ApiKeyHeader: []
  - BearerAuth: []
paths:
  /v1/projects/{projectId}/webhooks/connections:
    post:
      tags:
        - Webhook Connections
        - tier:standard
      summary: Create a webhook connection
      description: >-
        Creates a webhook connection (a destination URL plus a generated HMAC
        signing secret) that alerts can target as a WEBHOOK notification
        channel. The signing secret is returned only in this response — store it
        securely; it cannot be retrieved again. The URL must be https and must
        resolve to a public address.
      operationId: create-webhook-connection
      parameters:
        - description: Project ID (base62-encoded).
          in: path
          name: projectId
          required: true
          schema:
            description: Project ID (base62-encoded).
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookConnectionBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConnectionCreated'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PlatformError'
          description: Error
      x-codeSamples:
        - label: cURL
          lang: curl
          source: |-
            curl -X POST \
              -H "X-API-Key: $PARTICLE_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{}' \
              "https://api.particle.pro/v1/projects/{projectId}/webhooks/connections"
components:
  schemas:
    CreateWebhookConnectionBody:
      additionalProperties: false
      properties:
        name:
          description: Optional human label for the connection.
          maxLength: 200
          type: string
        url:
          description: >-
            Destination URL. Must be https and resolve to a public address;
            private, loopback, and link-local addresses are rejected.
          maxLength: 2000
          minLength: 1
          type: string
      required:
        - url
      type: object
    WebhookConnectionCreated:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        created_by:
          $ref: '#/components/schemas/Creator'
          description: User who created the connection. Null when created via an API key.
        id:
          type: string
        name:
          description: Optional human label for the connection.
          type: string
        project_id:
          type: string
        revoked_at:
          description: >-
            Set when the connection was deleted/revoked; absent for active
            connections. A revoked connection stops delivering and is skipped by
            alerts that still reference it.
          format: date-time
          type: string
        secret:
          description: >-
            Signing secret — shown only at create/rotate time. Store it
            securely; it cannot be retrieved again. Used to verify the
            X-Webhook-Signature header on delivered payloads.
          type: string
        secret_prefix:
          description: >-
            Masked signing-secret prefix for identification. The full secret is
            shown only at create/rotate time and cannot be retrieved afterward.
          type: string
        surface:
          description: >-
            Which Particle surface this connection belongs to. Fixed at create
            time and inferred from the caller's authenticated surface context. A
            PLATFORM alert can only target a PLATFORM connection (and likewise
            for RADAR).
          enum:
            - PLATFORM
            - RADAR
          type: string
        url:
          description: Destination URL that signed POSTs are delivered to.
          type: string
      required:
        - secret
        - id
        - project_id
        - surface
        - url
        - secret_prefix
        - created_at
      type: object
    PlatformError:
      additionalProperties: false
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        error_code:
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        resolve:
          $ref: '#/components/schemas/ErrorResolve'
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    Creator:
      additionalProperties: false
      properties:
        id:
          description: Creator's user ID
          type: string
        name:
          description: Creator's display name
          type: string
      required:
        - id
        - name
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    ErrorResolve:
      additionalProperties: false
      properties:
        action:
          type: string
        endpoint:
          type: string
        message:
          type: string
        method:
          type: string
        url:
          type: string
      required:
        - message
      type: object
  securitySchemes:
    ApiKeyHeader:
      description: Pass your API key in the X-API-Key header (recommended).
      in: header
      name: X-API-Key
      type: apiKey
    BearerAuth:
      description: Pass your API key as a Bearer token in the Authorization header.
      scheme: bearer
      type: http

````