{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cooperemail-com/json-schema/cooperemail-com-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cooperemail-com-openapi.yml#/components/schemas/Me",
  "type": "object",
  "properties": {
    "account_id": {
      "type": "string"
    },
    "parent_account_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "auth_type": {
      "type": "string",
      "enum": [
        "api_key",
        "oauth"
      ]
    },
    "key": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "prefix": {
          "type": "string"
        },
        "inbox_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "permissions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string",
            "enum": [
              "inbox_read",
              "inbox_create",
              "inbox_update",
              "inbox_delete",
              "message_read",
              "message_send",
              "message_update",
              "message_delete",
              "draft_write",
              "draft_send",
              "webhook_read",
              "webhook_write",
              "domain_read",
              "domain_write",
              "list_read",
              "list_write",
              "owner_manage",
              "task_read",
              "task_reply",
              "key_read",
              "key_write",
              "workspace_manage",
              "billing_read",
              "billing_write"
            ]
          },
          "description": "Null means full access."
        },
        "expires_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "workspace": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "inbox_quota": {
          "type": "integer"
        }
      },
      "required": [
        "id",
        "inbox_quota"
      ]
    },
    "lifecycle_emails": {
      "type": "string",
      "enum": [
        "on",
        "off"
      ],
      "description": "on stores the weekly product note. off stops it. The default is on."
    },
    "notices": {
      "type": "array",
      "description": "Present when usage is at 80 percent of inboxes, monthly sends, or custom domains. Empty when it is not.",
      "items": {
        "$ref": "#/$defs/LimitNotice"
      }
    },
    "whats_new": {
      "type": "array",
      "description": "Newest two or three user-facing changelog highlights.",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "date",
          "title",
          "url"
        ]
      }
    },
    "owner_recommended": {
      "type": "string",
      "description": "Present when the account has no verified owner. Suggests POST /api/v1/inboxes/{id}/owners or owner_email on onboard, and mentions the 50 percent Free send increase for a verified external owner."
    },
    "sending": {
      "$ref": "#/$defs/SendingStatus"
    }
  },
  "required": [
    "account_id",
    "parent_account_id",
    "auth_type",
    "key",
    "workspace",
    "sending"
  ],
  "$defs": {
    "LimitNotice": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "limit_warning"
          ]
        },
        "resource": {
          "type": "string",
          "enum": [
            "inboxes",
            "emails",
            "custom_domains"
          ]
        },
        "used": {
          "type": "integer"
        },
        "limit": {
          "type": "integer"
        },
        "upgrade_url": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "resource",
        "used",
        "limit",
        "upgrade_url"
      ]
    },
    "SendingStatus": {
      "type": "object",
      "description": "Trailing 7-day send health for this account. Counts match GET /api/v1/metrics/rates with no inbox id. Warning does not block. Paused blocks agent email until the rate recovers.",
      "properties": {
        "object": {
          "type": "string",
          "enum": [
            "sending_status"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "warning",
            "paused"
          ]
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "bounce_rate",
            "complaint_rate",
            null
          ]
        },
        "window_days": {
          "type": "integer",
          "enum": [
            7
          ]
        },
        "sent": {
          "type": "integer"
        },
        "bounced": {
          "type": "integer"
        },
        "complained": {
          "type": "integer"
        },
        "bounce_rate": {
          "type": "number"
        },
        "complaint_rate": {
          "type": "number"
        },
        "thresholds": {
          "type": "object",
          "properties": {
            "min_sent": {
              "type": "integer"
            },
            "warning_bounce_rate": {
              "type": "number"
            },
            "warning_complaint_rate": {
              "type": "number"
            },
            "pause_bounce_rate": {
              "type": "number"
            },
            "pause_min_bounced": {
              "type": "integer"
            },
            "pause_complaint_rate": {
              "type": "number"
            },
            "pause_min_complained": {
              "type": "integer"
            }
          },
          "required": [
            "min_sent",
            "warning_bounce_rate",
            "warning_complaint_rate",
            "pause_bounce_rate",
            "pause_min_bounced",
            "pause_complaint_rate",
            "pause_min_complained"
          ]
        },
        "paused_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "evaluated_at": {
          "type": "string",
          "format": "date-time"
        },
        "resumes": {
          "type": "string"
        }
      },
      "required": [
        "object",
        "status",
        "reason",
        "window_days",
        "sent",
        "bounced",
        "complained",
        "bounce_rate",
        "complaint_rate",
        "thresholds",
        "paused_at",
        "evaluated_at",
        "resumes"
      ]
    }
  }
}