Testmail · Example Payload

Graphql Livequery

Example of a live GraphQL query that waits for a new email matching specific criteria before returning. The server holds the connection until an email arrives or 60 seconds elapses (then returns HTTP 307).

Email TestingDeveloper ToolsAPI TestingGraphQLREST APICI/CDQA AutomationProgrammable Inboxes

Graphql Livequery is an example object payload from Testmail, with 5 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

titledescriptionrequestlivequery_behaviorresponse_on_match

Example Payload

Raw ↑
{
  "title": "GraphQL API - Live query waiting for new email",
  "description": "Example of a live GraphQL query that waits for a new email matching specific criteria before returning. The server holds the connection until an email arrives or 60 seconds elapses (then returns HTTP 307).",
  "request": {
    "method": "POST",
    "url": "https://api.testmail.app/api/graphql",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    "body": {
      "query": "query { inbox(namespace: \"mynamespace\", tag: \"signup-testuser999\", livequery: true) { result count emails { from subject text timestamp } } }"
    }
  },
  "livequery_behavior": {
    "description": "The server holds the request open until a matching email arrives or 60 seconds pass.",
    "on_email_received": "Returns 200 with the matching email immediately.",
    "on_timeout": "Returns HTTP 307 redirect to the same URL. The client must follow redirects and resend the request."
  },
  "response_on_match": {
    "status": 200,
    "body": {
      "data": {
        "inbox": {
          "result": "success",
          "count": 1,
          "emails": [
            {
              "from": "no-reply@myapp.com",
              "subject": "Welcome! Please complete your signup.",
              "text": "Thank you for signing up. Please confirm your account.",
              "timestamp": 1686010000000.0
            }
          ]
        }
      }
    }
  }
}

Work with this as data

Every example 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 examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • 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 example
curl "https://apis.io/api/v1/examples/graphql-livequery"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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