SparkPost API (v1)

v1.0 Base URL: https://sp-api.omnivery.net/api/v1

Omnivery API allows you to send messages, retrieve delivery stats, check and configure your sending domains and more in multiple formats. This documentation covers the SparkPost compatible API of Omnivery.

As this API is fully compatible with the SparkPost (v1) API any existing software or library supporting SparkPost (v1) API should work without any changes required. The only change that may be required would be the change of the endpoint and API token.

This REST API requires all requests to be authenticated using Authentication header with your access token as a value. API tokens can be found in the UI under Credentials menu in API Keys tab (for domain specific/sending tokens) or under API keys menu. For security reasons we strongly suggest using domain specific API keys rather than account API keys whenever possible.

All data to the API endpoint must be posted in JSON format.

Authentication

  • API Key: API Key in header as Authorization

Enter your credentials below to use the Try it feature:

Account Info

GET /account Retrieve Account information

This endpoint is only accessible using a primary API key.

Returns complete information about your account, it's settings and current plan and its usage.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes

Authorization header must contain your account's primary API token

Responses

200

OK

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/account' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/account", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/account', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/account');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/account',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            

Sending Domains

GET /sending-domains List all Sending Domains

This endpoint is only accessible using a primary API key.

Returns a list of domains under your account in JSON. See examples.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes

Authorization header must contain your account's primary API token

Responses

200

OK

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/sending-domains' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/sending-domains", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/sending-domains', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/sending-domains');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/sending-domains',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
POST /sending-domains Create a Sending Domain (auto gen DKIM)

This endpoint is only accessible using a primary API key.

Create a sending domain by providing a sending domain object as the POST request body.

For compatibility reasons the API call will ignore parameters specific to Sparkpost's environment like tracking_domain, dkim, generate_dkim or shared_with_subaccounts.

NOTE: Omnivery takes care of automatic DKIM key rotation using CNAMEs. To facilitate a proper domain setup the response contains an object with all DNS records that need to be set instead of the DKIM object with the selector and public key.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes

Authorization header must contain your account's primary API token

Content-Type header string Yes

application/json

Request Body application/json

FieldTypeRequiredDescription
domain string Yes

The domain or subdomain to create

Responses

200

OK

402

Payment Required

Code Samples

curl -X POST 'https://sp-api.omnivery.net/api/v1/sending-domains' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -d '{"domain": "string"}'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://sp-api.omnivery.net/api/v1/sending-domains", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/sending-domains', {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
  body: JSON.stringify({"domain": "string"})
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/sending-domains');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"domain": "string"}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.post(
    'https://sp-api.omnivery.net/api/v1/sending-domains',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
    json={"domain": "string"}
)
print(response.json())
Response

                            
GET /sending-domains/{domain} Retrieve a Sending Domain

This endpoint is only accessible using a primary API key.

Retrieve a sending domain by specifying its domain name in the URI path. The response includes details about its DKIM key configuration.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes

Authorization header must contain your account's primary API token

Responses

200

Sending domain detail object

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/sending-domains/{domain}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/sending-domains/{domain}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/sending-domains/{domain}', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/sending-domains/{domain}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/sending-domains/{domain}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
DELETE /sending-domains/{domain} Delete a Sending Domain

This endpoint is only accessible using a primary API key.

Delete an existing sending domain.

Warning: Before deleting a sending domain please ensure you are no longer using it. After deleting a sending domain, any new transmissions that use it will result in a rejection. This includes any transmissions that are in progress, scheduled for the future, or use a stored template referencing the sending domain.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes

Authorization header must contain your account's primary API token

domain path string Yes

The domain to be deleted

Responses

204

No Content

404

Not Found

Code Samples

curl -X DELETE 'https://sp-api.omnivery.net/api/v1/sending-domains/{domain}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("DELETE", "https://sp-api.omnivery.net/api/v1/sending-domains/{domain}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/sending-domains/{domain}', {
  method: 'DELETE',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/sending-domains/{domain}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.delete(
    'https://sp-api.omnivery.net/api/v1/sending-domains/{domain}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
POST /sending-domains/{domain}/verify Verify a Sending Domain

This endpoint is only accessible using a primary API key.

Verifies all the domain settings required for use of the domain for sending and receiving messages.

Request will perform a complete validation check of all required DNS records. All options available in the original Sparkpost API are ignored, eg. (dkim_verify, cname_verify, spf_verify, etc.)

Parameters

NameInTypeRequiredDescription
Authorization header string Yes

Authorization header must contain your account's primary API token

domain path string Yes

Domain name to verify

Responses

200

OK

Code Samples

curl -X POST 'https://sp-api.omnivery.net/api/v1/sending-domains/{domain}/verify' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://sp-api.omnivery.net/api/v1/sending-domains/{domain}/verify", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/sending-domains/{domain}/verify', {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/sending-domains/{domain}/verify');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.post(
    'https://sp-api.omnivery.net/api/v1/sending-domains/{domain}/verify',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            

Transmissions

POST /transmissions Create a Transmission (inline text/html and recipients)

This endpoint is only accessible using both sending and primary API keys. If primary API key is used the return_path attribute is required to identify the domain to be used.

You can create a transmission using SparkPost API in a number of ways.

Using Inline Email Part Content

Create a transmission using inline email part content.

Using Inline RFC822 Content (MIME)

Create a transmission using inline RFC822 content. Content headers are not generated for transmissions providing RFC822 content. They are expected to be provided as headers contained in the RFC822 content.

Using a Stored Template

Create a transmission using a stored template by specifying the template_id in the content attribute.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes

Authorization header must contain your domain's sending API token or your account's primary API token

Content-Type header string Yes

application/json

Request Body application/json

FieldTypeRequiredDescription
campaign_id string No

Campaign ID of your choice to help you identify campaigns. This could be helpful in the future when identifying messages of a larger send.

content object Yes

Content object carries the information about the sender (from), message subject as well as message body. The message body can be supplied in multiple formats or retrieved from a template.

metadata object No

Metadata are global metadata applied to all recipients of this transmission. Metadata supplied in the recipient's object will override the transmission metadata

options object No

Message level settings to override the domain level settings

recipients array Yes

Recipients object contains not only recipient's address but can also include variables to be passed to template.

FieldTypeRequiredDescription
address object Yes

Address information for a recipient

callback_url string No

Custom webhook endpoint URL - overrides webhooks set at the domain level.

metadata object No

Key/value pairs associated with a recipient. Metadata is available during events through the Webhooks and is provided to the template engine. A maximum of 1000 bytes of merged metadata (transmission level + recipient level) is available with recipient metadata taking precedence over transmission metadata when there are conflicts.

substitution_data object No

Key/value pairs associated with a recipient that are provided to the template engine. Recipient substitution data takes precedence over transmission substitution data. Unlike metadata, substitution data is not included in Webhook events. The maximum length is 100KB per recipient.

tags array No

Array of text labels associated with a recipient. Tags are available in Webhook events. Maximum number of tags - 10 per recipient, 100 system wide. Any tags over the limits are ignored.

return_path string No

Return path allows you to select your sending domain in case you are using a primary API token and in that case it is a required parameter. When using sending API token the return_path attribute has no use

substitution_data object No

Substitution data are global data substituted for all recipients of this transmission. Substitution data supplied in the recipient's object will override the transmission substitution data

Responses

200

Code Samples

curl -X POST 'https://sp-api.omnivery.net/api/v1/transmissions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -d '{"campaign_id": "string", "content": {}, "metadata": {}, "options": {}, "recipients": [], "return_path": "string", "substitution_data": {}}'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://sp-api.omnivery.net/api/v1/transmissions", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/transmissions', {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
  body: JSON.stringify({"campaign_id": "string", "content": {}, "metadata": {}, "options": {}, "recipients": [], "return_path": "string", "substitution_data": {}})
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/transmissions');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"campaign_id": "string", "content": {}, "metadata": {}, "options": {}, "recipients": [], "return_path": "string", "substitution_data": {}}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.post(
    'https://sp-api.omnivery.net/api/v1/transmissions',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
    json={"campaign_id": "string", "content": {}, "metadata": {}, "options": {}, "recipients": [], "return_path": "string", "substitution_data": {}}
)
print(response.json())
Response

                            

Webhooks

GET /{domain}/webhooks List Webhooks

This endpoint is only accessible using a primary API key.

List the webhooks configured for the given sending domain.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
Accept header string Yes
domain path string Yes

The sending domain the webhooks belong to.

Responses

200

OK

404

Not Found

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/{domain}/webhooks' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/{domain}/webhooks", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/webhooks', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/webhooks');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/{domain}/webhooks',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
POST /{domain}/webhooks Create Webhooks

This endpoint is only accessible using a primary API key.

Create one or more webhooks for the given sending domain. A separate webhook is created for each event supplied in events, all pointing at the same target URL.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Content-Type header string No
Accept header string Yes
Authorization header string Yes
domain path string Yes

The sending domain the webhooks will be created for.

Request Body application/json

FieldTypeRequiredDescription
events array Yes

Sparkpost event names to subscribe to. A separate webhook is created per event.

target string Yes

The endpoint URL events will be delivered to.

Responses

200

OK

400

Bad Request

Code Samples

curl -X POST 'https://sp-api.omnivery.net/api/v1/{domain}/webhooks' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -d '{"events": [], "target": "string"}'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://sp-api.omnivery.net/api/v1/{domain}/webhooks", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/webhooks', {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
  body: JSON.stringify({"events": [], "target": "string"})
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/webhooks');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"events": [], "target": "string"}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.post(
    'https://sp-api.omnivery.net/api/v1/{domain}/webhooks',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
    json={"events": [], "target": "string"}
)
print(response.json())
Response

                            
GET /{domain}/webhooks/{id} Retrieve a Webhook

This endpoint is only accessible using a primary API key.

Retrieve a single webhook belonging to the given sending domain.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
Accept header string Yes
domain path string Yes

The sending domain the webhook belongs to.

id path integer Yes

The webhook identifier.

Responses

200

OK

404

Not Found

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
PUT /{domain}/webhooks/{id} Update a Webhook

This endpoint is only accessible using a primary API key.

Update a webhook belonging to the given sending domain. Changing which events a webhook fires on is not supported in place - delete and recreate the webhook instead.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Content-Type header string No
Accept header string Yes
Authorization header string Yes
domain path string Yes

The sending domain the webhook belongs to.

id path integer Yes

The webhook identifier.

Request Body application/json

FieldTypeRequiredDescription
active boolean No

Enable or disable the webhook.

auth_credentials object No

Basic-auth credentials to call the target with.

FieldTypeRequiredDescription
password string No
username string No
events array No

Must match the webhook's existing event; changing events in place is not supported.

name string No

New human-readable name.

target string No

New endpoint URL.

Responses

200

OK

400

Bad Request

404

Not Found

Code Samples

curl -X PUT 'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -d '{"active": false, "auth_credentials": {"password": "string", "username": "string"}, "events": [], "name": "string", "target": "string"}'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("PUT", "https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}', {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
  body: JSON.stringify({"active": false, "auth_credentials": {"password": "string", "username": "string"}, "events": [], "name": "string", "target": "string"})
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"active": false, "auth_credentials": {"password": "string", "username": "string"}, "events": [], "name": "string", "target": "string"}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.put(
    'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
    json={"active": false, "auth_credentials": {"password": "string", "username": "string"}, "events": [], "name": "string", "target": "string"}
)
print(response.json())
Response

                            
DELETE /{domain}/webhooks/{id} Delete a Webhook

This endpoint is only accessible using a primary API key.

Delete a webhook belonging to the given sending domain. Returns 204 No Content on success.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
domain path string Yes

The sending domain the webhook belongs to.

id path integer Yes

The webhook identifier.

Responses

204

No Content

404

Not Found

Code Samples

curl -X DELETE 'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("DELETE", "https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}', {
  method: 'DELETE',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.delete(
    'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
POST /{domain}/webhooks/{id}/validate Validate a Webhook

This endpoint is only accessible using a primary API key.

Validate a webhook by sending a test message to its target URL. An optional message payload may be supplied; otherwise a sample event is generated.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Content-Type header string No
Accept header string Yes
Authorization header string Yes
domain path string Yes

The sending domain the webhook belongs to.

id path integer Yes

The webhook identifier.

Request Body application/json

FieldTypeRequiredDescription
message object No

Optional payload to send. If omitted, a sample event is generated.

Responses

200

OK

404

Not Found

Code Samples

curl -X POST 'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}/validate' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -d '{"message": {}}'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}/validate", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}/validate', {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
  body: JSON.stringify({"message": {}})
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}/validate');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"message": {}}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.post(
    'https://sp-api.omnivery.net/api/v1/{domain}/webhooks/{id}/validate',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
    json={"message": {}}
)
print(response.json())
Response

                            

API Keys

GET /{domain}/api-keys List API Keys

This endpoint is only accessible using a primary API key.

List the API keys (credentials) belonging to the given sending domain. The full key secret is never returned by this endpoint - it is only shown once, at creation time.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
Accept header string Yes
domain path string Yes

The sending domain the API keys belong to.

Responses

200

OK

401

Unauthorized

404

Not Found

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/{domain}/api-keys' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/{domain}/api-keys", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/api-keys', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/api-keys');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/{domain}/api-keys',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
POST /{domain}/api-keys Create an API Key

This endpoint is only accessible using a primary API key.

Create a new API key (credential) scoped to the given sending domain. The response returns the full api_key secret once - store it securely, it cannot be retrieved again.

The grants and valid_ips fields are accepted for wire compatibility with Sparkpost but are not enforced; keys created here are always domain-scoped sending keys.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Content-Type header string No
Accept header string Yes
Authorization header string Yes
domain path string Yes

The sending domain the new API key will be scoped to.

Request Body application/json

FieldTypeRequiredDescription
grants array No

Requested grants. Accepted for Sparkpost compatibility but not enforced.

label string No

Human-readable label for the key (stored as the credential note).

valid_ips array No

Requested IP allow-list. Accepted for Sparkpost compatibility but not enforced.

Responses

200

OK

401

Unauthorized

404

Not Found

Code Samples

curl -X POST 'https://sp-api.omnivery.net/api/v1/{domain}/api-keys' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -d '{"grants": [], "label": "string", "valid_ips": []}'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://sp-api.omnivery.net/api/v1/{domain}/api-keys", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/api-keys', {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
  body: JSON.stringify({"grants": [], "label": "string", "valid_ips": []})
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/api-keys');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"grants": [], "label": "string", "valid_ips": []}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.post(
    'https://sp-api.omnivery.net/api/v1/{domain}/api-keys',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
    json={"grants": [], "label": "string", "valid_ips": []}
)
print(response.json())
Response

                            
GET /{domain}/api-keys/{id} Retrieve an API Key

This endpoint is only accessible using a primary API key.

Retrieve a single API key (credential) belonging to the given sending domain. The key secret is not returned.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
Accept header string Yes
domain path string Yes

The sending domain the API key belongs to.

id path integer Yes

The API key identifier.

Responses

200

OK

404

Not Found

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
DELETE /{domain}/api-keys/{id} Delete an API Key

This endpoint is only accessible using a primary API key.

Delete an API key (credential) belonging to the given sending domain. Returns 204 No Content on success.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as a result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
domain path string Yes

The sending domain the API key belongs to.

id path integer Yes

The API key identifier.

Responses

204

No Content

404

Not Found

Code Samples

curl -X DELETE 'https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("DELETE", "https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}', {
  method: 'DELETE',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.delete(
    'https://sp-api.omnivery.net/api/v1/{domain}/api-keys/{id}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            

Recipient Validation

POST /recipient-validation/single/{address} Email Address Validation

Runs a given address through a series of checks that catch many common problems, including syntax issues and non-existent mailboxes.

To perform email validation your sending domain must have email validation enabled and you must use your sending domain's API credentials not the account level credentials.

Responses

200

OK

Code Samples

curl -X POST 'https://sp-api.omnivery.net/api/v1/recipient-validation/single/{address}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("POST", "https://sp-api.omnivery.net/api/v1/recipient-validation/single/{address}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/recipient-validation/single/{address}', {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/recipient-validation/single/{address}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.post(
    'https://sp-api.omnivery.net/api/v1/recipient-validation/single/{address}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            

Suppression List

GET /{domain}/suppression-list Search for List Entries

This endpoint is only accessible using a primary API key.

Perform a filtered search for entries in your domain-specific exclusion list.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
Accept header string Yes
domain path string Yes
from query string No

Filter results by date starting from

to query string No

Filter results by date ending at

per_page query number No

Output record limit

page query number No

Result page

sources query string No

Sources (one of Spam Complaint, List Unsubscribe, Bounce Rule, Unsubscribe Link, Manually Added, Compliance)

Responses

200

OK

400

Bad Request

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/{domain}/suppression-list", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
PUT /{domain}/suppression-list Insert or Update List Entries

This endpoint is only accessible using a primary API key.

Bulk insert entries to the domain-specific exclusion list by providing a JSON object, with a "recipients" key containing an array of recipients to insert or update, as the PUT request body. Maximum size of the JSON object is 10mb. At a minimum, each recipient must have a valid "email" address in recipient field. The optional "description" key can be used to include an explanation of what type of message should be suppressed.

If the type field is used with value transactional the record will be added to the "block" suppressions, otherwise the "unsubscribe" suppression will be used.

If an email address is duplicated in a single request, only the first instance will be processed.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Content-Type header string No
Accept header string Yes
Authorization header string Yes
domain path string Yes

Request Body application/json

FieldTypeRequiredDescription
recipients array Yes
FieldTypeRequiredDescription
description string Yes
recipient string Yes
type string No

Responses

200

OK

Code Samples

curl -X PUT 'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -d '{"recipients": []}'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("PUT", "https://sp-api.omnivery.net/api/v1/{domain}/suppression-list", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list', {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
  body: JSON.stringify({"recipients": []})
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"recipients": []}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.put(
    'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
    json={"recipients": []}
)
print(response.json())
Response

                            
GET /{domain}/suppression-list/{recipient} Retrieve a Recipient Suppression Status

This endpoint is only accessible using a primary API key.

Retrieve the suppression status for a specific recipient by specifying the recipient’s email address in the URI path.

If the recipient is not in the domain-specific exclusion list, an HTTP status of 404 is returned. If the recipient is in the list, an HTTP status of 200 is returned with the full suppression status in the response body.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
Accept header string Yes
domain path string Yes
recipient path string Yes

Responses

200

OK

Code Samples

curl -X GET 'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}', {
  method: 'GET',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.get(
    'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response

                            
DELETE /{domain}/suppression-list/{recipient} Delete a List Entry

This endpoint is only accessible using a primary API key.

Delete a recipient from the list by specifying the recipient's email address in the URI path.

If the recipient is not in the domain-specific exclusion list, an HTTP status of 404 is returned. If the recipient is in the list, an HTTP status of 204 is returned indicating a successful deletion.

Due to differences in architecture this endpoint requires the domain to be passed in the URL and as result its URL is not identical to that used by Sparkpost. Make sure your API library reflects this change.

Parameters

NameInTypeRequiredDescription
Authorization header string Yes
Accept header string Yes
domain path string Yes
recipient path string Yes
recipient query string No

Recipient email address

Request Body application/json

Responses

204

No Content

404

Not Found

Code Samples

curl -X DELETE 'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: YOUR_API_KEY'
package main

import (
    "fmt"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("DELETE", "https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}", nil)
    req.Header.Set("Authorization", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    fmt.Println(resp.Status)
}
const response = await fetch('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}', {
  method: 'DELETE',
  headers: {'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
});
const data = await response.json();
<?php
$ch = curl_init('https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: YOUR_API_KEY']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import requests

response = requests.delete(
    'https://sp-api.omnivery.net/api/v1/{domain}/suppression-list/{recipient}',
    headers={'Content-Type': 'application/json', 'Authorization': 'YOUR_API_KEY'},
)
print(response.json())
Response