SparkPost Relay Webhooks API

The Relay Webhooks API from SparkPost — 3 operation(s) for relay webhooks.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /relay-webhooks Create an inbound email relay webhook · Create a Relay Webhook #
Ask an LLM
“How do I get inbound emails forwarded to my own server?”
“Can I match a relay webhook to a domain pattern and send to a URL?”
Tell an agent
Create relay webhook {name} sending inbound emails to {target} matching {match}.
Set up a new inbound email webhook {name} at {target} with match {match}.
GET /relay-webhooks List inbound relay webhooks · List All Relay Webhooks #
Ask an LLM
“Which webhooks are set up to receive inbound emails?”
“What relay webhooks exist for my inbound domains?”
Tell an agent
List all relay webhooks.
Show every inbound email webhook.
GET /relay-webhooks/{id} Get an inbound relay webhook · Retrieve a Relay Webhook #
Ask an LLM
“What target and match does a specific relay webhook use?”
“Can I look up one inbound email webhook by ID?”
Tell an agent
Show relay webhook {id}.
Get the inbound email webhook {id}.
PUT /relay-webhooks/{id} Update an inbound relay webhook · Update a Relay Webhook #
Ask an LLM
“Can I change the URL an existing inbound email webhook posts to?”
“Is it possible to rotate the auth token on a relay webhook?”
Tell an agent
Point relay webhook {id} at {target}.
Change the auth token of inbound email webhook {id} to {auth_token}.
DELETE /relay-webhooks/{id} Delete an inbound relay webhook · Delete a Relay Webhook #
Ask an LLM
“How do I stop inbound emails being relayed to a URL?”
“Can I remove a relay webhook I no longer use?”
Tell an agent destructive · confirm first
Delete relay webhook {id}.
Remove the inbound email webhook {id}.
POST /relay-webhooks/{id}/validate Test an inbound relay webhook · Validate a Relay Webhook #
Ask an LLM
“Is my inbound email webhook actually receiving test events?”
“Can I send a test inbound email to check a relay webhook target?”
Tell an agent
Validate relay webhook {id} by sending a test event.
Test inbound email webhook {id} connectivity.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sparkpost:sparkpost-relay-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sparkpost-relay-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SparkPost Inbound Domains Relay Webhooks API
  description: Configure inbound email processing by associating inbound domains with relay webhooks that forward received messages as HTTP POST events to your application.
  version: 1.0.0
  contact:
    name: SparkPost Developer Support
    url: https://developers.sparkpost.com/api/inbound-domains/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.sparkpost.com/api/v1
  description: SparkPost Production API
security:
- ApiKeyAuth: []
tags:
- name: Relay Webhooks
paths:
  /relay-webhooks:
    post:
      operationId: createRelayWebhook
      summary: Create a Relay Webhook
      description: Create a webhook to receive inbound email messages forwarded from an inbound domain.
      tags:
      - Relay Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelayWebhookRequest'
      responses:
        '200':
          description: Relay webhook created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelayWebhookResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict with existing relay webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    get:
      operationId: listRelayWebhooks
      summary: List All Relay Webhooks
      description: Retrieve a list of all configured relay webhooks.
      tags:
      - Relay Webhooks
      responses:
        '200':
          description: List of relay webhooks
        '401':
          description: Unauthorized
  /relay-webhooks/{id}:
    get:
      operationId: getRelayWebhook
      summary: Retrieve a Relay Webhook
      description: Retrieve details about a specific relay webhook.
      tags:
      - Relay Webhooks
      parameters:
      - name: id
        in: path
        required: true
        description: Relay webhook ID
        schema:
          type: string
      responses:
        '200':
          description: Relay webhook details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelayWebhookResponse'
        '401':
          description: Unauthorized
        '404':
          description: Relay webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: updateRelayWebhook
      summary: Update a Relay Webhook
      description: Update configuration for an existing relay webhook.
      tags:
      - Relay Webhooks
      parameters:
      - name: id
        in: path
        required: true
        description: Relay webhook ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelayWebhookUpdateRequest'
      responses:
        '200':
          description: Relay webhook updated
        '400':
          description: Invalid request
        '404':
          description: Relay webhook not found
        '409':
          description: Conflict with existing configuration
    delete:
      operationId: deleteRelayWebhook
      summary: Delete a Relay Webhook
      description: Remove a relay webhook configuration.
      tags:
      - Relay Webhooks
      parameters:
      - name: id
        in: path
        required: true
        description: Relay webhook ID
        schema:
          type: string
      responses:
        '200':
          description: Relay webhook deleted
        '404':
          description: Relay webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /relay-webhooks/{id}/validate:
    post:
      operationId: validateRelayWebhook
      summary: Validate a Relay Webhook
      description: Send a test inbound email event to the relay webhook target to validate connectivity.
      tags:
      - Relay Webhooks
      parameters:
      - name: id
        in: path
        required: true
        description: Relay webhook ID
        schema:
          type: string
      responses:
        '200':
          description: Validation result
components:
  schemas:
    RelayWebhookDetails:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        target:
          type: string
        auth_type:
          type: string
        match:
          type: object
          properties:
            domain:
              type: string
        custom_headers:
          type: object
    RelayWebhookUpdateRequest:
      type: object
      properties:
        name:
          type: string
        target:
          type: string
          format: uri
        auth_token:
          type: string
        auth_type:
          type: string
          enum:
          - none
          - oauth2
        auth_request_details:
          type: object
        match:
          type: object
          properties:
            domain:
              type: string
        custom_headers:
          type: object
          additionalProperties:
            type: string
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              description:
                type: string
    RelayWebhookRequest:
      type: object
      required:
      - target
      - match
      properties:
        name:
          type: string
          description: Human-readable name for the relay webhook
        target:
          type: string
          format: uri
          description: HTTP or HTTPS URL to receive inbound messages
        auth_type:
          type: string
          enum:
          - none
          - oauth2
          description: Authentication type for webhook requests
        auth_request_details:
          type: object
          description: OAuth 2.0 configuration
          properties:
            url:
              type: string
              format: uri
            body:
              type: object
        auth_token:
          type: string
          description: Authentication token
        match:
          type: object
          required:
          - domain
          description: Domain matching criteria for this relay webhook
          properties:
            domain:
              type: string
              description: Inbound domain to associate with this relay webhook
            protocol:
              type: string
              enum:
              - SMTP
        custom_headers:
          type: object
          additionalProperties:
            type: string
          description: Custom HTTP headers to include in relay webhook requests
    RelayWebhookResponse:
      type: object
      properties:
        results:
          $ref: '#/components/schemas/RelayWebhookDetails'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization