object TokenGenerateAccessRequest
{
  "type": "object",
  "required": [
    "code",
    "grant_type",
    "redirect_uri"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "A unique random code that Notion generates to authenticate with your service, generated when a user initiates the OAuth flow."
    },
    "grant_type": {
      "type": "string",
      "default": "\"authorization_code\"",
      "description": "A constant string: \"authorization_code\"."
    },
    "redirect_uri": {
      "type": "string",
      "description": "The `\"redirect_uri\"` that was provided in the OAuth Domain & URI section of the integration's Authorization settings. Do not include this field if a `\"redirect_uri\"` query param was not included in the Authorization URL provided to users. In most cases, this field is required."
    },
    "external_account": {
      "type": "object",
      "properties": {},
      "description": "Required if and only when building [Link Preview](https://developers.notion.com/docs/link-previews) integrations (otherwise ignored). An object with `key` and `name` properties. `key` should be a unique identifier for the account. Notion uses the `key` to determine whether or not the user is re-connecting the same account. `name` should be some way for the user to know which account they used to authenticate with your service. If a user has authenticated Notion with your integration before and `key` is the same but `name` is different, then Notion updates the `name` associated with your integration."
    }
  }
}
object TokenGenerateAccessResponse
{
  "type": "object",
  "properties": {
    "owner": {
      "type": "object",
      "properties": {
        "workspace": {
          "type": "boolean",
          "default": true,
          "example": true
        }
      }
    },
    "bot_id": {
      "type": "string",
      "example": "b3414d659-1224-5ty7-6ffr-cc9d8773drt601288f"
    },
    "access_token": {
      "type": "string",
      "example": "e202e8c9-0990-40af-855f-ff8f872b1ec6c"
    },
    "workspace_id": {
      "type": "string",
      "example": "j565j4d7x3-2882-61bs-564a-jj9d9ui-c36hxfr7x"
    },
    "workspace_icon": {
      "type": "string",
      "example": "https://website.domain/images/image.png"
    },
    "workspace_name": {
      "type": "string",
      "example": "Ada's Notion Workspace"
    },
    "duplicated_template_id": {}
  }
}
object UserGetTokenBotUser400Response
{
  "type": "object",
  "properties": {}
}
object UserGetTokenBotUserResponse
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "example": "16d84278-ab0e-484c-9bdd-b35da3bd8905"
    },
    "bot": {
      "type": "object",
      "properties": {
        "owner": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "example": "user"
            },
            "user": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "5389a034-eb5c-47b5-8a9e-f79c99ef166c"
                },
                "name": {
                  "type": "string",
                  "example": "christine makenotion"
                },
                "type": {
                  "type": "string",
                  "example": "person"
                },
                "object": {
                  "type": "string",
                  "example": "user"
                },
                "person": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": "string",
                      "example": "christine@makenotion.com"
                    }
                  }
                },
                "avatar_url": {}
              }
            }
          }
        }
      }
    },
    "name": {
      "type": "string",
      "example": "pied piper"
    },
    "type": {
      "type": "string",
      "example": "bot"
    },
    "object": {
      "type": "string",
      "example": "user"
    },
    "avatar_url": {}
  }
}
object UserGetUserById400Response
{
  "type": "object",
  "properties": {}
}
string UserGetUserByIdResponse
{
  "type": "string",
  "example": "{\n  \"object\": \"user\",\n  \"id\": \"d40e767c-d7af-4b18-a86d-55c61f1e39a4\",\n  \"type\": \"person\",\n\t\"person\": {\n\t\t\"email\": \"avo@example.org\",\n\t},\n  \"name\": \"Avocado Lovelace\",\n  \"avatar_url\": \"https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg\",\n}"
}
object UserListAllUsers400Response
{
  "type": "object",
  "properties": {}
}
string UserListAllUsersResponse
{
  "type": "string",
  "example": "{\n  \"results\": [\n    {\n      \"object\": \"user\",\n      \"id\": \"d40e767c-d7af-4b18-a86d-55c61f1e39a4\",\n      \"type\": \"person\",\n      \"person\": {\n        \"email\": \"avo@example.org\",\n      },\n      \"name\": \"Avocado Lovelace\",\n      \"avatar_url\": \"https://secure.notion-static.com/e6a352a8-8381-44d0-a1dc-9ed80e62b53d.jpg\",\n    },\n    {\n      \"object\": \"user\",\n      \"id\": \"9a3b5ae0-c6e6-482d-b0e1-ed315ee6dc57\",\n      \"type\": \"bot\",\n      \"bot\": {},\n      \"name\": \"Doug Engelbot\",\n      \"avatar_url\": \"https://secure.notion-static.com/6720d746-3402-4171-8ebb-28d15144923c.jpg\",\n    }\n  ],\n  \"next_cursor\": \"fe2cc560-036c-44cd-90e8-294d5a74cebc\",\n  \"has_more\": true\n}"
}