External API docs

Create deny rules

Block specific emails or phone numbers from appearing in your Openmart enrichment results.

Overview

Use this endpoint to add deny rules scoped to your API key. Any contact whose email or phone number matches one of your rules will be suppressed from future enrichment output, across:

  • find decision makers (find_people)
  • enrich known people (lookup_people)
  • find company emails (lookup_business_email)

Duplicate values are ignored, so you can safely send the same request again.

Before you start

Make sure you have:

  • an Openmart account
  • an API key
  • a tool to send API requests, such as Postman or curl

Authentication. We recommend sending your API key as Authorization: Bearer <your_api_key>. If your current integration already uses X-API-Key: <your_api_key>, it will continue to work.

Deny rules belong to the team connected to your API key, so they only affect that team's enrichment requests.

1

Example: Block two email addresses

Endpoint
POST https://api.openmart.ai/api/v2/deny-rules

Parameters

Parameter
type
Type
string (enum)
Required
Yes
Example
"email"
Description
Identifier kind. Must be exactly "email" or "phone"; any other value returns 400 detail:"Type must be one of [email phone]".
Parameter
values
Type
array[string]
Required
Yes
Example
["blocked@example.com"]
Description
Literal identifiers to add, remove, or check. Emails are matched case-insensitively at lookup time. Phones should be E.164 formatted.

cURL request

cURL
curl --request POST \
  --url https://api.openmart.ai/api/v2/deny-rules \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "email",
    "values": ["blocked@example.com", "spam@example.com"]
  }'

Response example

JSON
{
  "status": "success"
}

Key elements of the API response

Response element
status
Description
Always "success" on HTTP 200. Failures come back with a non-2xx status and a "detail" field instead of this envelope.

All request parameters

Request body for POST /api/v2/deny-rules. Both fields are required.

Request body

All three deny-rules endpoints (create, delete, check) share the same body shape.

typestring (enum)Required: Yes
Example: "email"

Identifier kind. Allowed values are "email" and "phone". Other values return HTTP 400 with {"detail":"Type must be one of [email phone]"}.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v2/deny-rules \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"type":"email","values":["blocked@example.com"]}'
valuesarray[string]Required: Yes
Example: ["blocked@example.com","spam@example.com"]

One or more exact identifiers. Wildcards are not supported. Rules only affect the team connected to your API key.

cURL example
cURL
curl --request POST \
  --url https://api.openmart.ai/api/v2/deny-rules \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"type":"email","values":["blocked@example.com","spam@example.com"]}'

If this request fails

Match the error number or message in the response, then use the action below.

Error 400 / 422“... is required” or another field error
Read the error or detail field, then fix the named input.
Error 401“Invalid API Key”
Check the complete key and authentication header.
Error 402“Credit limit reached”
Check the team balance before trying again.
Error 403“Forbidden” or “not allowed”
Check whether this key and account can use the action.
Error 404“Not Found”
Check the API address, version, and GET, POST, or DELETE method.
Error 429“Too many requests”
Wait, then retry with fewer requests running at once.
Error 500–504Server error or timeout
Wait briefly and retry. Avoid duplicating an async job.

See Troubleshooting & FAQ for step-by-step help and the information to include when asking for support.