{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "Accounts",
    "version" : "1.0.0",
    "description" : "Provides various services for managing accounts."
  },
  "paths" : {
    "/api/is-account" : {
      "get" : {
        "operationId" : "get-api-is-account",
        "summary" : "Check for Existing Account",
        "description" : "Checks if an account exists for the given email address. If an account is found that belongs to your company, the response will include the verification status as well.\n",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "query",
          "required" : true,
          "description" : "Identifier of your company as shown on the <a href=\"/company/profile\">profile page</a>.",
          "schema" : {
            "type" : "string"
          },
          "example" : "JSOM3ACS72QAJ2I1IM1D5VNFGR"
        }, {
          "name" : "email",
          "in" : "query",
          "required" : true,
          "description" : "The email address to check for an account.",
          "schema" : {
            "type" : "string"
          },
          "example" : "david@unknown.org"
        }, {
          "name" : "key",
          "in" : "query",
          "required" : true,
          "description" : "<a href=\"/kba/M9QWH\">Access key</a> computed from your company's <a href=\"/company/api-integration\">API access parameters</a>. The value can also be provided in the <code>Authorization</code> HTTP header. See kba:M9QWH for details.",
          "schema" : {
            "type" : "string"
          },
          "example" : "6386086c1280c0f76b2c6cfbd3acd4dc21354f21495bd0091706aa3a738e1177"
        } ],
        "responses" : {
          "200" : {
            "description" : "Successful response for an unknown email address.",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : true,
                      "error" : false,
                      "exists" : false
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Missing parameter or malformed request",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : false,
                      "error" : true,
                      "message" : "The parameter {missingParameter} must be filled."
                    }
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Authentication required but none provided",
            "content" : {
              "application/json" : { }
            }
          },
          "403" : {
            "description" : "Invalid authentication or missing permission",
            "content" : {
              "application/json" : { }
            }
          },
          "404" : {
            "description" : "Resource not found",
            "content" : {
              "application/json" : { }
            }
          },
          "405" : {
            "description" : "Incorrect request method, e.g. GET instead of POST",
            "content" : {
              "application/json" : { }
            }
          },
          "500" : {
            "description" : "Unexpected server-side error",
            "content" : {
              "application/json" : { }
            }
          }
        }
      }
    },
    "/api/person-info" : {
      "get" : {
        "operationId" : "get-api-person-info",
        "summary" : "Read Account Information",
        "description" : "Provides information about an account in your company, either identified via a public talk-to-me identifier, or via an email address. Company authentication is required.\n",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "query",
          "required" : true,
          "description" : "Identifier of your company as shown on the <a href=\"/company/profile\">profile page</a>.",
          "schema" : {
            "type" : "string"
          },
          "example" : "JSOM3ACS72QAJ2I1IM1D5VNFGR"
        }, {
          "name" : "key",
          "in" : "query",
          "required" : true,
          "description" : "<a href=\"/kba/M9QWH\">Access key</a> computed from your company's <a href=\"/company/api-integration\">API access parameters</a>. The value can also be provided in the <code>Authorization</code> HTTP header. See kba:M9QWH for details.",
          "schema" : {
            "type" : "string"
          },
          "example" : "6386086c1280c0f76b2c6cfbd3acd4dc21354f21495bd0091706aa3a738e1177"
        }, {
          "name" : "email",
          "in" : "query",
          "required" : false,
          "description" : "The email address of the queried account. Required if <code>talkToMeId</code> is omitted.",
          "schema" : {
            "type" : "string"
          },
          "example" : "paul@company.com"
        }, {
          "name" : "talkToMeId",
          "in" : "query",
          "required" : false,
          "description" : "The talk-to-me identifier of the queried account. Can be omitted if <code>email</code> is provided.",
          "schema" : {
            "type" : "string"
          },
          "example" : "QAT88PF4NQUB50SOHFLIPQL9RT"
        } ],
        "responses" : {
          "200" : {
            "description" : "Successful response.",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : true,
                      "error" : false,
                      "name" : "Paul Doe",
                      "talkToMe" : "QAT88PF4NQUB50SOHFLIPQL9RT",
                      "avatar" : "https: //memoio.com/avatar/SPFIEVG0BFVK582TVV3BKKCQUU.jpg",
                      "email" : "paul@company.com",
                      "phone" : "+1 234 56789",
                      "mobile" : null,
                      "companyName" : "Company Ltd.",
                      "position" : "Sales",
                      "available" : false,
                      "awayInfo" : "Away until 08/20/2023.",
                      "awayFrom" : "2023-08-01",
                      "awayUntil" : "2023-08-20",
                      "substitution" : "peter@company.com",
                      "onlineState" : "OFFLINE"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Missing parameter or malformed request",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : false,
                      "error" : true,
                      "message" : "The parameter {missingParameter} must be filled."
                    }
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Authentication required but none provided",
            "content" : {
              "application/json" : { }
            }
          },
          "403" : {
            "description" : "Invalid authentication or missing permission",
            "content" : {
              "application/json" : { }
            }
          },
          "404" : {
            "description" : "Resource not found",
            "content" : {
              "application/json" : { }
            }
          },
          "405" : {
            "description" : "Incorrect request method, e.g. GET instead of POST",
            "content" : {
              "application/json" : { }
            }
          },
          "500" : {
            "description" : "Unexpected server-side error",
            "content" : {
              "application/json" : { }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account}" : {
      "get" : {
        "operationId" : "get-api-v1-accounts-account-",
        "summary" : "Read Account Information",
        "description" : "Provides information about an account, identified via the account ID or email address.\n",
        "parameters" : [ {
          "name" : "account",
          "in" : "path",
          "required" : true,
          "description" : "The ID or email address of the queried account. Only accounts of the requesting company can be found.",
          "schema" : {
            "type" : "string"
          },
          "example" : "TH90SQ621EVG0GNI4GTEIE4TES"
        }, {
          "name" : "companyId",
          "in" : "query",
          "required" : true,
          "description" : "Identifier of your company as shown on the <a href=\"/company/profile\">profile page</a>.",
          "schema" : {
            "type" : "string"
          },
          "example" : "JSOM3ACS72QAJ2I1IM1D5VNFGR"
        }, {
          "name" : "key",
          "in" : "query",
          "required" : true,
          "description" : "<a href=\"/kba/M9QWH\">Access key</a> computed from your company's <a href=\"/company/api-integration\">API access parameters</a>. The value can also be provided in the <code>Authorization</code> HTTP header. See kba:M9QWH for details.",
          "schema" : {
            "type" : "string"
          },
          "example" : "6386086c1280c0f76b2c6cfbd3acd4dc21354f21495bd0091706aa3a738e1177"
        } ],
        "responses" : {
          "200" : {
            "description" : "Successful response.",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : true,
                      "error" : false,
                      "account" : {
                        "id" : "TH90SQ621EVG0GNI4GTEIE4TES",
                        "name" : "Paul Doe",
                        "email" : "paul@company.com",
                        "companyId" : "JLSMBTA3U7SKAI2PLKFQHQEM4K"
                      }
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Missing parameter or malformed request",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : false,
                      "error" : true,
                      "message" : "The parameter {missingParameter} must be filled."
                    }
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Authentication required but none provided",
            "content" : {
              "application/json" : { }
            }
          },
          "403" : {
            "description" : "Invalid authentication or missing permission",
            "content" : {
              "application/json" : { }
            }
          },
          "404" : {
            "description" : "Resource not found",
            "content" : {
              "application/json" : { }
            }
          },
          "405" : {
            "description" : "Incorrect request method, e.g. GET instead of POST",
            "content" : {
              "application/json" : { }
            }
          },
          "500" : {
            "description" : "Unexpected server-side error",
            "content" : {
              "application/json" : { }
            }
          }
        }
      }
    },
    "/api/out-of-office" : {
      "get" : {
        "operationId" : "get-api-out-of-office",
        "summary" : "Set Absence Information",
        "description" : "Sets absence information for the given account.\n",
        "parameters" : [ {
          "name" : "accountEmail",
          "in" : "query",
          "required" : true,
          "description" : "E-mail address of the user. Their account must belong to your company, and it must not be locked.",
          "schema" : {
            "type" : "string"
          },
          "example" : "jane@ghost.it"
        }, {
          "name" : "companyId",
          "in" : "query",
          "required" : true,
          "description" : "Identifier of your company as shown on the <a href=\"/company/profile\">profile page</a>.",
          "schema" : {
            "type" : "string"
          },
          "example" : "JSOM3ACS72QAJ2I1IM1D5VNFGR"
        }, {
          "name" : "key",
          "in" : "query",
          "required" : true,
          "description" : "<a href=\"/kba/M9QWH\">Access key</a> computed from your company's <a href=\"/company/api-integration\">API access parameters</a>. The value can also be provided in the <code>Authorization</code> HTTP header. See kba:M9QWH for details.",
          "schema" : {
            "type" : "string"
          },
          "example" : "6386086c1280c0f76b2c6cfbd3acd4dc21354f21495bd0091706aa3a738e1177"
        }, {
          "name" : "awayFrom",
          "in" : "query",
          "required" : false,
          "description" : "First day of the user's absence in <code>YYYY-MM-DD</code> format. The field is cleared if the parameter is missing.",
          "schema" : {
            "type" : "string"
          },
          "example" : "2023-08-01"
        }, {
          "name" : "awayUntil",
          "in" : "query",
          "required" : false,
          "description" : "Last day of the user's absence in <code>YYYY-MM-DD</code> format. The field is cleared if the parameter is missing.",
          "schema" : {
            "type" : "string"
          },
          "example" : "2023-08-14"
        }, {
          "name" : "substitution",
          "in" : "query",
          "required" : false,
          "description" : "The vacation replacement's account to redirect messages to while the user is away. Overwritten by the <code>substitutionChannel</code> parameter if both are provided.",
          "schema" : {
            "type" : "string"
          },
          "example" : "john@ghost.it"
        }, {
          "name" : "substitutionChannel",
          "in" : "query",
          "required" : false,
          "description" : "Identifier of the channel to redirect messages to while the user is away. Overwrites the <code>substitution</code> parameter if both are provided.",
          "schema" : {
            "type" : "string"
          },
          "example" : "968AIDVRHOMHBO19G7AIT7AHH0"
        } ],
        "responses" : {
          "200" : {
            "description" : "Successful response.",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : true,
                      "error" : false,
                      "message" : "The changes have been saved"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Missing parameter or malformed request",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : false,
                      "error" : true,
                      "message" : "The parameter {missingParameter} must be filled."
                    }
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Authentication required but none provided",
            "content" : {
              "application/json" : { }
            }
          },
          "403" : {
            "description" : "Invalid authentication or missing permission",
            "content" : {
              "application/json" : { }
            }
          },
          "404" : {
            "description" : "Resource not found",
            "content" : {
              "application/json" : { }
            }
          },
          "405" : {
            "description" : "Incorrect request method, e.g. GET instead of POST",
            "content" : {
              "application/json" : { }
            }
          },
          "500" : {
            "description" : "Unexpected server-side error",
            "content" : {
              "application/json" : { }
            }
          }
        }
      }
    },
    "/api/do-not-disturb" : {
      "get" : {
        "operationId" : "get-api-do-not-disturb",
        "summary" : "Set Do-Not-Disturb Flag",
        "description" : "Toggles the do-not-disturb flag of the given account. While this flag is set, the respective user is excluded from the distribution of incoming conversations for all channels they participate in.\n",
        "parameters" : [ {
          "name" : "accountEmail",
          "in" : "query",
          "required" : true,
          "description" : "E-mail address of the user. Their account must belong to your company, and it must not be locked.",
          "schema" : {
            "type" : "string"
          },
          "example" : "jane@ghost.it"
        }, {
          "name" : "companyId",
          "in" : "query",
          "required" : true,
          "description" : "Identifier of your company as shown on the <a href=\"/company/profile\">profile page</a>.",
          "schema" : {
            "type" : "string"
          },
          "example" : "JSOM3ACS72QAJ2I1IM1D5VNFGR"
        }, {
          "name" : "key",
          "in" : "query",
          "required" : true,
          "description" : "<a href=\"/kba/M9QWH\">Access key</a> computed from your company's <a href=\"/company/api-integration\">API access parameters</a>. The value can also be provided in the <code>Authorization</code> HTTP header. See kba:M9QWH for details.",
          "schema" : {
            "type" : "string"
          },
          "example" : "6386086c1280c0f76b2c6cfbd3acd4dc21354f21495bd0091706aa3a738e1177"
        }, {
          "name" : "dnd",
          "in" : "query",
          "required" : false,
          "description" : "New do-not-disturb status of the user. If <code>true</code>, the user is excluded from the distribution of channel conversations. If the value is not provided, a default value of <code>true</code> is assumed.",
          "schema" : {
            "type" : "string"
          },
          "example" : "false"
        } ],
        "responses" : {
          "200" : {
            "description" : "Successful response.",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : true,
                      "error" : false,
                      "message" : "The changes have been saved"
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Missing parameter or malformed request",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : false,
                      "error" : true,
                      "message" : "The parameter {missingParameter} must be filled."
                    }
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Authentication required but none provided",
            "content" : {
              "application/json" : { }
            }
          },
          "403" : {
            "description" : "Invalid authentication or missing permission",
            "content" : {
              "application/json" : { }
            }
          },
          "404" : {
            "description" : "Resource not found",
            "content" : {
              "application/json" : { }
            }
          },
          "405" : {
            "description" : "Incorrect request method, e.g. GET instead of POST",
            "content" : {
              "application/json" : { }
            }
          },
          "500" : {
            "description" : "Unexpected server-side error",
            "content" : {
              "application/json" : { }
            }
          }
        }
      }
    },
    "/api/v1/accounts/{account}/push-urls" : {
      "post" : {
        "operationId" : "post-api-v1-accounts-account-push-urls",
        "summary" : "Register Push URL for Account",
        "description" : "Registers a push URL for a account belonging to the authenticated company.\n",
        "parameters" : [ {
          "name" : "account",
          "in" : "path",
          "required" : true,
          "description" : "E-mail address of the user or their formal identifier. The account must belong to your company, and it must not be locked.",
          "schema" : {
            "type" : "string"
          },
          "example" : "jane@ghost.it"
        }, {
          "name" : "appId",
          "in" : "query",
          "required" : true,
          "description" : "A string uniquely identifying the app registering the push URL.",
          "schema" : {
            "type" : "string"
          },
          "example" : "test-app"
        }, {
          "name" : "companyId",
          "in" : "query",
          "required" : true,
          "description" : "Identifier of your company as shown on the <a href=\"/company/profile\">profile page</a>.",
          "schema" : {
            "type" : "string"
          },
          "example" : "JSOM3ACS72QAJ2I1IM1D5VNFGR"
        }, {
          "name" : "key",
          "in" : "query",
          "required" : true,
          "description" : "<a href=\"/kba/M9QWH\">Access key</a> computed from your company's <a href=\"/company/api-integration\">API access parameters</a>. The value can also be provided in the <code>Authorization</code> HTTP header. See kba:M9QWH for details.",
          "schema" : {
            "type" : "string"
          },
          "example" : "6386086c1280c0f76b2c6cfbd3acd4dc21354f21495bd0091706aa3a738e1177"
        }, {
          "name" : "pushUrl",
          "in" : "query",
          "required" : true,
          "description" : "The HTTPS URL to register for receiving push notifications. The URL must be reachable from the internet and needs to be whitelisted.",
          "schema" : {
            "type" : "string"
          },
          "example" : "https://example.com/push-endpoint?customer=12345&user=98765"
        } ],
        "responses" : {
          "200" : {
            "description" : "Successful response.",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : true,
                      "error" : false
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "description" : "Missing parameter or malformed request",
            "content" : {
              "application/json" : {
                "examples" : {
                  "example1" : {
                    "value" : {
                      "success" : false,
                      "error" : true,
                      "message" : "The parameter {missingParameter} must be filled."
                    }
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Authentication required but none provided",
            "content" : {
              "application/json" : { }
            }
          },
          "403" : {
            "description" : "Invalid authentication or missing permission",
            "content" : {
              "application/json" : { }
            }
          },
          "404" : {
            "description" : "Resource not found",
            "content" : {
              "application/json" : { }
            }
          },
          "405" : {
            "description" : "Incorrect request method, e.g. GET instead of POST",
            "content" : {
              "application/json" : { }
            }
          },
          "500" : {
            "description" : "Unexpected server-side error",
            "content" : {
              "application/json" : { }
            }
          }
        }
      }
    }
  }
}