{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentline-nz/json-schema/agentline-nz-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/agentline-nz-api-openapi.json#/components/schemas/Me",
  "type": "object",
  "required": [
    "accountId",
    "plan",
    "status",
    "createdBy",
    "ownerVerified",
    "sendingRestriction",
    "inboxes",
    "trial",
    "usageThisMonth"
  ],
  "properties": {
    "accountId": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "createdBy": {
      "type": "string",
      "enum": [
        "human",
        "agent"
      ]
    },
    "ownerVerified": {
      "type": "boolean"
    },
    "sendingRestriction": {
      "type": [
        "string",
        "null"
      ],
      "description": "Set while the account can only send to the owner's verified contacts."
    },
    "inboxes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Inbox"
      }
    },
    "texting": {
      "type": "string",
      "enum": [
        "none",
        "pending",
        "has_number"
      ],
      "description": "Texting is coming soon. Values other than none appear only on legacy accounts."
    },
    "trial": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "object",
          "required": [
            "endsAt",
            "limits"
          ],
          "properties": {
            "endsAt": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "limits": {
              "type": "string"
            },
            "smsSegmentsUsed": {
              "type": "integer"
            },
            "smsSegmentsIncluded": {
              "type": "integer"
            }
          }
        }
      ]
    },
    "numbers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Number"
      }
    },
    "numbersPending": {
      "type": "integer"
    },
    "numberPendingSince": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "usageThisMonth": {
      "type": "object",
      "required": [
        "emailsSent",
        "emailsIncluded"
      ],
      "properties": {
        "smsSent": {
          "type": "integer"
        },
        "smsIncluded": {
          "type": "integer"
        },
        "emailsSent": {
          "type": "integer"
        },
        "emailsIncluded": {
          "type": "integer"
        },
        "voiceMinutes": {
          "type": "integer"
        },
        "voiceMinutesIncluded": {
          "type": "integer"
        }
      }
    }
  },
  "$defs": {
    "Inbox": {
      "type": "object",
      "required": [
        "id",
        "address",
        "status",
        "graceUntil"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "format": "email"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "grace",
            "released"
          ]
        },
        "graceUntil": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "Number": {
      "type": "object",
      "required": [
        "id",
        "number",
        "status",
        "capabilities",
        "voiceMode",
        "graceUntil",
        "test"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "number": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "grace",
            "released"
          ]
        },
        "capabilities": {
          "type": "object",
          "required": [
            "sms",
            "voice"
          ],
          "properties": {
            "sms": {
              "type": "boolean"
            },
            "voice": {
              "type": "boolean"
            }
          }
        },
        "voiceMode": {
          "type": "string",
          "enum": [
            "message",
            "forward_phone",
            "forward_sip",
            "stream"
          ]
        },
        "graceUntil": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "test": {
          "type": "boolean"
        }
      }
    }
  }
}