Skip to content

Developer tools

Test the Qelka API in Postman

Import the Qelka OpenAPI document into Postman, set Bearer auth once on the collection, keep test and live keys in vault-backed environments and add response tests.

Updated 2026-11-26

This guide sets up Postman to explore and test the Qelka API: a collection generated from the OpenAPI document, one place for authentication, a test and a live environment whose keys stay in your vault, and a script that checks every response. There is no Qelka integration to install in Postman: everything comes from the public OpenAPI document at https://api.qelka.com/v1/openapi.json.

The document is OpenAPI 3.1, describes every endpoint under https://api.qelka.com/v1, and declares bearer authentication with your API key, so Postman can build working requests from it.

What you need

  • The Postman app. Some features on this page depend on your Postman plan; the Local Vault used here is available on all plans, according to Postman.
  • A Qelka test key and, when you are ready, a live key. A sk_test_ key returns simulated, fixed answers and never spends credits: see Test mode.
  • For the live environment, consider a restricted key with only the endpoints you explore. See restricted keys.

Steps

1. Import the OpenAPI document

In your workspace, click Use resources or import, select the Import tab and paste the document's URL:

https://api.qelka.com/v1/openapi.json

Choose how to import it:

  • Postman Collection creates a collection with folders, requests and response examples.
  • Specification with a Postman Collection also adds the document to Spec Hub, so you can update the collection when the API changes.

Before you confirm, open View Import Settings. The options vary with the document; when they are offered, group folders by Tags to get one folder per product, and turn on Always inherit authentication so every request uses the collection's auth. Then click Import.

The importer stores the server URL from the document, https://api.qelka.com/v1, for the requests to use. Test and live keys call the same base URL, so the environments below only need to differ by key.

2. Create a test and a live environment

Click + in the sidebar and select Environments. Name it after the mode, such as "test", and add a variable api-key with your sk_test_ key as its value. Then click Secure next to the variable name and choose Local Vault: Postman moves the value into your vault, and the variable only references it. If you have not used the vault yet, set it up first with your vault key.

Create a second environment, "live", with the same variable name and your live key, secured the same way. Switch between them with the environment selector at the top right of the workbench.

Variable values are local by default. Do not click Share on api-key: sharing syncs the value to your team and to Postman's cloud.

3. Set Bearer auth on the collection

Open the collection and its Authorization tab. Set the auth type to Bearer Token and the token to:

{{api-key}}

Postman sends Authorization: Bearer followed by the key of the active environment. If the importer already set Bearer auth with its own variable, replace that variable with api-key. Requests whose auth inherits from the collection pick it up. If you could not turn on Always inherit authentication in step 1, set each request's auth to inherit from its parent.

4. Send a first request

Select the "test" environment and open the request for POST /email. Set the body to:

json
{
  "email": "disposable@example.com",
  "mode": "fast"
}

Click Send. With a test key, the answer is fixed: status is risky, reason is disposable and credits_used is 0. Try undeliverable@example.com with "mode": "full" for an undeliverable answer, or 198.51.100.200 on POST /ip for an address flagged as Tor. Test mode lists every test input.

mode: "fast" runs the syntax, DNS and list checks and skips the mailbox check, so it answers faster. Use full when you need to know whether the mailbox exists.

5. Add a test script to the collection

Open the collection, then Scripts and Post-response, and paste this script. It runs after every request in the collection:

Post-response
const requestId = pm.response.headers.get('X-Request-Id')
const body = pm.response.json()

if (body.error) {
  console.log(`${body.error.type}: ${body.error.message} (request ${requestId})`)
}

pm.test('answers 200', function () {
  pm.response.to.have.status(200)
})

pm.test('returns a documented status', function () {
  const statuses = {
    email: ['deliverable', 'undeliverable', 'risky', 'unknown'],
    phone: ['valid', 'invalid', 'unknown'],
  }
  const endpoint = pm.request.url.getPath().split('/').pop()
  if (statuses[endpoint]) pm.expect(statuses[endpoint]).to.include(body.status)
})

Results appear in the response's Test Results tab. When the API refuses a request, the Postman Console shows the error type and the X-Request-Id, which is what to send to support. GET /account has no status field, so the second test skips it.

6. Run the collection

Use the Collection Runner to send a folder or the whole collection with the "test" environment. To run the same checks in CI, export the collection and the environment, then run them with the Postman CLI. A secured variable's value stays in your vault and is not in the export, so pass the key at run time:

Terminal
postman collection run qelka.postman_collection.json \
  -e test.postman_environment.json \
  --env-var "api-key=$QELKA_API_KEY" \
  --timeout-request 15000 \
  --bail

--timeout-request sets a timeout in milliseconds on each request, and --bail stops at the first failure. In CI, read QELKA_API_KEY from your secret store, with a test key so runs cost nothing. See the GitHub Actions integration.

Read the results

Endpoint status What to do in your app
POST /email deliverable Accept the address
POST /email undeliverable Reject it, and show did_you_mean when there is one
POST /email risky Disposable, catch-all or full mailbox: flag or review it
POST /email unknown Not conclusive: accept it and check again later
POST /phone valid Store e164
POST /phone invalid Ask for the number again
POST /phone unknown Send it again with country

Each field is described in the email reference, the phone reference and the IP reference.

Handle errors and rate limits

Every error has the same body, { "error": { "type", "message", "docs" } }, and nothing is billed on errors.

HTTP status error.type In Postman, it usually means
401 invalid_api_key No environment selected, an empty api-key, or a revoked key
403 forbidden A restricted key calling an endpoint outside its list, or a test key on POST /bulk
400 invalid_request The body is not valid JSON, or a field is missing
422 unprocessable_input The value cannot be checked, such as a private IP address
429 rate_limited Too many requests: wait the seconds in Retry-After

A key allows 200 requests per 10 seconds, and test keys count toward the same organization window as live keys. When you run a large folder in the Collection Runner, add a delay between requests. See Errors and Rate limits.

Frequently asked questions

Is there an official Qelka collection in Postman?
You may find a public Qelka API collection by searching Postman's API Network. Importing the OpenAPI document yourself, as this guide does, gives you a collection generated from the current version of the API, and you can regenerate it when the API changes. Both send the same requests.
Will my API key be synced to Postman's cloud?
Not with the setup below. Variable values in Postman are local unless you share them, and securing a variable moves its value into your Postman Local Vault, which stays on your machine. A shared vault exists for teams on paid Postman plans, as far as we know: check your plan before relying on it.
Do requests from Postman cost credits?
With a sk_test_ key, no: every answer is simulated and credits_used is 0. With a live key, each request costs the same as from your code, for example 1 credit per email check, and GET /account is free. Errors are never billed.

More in Developer tools

All integrations

Put this check in your product

Get an API key in under a minute. 100 free credits every month, no card required.

  • 100 free credits a month
  • No card
  • Test keys spend nothing
  • Cancel any time