{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentisend-com/json-schema/agentisend-com-post-api-keys-body-schema.json",
  "title": "PostApi_keysBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentisend-com-api-keys-api-openapi.yml#/components/schemas/PostApi_keysBody",
  "properties": {
    "domain_scope": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Limit the key to one domain on this account, by its id or its name. Same as domain_id. Omit it to allow every domain."
    },
    "loop_guard": {
      "description": "off watches nothing. repetition-only watches near-identical sends. full also watches recipient collapse. Omit it and transactional sends use repetition-only; a marketing send on a key with no setting still uses full.",
      "enum": [
        "off",
        "repetition-only",
        "full"
      ],
      "type": "string"
    },
    "name": {
      "description": "A name you will recognise in the key list.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "permission": {
      "description": "full_access can manage the account. sending_access can send. Omit it and the key is full_access.",
      "enum": [
        "full_access",
        "sending_access"
      ],
      "type": "string"
    },
    "scopes": {
      "description": "Narrow what the key can call. Omit it and the permission decides.",
      "items": {
        "enum": [
          "emails:send",
          "emails:read",
          "domains:read",
          "domains:write",
          "webhooks:read",
          "webhooks:write",
          "limits:read",
          "limits:write",
          "trust:read",
          "contacts:read",
          "contacts:write",
          "suppressions:read",
          "suppressions:write",
          "templates:read",
          "templates:write",
          "segments:read",
          "segments:write",
          "topics:read",
          "topics:write",
          "inbound:read"
        ],
        "type": "string"
      },
      "maxItems": 20,
      "type": "array"
    }
  },
  "required": [
    "name",
    "permission"
  ],
  "type": "object"
}