samva-dev · Schema

ApiKeyAccess

CompanyEmailSoftware-as-a-ServiceDevelopers
View JSON Schema on GitHub

JSON Schema

samva-dev-api-key-access-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/samva-dev/json-schema/samva-dev-api-key-access-schema.json",
  "title": "ApiKeyAccess",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/samva-dev-api-keys-api-openapi.yml#/components/schemas/ApiKeyAccess",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "full"
          ]
        }
      },
      "required": [
        "mode"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "restricted"
          ]
        },
        "resources": {
          "$ref": "#/$defs/ApiKeyResourceAccess"
        },
        "mailboxes": {
          "anyOf": [
            {
              "$ref": "#/$defs/ApiKeyMailboxAccess"
            },
            {
              "type": "null"
            }
          ]
        },
        "namespaceId": {
          "anyOf": [
            {
              "$ref": "#/$defs/NamespaceId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Confines the key to one namespace: it reaches only that namespace's domains, senders, numbers, mailboxes, contacts, templates, and messages, never organization-level ones, and only endpoints that confine to a namespace (others answer 403). It holds grants only on `mailboxes`, `messages`, `email`, `domains`, `contacts`, and `templates`. A key scoped to listed mailboxes holds mailbox access only."
        }
      },
      "required": [
        "mode",
        "resources"
      ],
      "additionalProperties": false
    }
  ],
  "$defs": {
    "ApiKeyMailboxAccess": {
      "type": "object",
      "properties": {
        "permissions": {
          "type": "array",
          "prefixItems": [
            {
              "type": "string",
              "enum": [
                "read",
                "update",
                "send",
                "quarantine.read"
              ]
            }
          ],
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "read",
              "update",
              "send",
              "quarantine.read"
            ]
          },
          "description": "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `quarantine.read` reads quarantined mail."
        },
        "mailboxIds": {
          "anyOf": [
            {
              "type": "array",
              "prefixItems": [
                {
                  "$ref": "#/$defs/MailboxId"
                }
              ],
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/MailboxId"
              }
            },
            {
              "type": "null"
            }
          ],
          "description": "The mailboxes the key may act on. Omit to reach every mailbox the owner can."
        },
        "sendMode": {
          "anyOf": [
            {
              "$ref": "#/$defs/MailboxSendMode"
            },
            {
              "type": "null"
            }
          ],
          "description": "Defaults to `send`. With `approval`, each send waits until a person other than the key approves it."
        }
      },
      "required": [
        "permissions"
      ],
      "additionalProperties": false
    },
    "ApiKeyResourceAccess": {
      "type": "object",
      "properties": {
        "messages": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "email": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "domains": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "phoneNumbers": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "contacts": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "conversations": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "templates": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "agents": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "webhooks": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "apiKeys": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "organization": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "billing": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "analytics": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "read",
                "write"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "MailboxId": {
      "type": "string",
      "pattern": "^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
      "x-samva-brand": "MailboxId"
    },
    "MailboxSendMode": {
      "type": "string",
      "enum": [
        "send",
        "approval"
      ],
      "description": "How the grantee's sends execute: `send` runs them within account limits; `approval` holds each one until a different member approves it."
    },
    "NamespaceId": {
      "type": "string",
      "pattern": "^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
      "x-samva-brand": "NamespaceId"
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/samva-dev-api-key-access"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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