{
  "opencollection": "1.0.0",
  "info": {
    "name": "Aha! Account backups Users API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "authorization_code",
      "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
      "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Users",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List users associated with a product",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/products/:product_id/users",
            "params": [
              {
                "name": "product_id",
                "value": "",
                "type": "path",
                "description": "ProductId identifier"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "List users associated with a product"
        },
        {
          "info": {
            "name": "Create a user",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/products/:product_id/users",
            "params": [
              {
                "name": "product_id",
                "value": "",
                "type": "path",
                "description": "ProductId identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a user"
        },
        {
          "info": {
            "name": "List users",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "**[Custom roles](https://www.aha.io/support/roadmaps/account/billing-and-users/custom-user-permission-roles) are an Enterprise+ exclusive feature.**"
        },
        {
          "info": {
            "name": "Get a specific user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get a specific user"
        },
        {
          "info": {
            "name": "Update a user",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update a user"
        },
        {
          "info": {
            "name": "List a user's product roles",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id/product_roles",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "List a user's product roles"
        },
        {
          "info": {
            "name": "Update a user's product roles",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id/product_roles",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update a user's product roles"
        },
        {
          "info": {
            "name": "Delete a user's product role",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id/product_roles/:product_id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              },
              {
                "name": "product_id",
                "value": "",
                "type": "path",
                "description": "ProductId identifier"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Delete a user's product role"
        },
        {
          "info": {
            "name": "List a user's custom roles",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id/user_roles",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "List a user's custom roles"
        },
        {
          "info": {
            "name": "Update a user's custom roles",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id/user_roles",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update a user's custom roles"
        },
        {
          "info": {
            "name": "Delete a user's custom role",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{account-domain}.aha.io/api/v1/api/v1/users/:id/user_roles/:product_id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id identifier"
              },
              {
                "name": "product_id",
                "value": "",
                "type": "path",
                "description": "ProductId identifier"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://{account-domain}.aha.io/oauth/authorize",
              "accessTokenUrl": "https://{account-domain}.aha.io/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Delete a user's custom role"
        }
      ]
    }
  ],
  "bundled": true
}