Maton

Query Context

POST/context/graphql

Authorization

bearerAuth
AuthorizationBearer <token>

Your Maton API key, sent as Authorization: Bearer <MATON_API_KEY>. Create one at https://maton.ai/settings.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.maton.ai/context/graphql" \  -H "Authorization: Bearer $MATON_API_KEY" \  -H "Content-Type: application/json" \  -d '{"query": "query { googleMailMessages(first: 10, filter: {updatedAt: {gte: \"-P7D\"}}) { nodes { id tags from { id } thread { id } } pageInfo { hasNextPage endCursor } } }"}'
{
  "data": {
    "googleMailMessages": {
      "nodes": [
        {
          "id": "google-mail/users/108641645043969737325/messages/1a1f2fcfdb9eb240",
          "tags": [
            "needs-reply"
          ],
          "from": {
            "id": "google-mail/mailto/ada@example.com"
          },
          "thread": {
            "id": "google-mail/users/108641645043969737325/threads/1a1f2fcfdb9eb240"
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "WyJnb29nbGVNYWlsTWVzc2FnZXM6Y3JlYXRlZEF0OkRFU0MiLC..."
      }
    }
  }
}
{
  "error": {
    "message": "You did not set the Authorization header. You need to provide your API key in the Authorization header using Bearer scheme (e.g. `Authorization: Bearer <api_key>`).",
    "code": 401
  }
}
{
  "error": {
    "message": "Request body too large.",
    "code": 413
  }
}
{
  "error": {
    "message": "Rate limit of 10 requests per second per account exceeded. Retry after 1 second.",
    "code": 429
  }
}
{
  "error": {
    "message": "Internal server error occurred. Please try again later.",
    "code": 500
  }
}