object token
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "userId",
    "secret",
    "expire",
    "phrase"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "bb8ea5c16897e",
      "description": "Token ID."
    },
    "expire": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Token expiration date in ISO 8601 format."
    },
    "phrase": {
      "type": "string",
      "x-example": "Golden Fox",
      "description": "Security phrase of a token. Empty if security phrase was not requested when creating a token. It includes randomly generated phrase which is also sent in the external resource such as email."
    },
    "secret": {
      "type": "string",
      "x-example": "",
      "description": "Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload."
    },
    "userId": {
      "type": "string",
      "x-example": "5e5ea5c168bb8",
      "description": "User ID."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Token creation date in ISO 8601 format."
    }
  },
  "description": "Token"
}
object topic
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "name",
    "emailTotal",
    "smsTotal",
    "pushTotal",
    "subscribe"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "259125845563242502",
      "description": "Topic ID."
    },
    "name": {
      "type": "string",
      "x-example": "events",
      "description": "The name of the topic."
    },
    "smsTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 100,
      "description": "Total count of SMS subscribers subscribed to the topic."
    },
    "pushTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 100,
      "description": "Total count of push subscribers subscribed to the topic."
    },
    "subscribe": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": "users",
      "description": "Subscribe permissions."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Topic creation time in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Topic update date in ISO 8601 format."
    },
    "emailTotal": {
      "type": "integer",
      "format": "int32",
      "x-example": 100,
      "description": "Total count of email subscribers subscribed to the topic."
    }
  },
  "description": "Topic"
}
object topicList
{
  "type": "object",
  "required": [
    "total",
    "topics"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of topics documents that matched your query."
    },
    "topics": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/topic"
      },
      "x-example": "",
      "description": "List of topics."
    }
  },
  "description": "Topic list"
}
object user
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "name",
    "registration",
    "status",
    "labels",
    "passwordUpdate",
    "email",
    "phone",
    "emailVerification",
    "phoneVerification",
    "mfa",
    "prefs",
    "targets",
    "accessedAt"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "User ID."
    },
    "mfa": {
      "type": "boolean",
      "x-example": true,
      "description": "Multi factor authentication status."
    },
    "hash": {
      "type": "string",
      "nullable": true,
      "x-example": "argon2",
      "description": "Password hashing algorithm."
    },
    "name": {
      "type": "string",
      "x-example": "John Doe",
      "description": "User name."
    },
    "email": {
      "type": "string",
      "x-example": "john@appwrite.io",
      "description": "User email address."
    },
    "phone": {
      "type": "string",
      "x-example": "+4930901820",
      "description": "User phone number in E.164 format."
    },
    "prefs": {
      "type": "object",
      "items": {
        "$ref": "#/components/schemas/preferences"
      },
      "x-example": {
        "theme": "pink",
        "timezone": "UTC"
      },
      "description": "User preferences as a key-value object"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-example": [
        "vip"
      ],
      "description": "Labels for the user."
    },
    "status": {
      "type": "boolean",
      "x-example": true,
      "description": "User status. Pass `true` for enabled and `false` for disabled."
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/target"
      },
      "x-example": [],
      "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider."
    },
    "password": {
      "type": "string",
      "nullable": true,
      "x-example": "$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE",
      "description": "Hashed user password."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "User creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "User update date in ISO 8601 format."
    },
    "accessedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours."
    },
    "hashOptions": {
      "type": "object",
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/algoArgon2"
          },
          {
            "$ref": "#/components/schemas/algoScrypt"
          },
          {
            "$ref": "#/components/schemas/algoScryptModified"
          },
          {
            "$ref": "#/components/schemas/algoBcrypt"
          },
          {
            "$ref": "#/components/schemas/algoPhpass"
          },
          {
            "$ref": "#/components/schemas/algoSha"
          },
          {
            "$ref": "#/components/schemas/algoMd5"
          }
        ]
      },
      "nullable": true,
      "x-example": {},
      "description": "Password hashing algorithm configuration."
    },
    "registration": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "User registration date in ISO 8601 format."
    },
    "passwordUpdate": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Password update time in ISO 8601 format."
    },
    "emailVerification": {
      "type": "boolean",
      "x-example": true,
      "description": "Email verification status."
    },
    "phoneVerification": {
      "type": "boolean",
      "x-example": true,
      "description": "Phone verification status."
    }
  },
  "description": "User"
}
object userList
{
  "type": "object",
  "required": [
    "total",
    "users"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of users documents that matched your query."
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/user"
      },
      "x-example": "",
      "description": "List of users."
    }
  },
  "description": "Users List"
}
object variable
{
  "type": "object",
  "required": [
    "$id",
    "$createdAt",
    "$updatedAt",
    "key",
    "value",
    "resourceType",
    "resourceId"
  ],
  "properties": {
    "$id": {
      "type": "string",
      "x-example": "5e5ea5c16897e",
      "description": "Variable ID."
    },
    "key": {
      "type": "string",
      "x-example": "API_KEY",
      "description": "Variable key."
    },
    "value": {
      "type": "string",
      "x-example": "myPa$$word1",
      "description": "Variable value."
    },
    "$createdAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Variable creation date in ISO 8601 format."
    },
    "$updatedAt": {
      "type": "string",
      "x-example": "2020-10-15T06:38:00.000+00:00",
      "description": "Variable creation date in ISO 8601 format."
    },
    "resourceId": {
      "type": "string",
      "x-example": "myAwesomeFunction",
      "description": "ID of resource to which the variable belongs. If resourceType is \"project\", it is empty. If resourceType is \"function\", it is ID of the function."
    },
    "resourceType": {
      "type": "string",
      "x-example": "function",
      "description": "Service to which the variable belongs. Possible values are \"project\", \"function\""
    }
  },
  "description": "Variable"
}
object variableList
{
  "type": "object",
  "required": [
    "total",
    "variables"
  ],
  "properties": {
    "total": {
      "type": "integer",
      "format": "int32",
      "x-example": 5,
      "description": "Total number of variables documents that matched your query."
    },
    "variables": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/variable"
      },
      "x-example": "",
      "description": "List of variables."
    }
  },
  "description": "Variables List"
}