{
  "opencollection": "1.0.0",
  "info": {
    "name": "Upsun.com Rest Add-ons Users API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://auth.api.platform.sh/oauth2/authorize",
      "accessTokenUrl": "https://auth.api.platform.sh/oauth2/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Users",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get current logged-in user info",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/me"
          },
          "docs": "Retrieve information about the currently logged-in user (the user associated with the access token)."
        },
        {
          "info": {
            "name": "Check if phone verification is required",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/me/phone"
          },
          "docs": "Find out if the current logged in user requires phone verification to create projects."
        },
        {
          "info": {
            "name": "Check if verification is required",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/me/verification"
          },
          "docs": "Find out if the current logged in user requires verification (phone or staff) to create projects."
        },
        {
          "info": {
            "name": "Get the current user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/users/me"
          },
          "docs": "Retrieves the current user, determined from the used access token."
        },
        {
          "info": {
            "name": "Get a user by email",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/users/email=:email",
            "params": [
              {
                "name": "email",
                "value": "",
                "type": "path",
                "description": "The user's email address."
              }
            ]
          },
          "docs": "Retrieves a user matching the specified email address."
        },
        {
          "info": {
            "name": "Get a user by username",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/users/username=:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "The user's username."
              }
            ]
          },
          "docs": "Retrieves a user matching the specified username."
        },
        {
          "info": {
            "name": "Get a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{schemes}://api.upsun.com/users/:user_id",
            "params": [
              {
                "name": "user_id",
                "value": "",
                "type": "path",
                "description": "The ID of the user."
              }
            ]
          },
          "docs": "Retrieves the specified user."
        },
        {
          "info": {
            "name": "Update a user",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{schemes}://api.upsun.com/users/:user_id",
            "params": [
              {
                "name": "user_id",
                "value": "",
                "type": "path",
                "description": "The ID of the user."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates the specified user."
        },
        {
          "info": {
            "name": "Reset email address",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/users/:user_id/emailaddress",
            "params": [
              {
                "name": "user_id",
                "value": "",
                "type": "path",
                "description": "The ID of the user."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Requests a reset of the user's email address. A confirmation email will be sent to the new address when the request is accepted."
        },
        {
          "info": {
            "name": "Reset user password",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{schemes}://api.upsun.com/users/:user_id/resetpassword",
            "params": [
              {
                "name": "user_id",
                "value": "",
                "type": "path",
                "description": "The ID of the user."
              }
            ]
          },
          "docs": "Requests a reset of the user's password. A password reset email will be sent to the user when the request is accepted."
        }
      ]
    }
  ],
  "bundled": true
}