{
  "info": {
    "name": "Interstellio Identity",
    "_postman_id": "b3241339-3e70-4cc2-b5dd-f2e3cb7148f0",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "API collection for the NebularStack Identity service."
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-Auth-Token",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{authToken}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Remove any header whose resolved value is empty.",
          "var toRemove = [];",
          "pm.request.headers.each(function (header) {",
          "    var resolved = pm.variables.replaceIn(header.value || '');",
          "    if (resolved.trim() === '') {",
          "        toRemove.push(header.key);",
          "    }",
          "});",
          "toRemove.forEach(function (key) {",
          "    pm.request.headers.remove(key);",
          "});"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "authToken",
      "value": "",
      "type": "string",
      "description": "API key (JWT) sent as the X-Auth-Token header on every authenticated request. Create and manage keys from the console at https://console.interstellio.io, or via the Identity API. See the authentication guide: https://docs.interstellio.io/nebularstack/api_guide/auth."
    },
    {
      "key": "region",
      "value": "za",
      "type": "string",
      "description": "Service region. Available: za."
    },
    {
      "key": "domain",
      "value": "",
      "type": "string",
      "description": "Entity domain context sent as the X-Domain header. Leave empty to use the domain your API key belongs to. See regions, domains and tenants: https://docs.interstellio.io/nebularstack/users#regions-domains-and-tenants."
    },
    {
      "key": "tenantId",
      "value": "",
      "type": "string",
      "description": "Tenant context sent as the X-Tenant-ID header. Leave empty when not operating on a specific tenant. When set, you must also set domain (X-Domain), even if it is your default domain, because a tenant is scoped to a domain. See regions, domains and tenants: https://docs.interstellio.io/nebularstack/users#regions-domains-and-tenants."
    },
    {
      "key": "timezone",
      "value": "UTC",
      "type": "string",
      "description": "IANA timezone name sent as the X-Timezone header. Response datetimes are formatted as ISO 8601 in this timezone; defaults to UTC. See timezone support: https://docs.interstellio.io/nebularstack/api_guide/timezones."
    },
    {
      "key": "identityUrl",
      "value": "https://identity-{{region}}.interstellio.io",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Tenants",
      "item": [
        {
          "name": "List tenant accounts",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{identityUrl}}/v1/tenants",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "tenants"
              ],
              "query": [
                {
                  "key": "p",
                  "value": "",
                  "description": "Paginate Current Page. (default 1)",
                  "disabled": true
                },
                {
                  "key": "l",
                  "value": "",
                  "description": "Paginate Limit / Entities per Page. (1-50, -1 for streaming)",
                  "disabled": true
                },
                {
                  "key": "id",
                  "value": "",
                  "description": "Filter by id. (can suffix with wildcard *)",
                  "disabled": true
                },
                {
                  "key": "name",
                  "value": "",
                  "description": "Filter by name. (can suffix with wildcard *)",
                  "disabled": true
                },
                {
                  "key": "email",
                  "value": "",
                  "description": "Filter by email. (can suffix with wildcard *)",
                  "disabled": true
                },
                {
                  "key": "sc",
                  "value": "",
                  "description": "Sort by Property/Column. (id, name, email)",
                  "disabled": true
                },
                {
                  "key": "sd",
                  "value": "",
                  "description": "Sort direction. asc for Ascending or desc for Descending",
                  "disabled": true
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Customer, Identity Administrator, Identity Support, Internal Monitor, Staff Member, Support\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"payload\": [\n        {\n            \"id\": \"f347ba74-7a67-402e-816b-20c53183a867\",\n            \"short_id\": \"YINI-PSQY-ITQB\",\n            \"domain\": \"interstellio.io\",\n            \"name\": \"Test Customer\",\n            \"address_line1\": \"Googleplex\",\n            \"address_line2\": \"Mountain View\",\n            \"address_line3\": null,\n            \"address_line4\": null,\n            \"postal_code\": \"650\",\n            \"country\": \"United States\",\n            \"state\": \"California\",\n            \"email\": \"chris@fwiw.co.za\",\n            \"phone_home\": \"+1 555 111 1234\",\n            \"phone_mobile\": \"+1 555 111 1234\",\n            \"phone_office\": \"+1 555 111 1234\",\n            \"org_reg\": null,\n            \"vat_reg\": null,\n            \"id_no\": null,\n            \"id_type\": null,\n            \"metadata\": {},\n            \"creation_time\": \"2020-04-27T08:53:03.000Z\"\n        }\n    ],\n    \"metadata\": {\n        \"records\": 1,\n        \"page\": 1,\n        \"pages\": 1,\n        \"per_page\": 10\n    }\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "Create a new tenant account",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{identityUrl}}/v1/tenant",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "tenant"
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Test Customer\",\n    \"address_line1\": \"Googleplex\",\n    \"address_line2\": \"Mountain View\",\n    \"postal_code\": \"650\",\n    \"country\": \"United States\",\n    \"state\": \"California\",\n    \"email\": \"chris@fwiw.co.za\",\n    \"phone_home\": \"+1 555 111 1234\",\n    \"phone_mobile\": \"+1 555 111 1234\",\n    \"phone_office\": \"+1 555 111 1234\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"id\": \"f347ba74-7a67-402e-816b-20c53183a867\",\n    \"short_id\": \"YINI-PSQY-ITQB\",\n    \"domain\": \"interstellio.io\",\n    \"name\": \"Test Customer\",\n    \"address_line1\": \"Googleplex\",\n    \"address_line2\": \"Mountain View\",\n    \"address_line3\": null,\n    \"address_line4\": null,\n    \"postal_code\": \"650\",\n    \"country\": \"United States\",\n    \"state\": \"California\",\n    \"email\": \"chris@fwiw.co.za\",\n    \"phone_home\": \"+1 555 111 1234\",\n    \"phone_mobile\": \"+1 555 111 1234\",\n    \"phone_office\": \"+1 555 111 1234\",\n    \"org_reg\": null,\n    \"vat_reg\": null,\n    \"id_no\": null,\n    \"id_type\": null,\n    \"metadata\": {},\n    \"creation_time\": \"2020-04-27T08:53:03.000Z\"\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "View tenant account",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{identityUrl}}/v1/tenant/:tenant_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "tenant",
                ":tenant_id"
              ],
              "variable": [
                {
                  "key": "tenant_id",
                  "value": "",
                  "description": "Entity Tenant."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Customer, Identity Administrator, Identity Support, Internal Monitor, Staff Member, Support\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"id\": \"f347ba74-7a67-402e-816b-20c53183a867\",\n    \"short_id\": \"YINI-PSQY-ITQB\",\n    \"domain\": \"interstellio.io\",\n    \"name\": \"Test Customer\",\n    \"address_line1\": \"Googleplex\",\n    \"address_line2\": \"Mountain View\",\n    \"address_line3\": null,\n    \"address_line4\": null,\n    \"postal_code\": \"650\",\n    \"country\": \"United States\",\n    \"state\": \"California\",\n    \"email\": \"chris@fwiw.co.za\",\n    \"phone_home\": \"+1 555 111 1234\",\n    \"phone_mobile\": \"+1 555 111 1234\",\n    \"phone_office\": \"+1 555 111 1234\",\n    \"org_reg\": null,\n    \"vat_reg\": null,\n    \"id_no\": null,\n    \"id_type\": null,\n    \"metadata\": {},\n    \"creation_time\": \"2020-04-27T08:53:03.000Z\"\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "Update tenant account",
          "request": {
            "method": "PATCH",
            "url": {
              "raw": "{{identityUrl}}/v1/tenant/:tenant_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "tenant",
                ":tenant_id"
              ],
              "variable": [
                {
                  "key": "tenant_id",
                  "value": "",
                  "description": "Entity Tenant."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Test Customer\",\n    \"address_line1\": \"Googleplex\",\n    \"address_line2\": \"Mountain View\",\n    \"postal_code\": \"650\",\n    \"country\": \"United States\",\n    \"state\": \"California\",\n    \"email\": \"chris@fwiw.co.za\",\n    \"phone_home\": \"+1 555 111 1234\",\n    \"phone_mobile\": \"+1 555 111 1234\",\n    \"phone_office\": \"+1 555 111 1234\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"id\": \"f347ba74-7a67-402e-816b-20c53183a867\",\n    \"short_id\": \"YINI-PSQY-ITQB\",\n    \"domain\": \"interstellio.io\",\n    \"name\": \"Test Customer\",\n    \"address_line1\": \"Googleplex\",\n    \"address_line2\": \"Mountain View\",\n    \"address_line3\": null,\n    \"address_line4\": null,\n    \"postal_code\": \"650\",\n    \"country\": \"United States\",\n    \"state\": \"California\",\n    \"email\": \"chris@fwiw.co.za\",\n    \"phone_home\": \"+1 555 111 1234\",\n    \"phone_mobile\": \"+1 555 111 1234\",\n    \"phone_office\": \"+1 555 111 1234\",\n    \"org_reg\": null,\n    \"vat_reg\": null,\n    \"id_no\": null,\n    \"id_type\": null,\n    \"metadata\": {},\n    \"creation_time\": \"2020-04-27T08:53:03.000Z\"\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "Delete tenant account",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{identityUrl}}/v1/tenant/:tenant_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "tenant",
                ":tenant_id"
              ],
              "variable": [
                {
                  "key": "tenant_id",
                  "value": "",
                  "description": "Entity Tenant."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **204** OK - No Content\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "Users",
      "item": [
        {
          "name": "List user accounts",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{identityUrl}}/v1/users",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "users"
              ],
              "query": [
                {
                  "key": "p",
                  "value": "",
                  "description": "Paginate Current Page. (default 1)",
                  "disabled": true
                },
                {
                  "key": "l",
                  "value": "",
                  "description": "Paginate Limit / Entities per Page. (1-50, -1 for streaming)",
                  "disabled": true
                },
                {
                  "key": "id",
                  "value": "",
                  "description": "Filter by id. (can suffix with wildcard *)",
                  "disabled": true
                },
                {
                  "key": "name",
                  "value": "",
                  "description": "Filter by name. (can suffix with wildcard *)",
                  "disabled": true
                },
                {
                  "key": "username",
                  "value": "",
                  "description": "Filter by username. (can suffix with wildcard *)",
                  "disabled": true
                },
                {
                  "key": "org_name",
                  "value": "",
                  "description": "Filter by org_name. (can suffix with wildcard *)",
                  "disabled": true
                },
                {
                  "key": "sc",
                  "value": "",
                  "description": "Sort by Property/Column. (id, name, username, org_name)",
                  "disabled": true
                },
                {
                  "key": "sd",
                  "value": "",
                  "description": "Sort direction. asc for Ascending or desc for Descending",
                  "disabled": true
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Customer, Identity Administrator, Identity Support, Internal Monitor, Pager, Staff Member, Support\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"payload\": [\n        {\n            \"id\": \"eec35dc4-2317-11ef-a800-4f09eded88c9\",\n            \"domain\": \"interstellio.io\",\n            \"tenant_id\": null,\n            \"username\": \"test@interstellio.io\",\n            \"name\": \"Test User Account\",\n            \"org_name\": \"Test Company\",\n            \"address_line1\": null,\n            \"address_line2\": null,\n            \"address_line3\": null,\n            \"address_line4\": null,\n            \"postal_code\": null,\n            \"country\": \"ZA\",\n            \"state\": null,\n            \"email\": \"guy@interstellio.io\",\n            \"phone_home\": null,\n            \"phone_mobile\": null,\n            \"phone_office\": null,\n            \"enabled\": true,\n            \"timezone\": null,\n            \"creation_time\": \"2024-06-05T08:45:16.000Z\",\n            \"mfa\": false\n        }\n    ],\n    \"metadata\": {\n        \"records\": 1,\n        \"page\": 1,\n        \"pages\": 1,\n        \"per_page\": 10\n    }\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "Create a new user account",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{identityUrl}}/v1/user",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "user"
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"username\": \"test@interstellio.io\",\n    \"name\": \"Test User Account\",\n    \"org_name\": \"Test Company\",\n    \"country\": \"ZA\",\n    \"email\": \"guy@interstellio.io\",\n    \"enabled\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"id\": \"eec35dc4-2317-11ef-a800-4f09eded88c9\",\n    \"domain\": \"interstellio.io\",\n    \"tenant_id\": null,\n    \"username\": \"test@interstellio.io\",\n    \"name\": \"Test User Account\",\n    \"org_name\": \"Test Company\",\n    \"address_line1\": null,\n    \"address_line2\": null,\n    \"address_line3\": null,\n    \"address_line4\": null,\n    \"postal_code\": null,\n    \"country\": \"ZA\",\n    \"state\": null,\n    \"email\": \"guy@interstellio.io\",\n    \"phone_home\": null,\n    \"phone_mobile\": null,\n    \"phone_office\": null,\n    \"enabled\": true,\n    \"timezone\": null,\n    \"creation_time\": \"2024-06-05T08:45:16.000Z\",\n    \"mfa\": false\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "View user account",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{identityUrl}}/v1/user/:user_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "user",
                ":user_id"
              ],
              "variable": [
                {
                  "key": "user_id",
                  "value": "",
                  "description": "User Id."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Customer, Identity Administrator, Identity Support, Internal Monitor, Pager, Staff Member, Support\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"id\": \"eec35dc4-2317-11ef-a800-4f09eded88c9\",\n    \"domain\": \"interstellio.io\",\n    \"tenant_id\": null,\n    \"username\": \"test@interstellio.io\",\n    \"name\": \"Test User Account\",\n    \"org_name\": \"Test Company\",\n    \"address_line1\": null,\n    \"address_line2\": null,\n    \"address_line3\": null,\n    \"address_line4\": null,\n    \"postal_code\": null,\n    \"country\": \"ZA\",\n    \"state\": null,\n    \"email\": \"guy@interstellio.io\",\n    \"phone_home\": null,\n    \"phone_mobile\": null,\n    \"phone_office\": null,\n    \"enabled\": true,\n    \"timezone\": null,\n    \"creation_time\": \"2024-06-05T08:45:16.000Z\",\n    \"mfa\": false\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "Update user account",
          "request": {
            "method": "PATCH",
            "url": {
              "raw": "{{identityUrl}}/v1/user/:user_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "user",
                ":user_id"
              ],
              "variable": [
                {
                  "key": "user_id",
                  "value": "",
                  "description": "User Id."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Test User Account\",\n    \"org_name\": \"Test Company\",\n    \"country\": \"ZA\",\n    \"email\": \"guy@interstellio.io\",\n    \"enabled\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n    \"id\": \"eec35dc4-2317-11ef-a800-4f09eded88c9\",\n    \"domain\": \"interstellio.io\",\n    \"tenant_id\": null,\n    \"username\": \"test@interstellio.io\",\n    \"name\": \"Test User Account\",\n    \"org_name\": \"Test Company\",\n    \"address_line1\": null,\n    \"address_line2\": null,\n    \"address_line3\": null,\n    \"address_line4\": null,\n    \"postal_code\": null,\n    \"country\": \"ZA\",\n    \"state\": null,\n    \"email\": \"guy@interstellio.io\",\n    \"phone_home\": null,\n    \"phone_mobile\": null,\n    \"phone_office\": null,\n    \"enabled\": true,\n    \"timezone\": null,\n    \"creation_time\": \"2024-06-05T08:45:16.000Z\",\n    \"mfa\": false\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "Delete user account",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{identityUrl}}/v1/user/:user_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "user",
                ":user_id"
              ],
              "variable": [
                {
                  "key": "user_id",
                  "value": "",
                  "description": "User Id."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **204** OK - No Content\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          }
        },
        {
          "name": "List Assignments",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{identityUrl}}/v1/user/:user_id/assignments",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "user",
                ":user_id",
                "assignments"
              ],
              "variable": [
                {
                  "key": "user_id",
                  "value": "",
                  "description": "User Id."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Customer, Identity Administrator, Identity Support, Internal Monitor, Pager, Staff Member, Support\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Timezone",
                "value": "{{timezone}}",
                "description": "Timezone for response datetime property values. (default UTC)",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          },
          "response": [
            {
              "name": "200 OK",
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "[\n    {\n        \"role\": \"Root\",\n        \"domain\": \"any\",\n        \"tenant_id\": \"any\",\n        \"user_id\": \"2ff214b6-0847-11ef-9641-33404d9d7364\",\n        \"creation_time\": \"2024-05-02T05:45:48.000Z\"\n    }\n]",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "Add assignment",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{identityUrl}}/v1/user/:user_id/assignment/:role/:domain/:tenant_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "user",
                ":user_id",
                "assignment",
                ":role",
                ":domain",
                ":tenant_id"
              ],
              "variable": [
                {
                  "key": "role",
                  "value": "",
                  "description": "Role name."
                },
                {
                  "key": "domain",
                  "value": "",
                  "description": "Domain name or alternatively 'any'"
                },
                {
                  "key": "tenant_id",
                  "value": "",
                  "description": "Tenant-ID or alternatively 'any'"
                },
                {
                  "key": "user_id",
                  "value": "",
                  "description": "User Id."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **200** OK\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          }
        },
        {
          "name": "Remove assignment",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{identityUrl}}/v1/user/:user_id/assignment/:role/:domain/:tenant_id",
              "host": [
                "{{identityUrl}}"
              ],
              "path": [
                "v1",
                "user",
                ":user_id",
                "assignment",
                ":role",
                ":domain",
                ":tenant_id"
              ],
              "variable": [
                {
                  "key": "role",
                  "value": "",
                  "description": "Role name."
                },
                {
                  "key": "domain",
                  "value": "",
                  "description": "Domain name or alternatively 'any'"
                },
                {
                  "key": "tenant_id",
                  "value": "",
                  "description": "Tenant-ID or alternatively 'any'"
                },
                {
                  "key": "user_id",
                  "value": "",
                  "description": "User Id."
                }
              ]
            },
            "description": "## Accepted Roles (RBAC)\n\nAdministrator, Identity Administrator\n\n## Status Codes\n\n- **204** OK - No Content\n- **400** Bad Request\n- **401** Unauthorized / Require Authentication\n- **403** Forbidden / Access Denied\n- **404** Not Found\n- **409** Conflict\n- **429** Too Many Requests / Your Rate Limited\n- **5xx** Service Unavailable",
            "header": [
              {
                "key": "X-Tenant-ID",
                "value": "{{tenantId}}",
                "description": "Request Tenant Context. (requires X-Domain of the tenant)",
                "type": "text"
              },
              {
                "key": "X-Domain",
                "value": "{{domain}}",
                "description": "Optional domain context for the request. (default: the token domain)",
                "type": "text"
              }
            ]
          }
        }
      ]
    }
  ]
}