{
  "opencollection": "1.0.0",
  "info": {
    "name": "One-Shot access users API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "users",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get My Profile",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/users/me",
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get own UserProfile, auto-creating it on first call (upsert).\n\nAlso returns the viewer's own org (with `external_sharing_enabled` and\n`viewer_role`) so settings UI can render org-scoped controls without a\nsecond round-trip."
        },
        {
          "info": {
            "name": "Update My Profile",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/users/me",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Update own display_name and/or avatar_url."
        },
        {
          "info": {
            "name": "Get My Identity",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/users/me/identity",
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Return the authenticated user's Stytch id + email with no side effects.\n\nIntended for the Scott CLI to attach identity to product-analytics events.\nDeliberately does not upsert the profile or resolve the org the way\n`GET /users/me` does — an analytics identity read should be cheap and\nidempotent."
        },
        {
          "info": {
            "name": "Get Onboarding Options",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/users/me/onboarding-options",
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Return the data the frontend needs to choose an onboarding UX.\n\nComposes one fact from user_profile (`has_completed_onboarding`) with two from orgs\n(`current_org`, `matching_org`) — neither service crosses domain boundaries."
        },
        {
          "info": {
            "name": "Complete Onboarding",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/users/me/complete-onboarding",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Mark onboarding complete and place the user in exactly one org.\n\n`kind: \"solo\"` creates a personal org; `kind: \"team\"` joins the user to the\norg that has claimed their email domain. Org write + flag flip share a single\nDB transaction so partial state is impossible."
        },
        {
          "info": {
            "name": "Search Users",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/users/search",
            "params": [
              {
                "name": "q",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Search users by email or display name, filtered to the caller's email domain."
        },
        {
          "info": {
            "name": "Get User Profile",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/users/:user_id",
            "params": [
              {
                "name": "user_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Get public profile of any user by their user_id."
        },
        {
          "info": {
            "name": "List Workspace Members",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/workspaces/:workspace_id/members",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List all members of a workspace with their profiles."
        },
        {
          "info": {
            "name": "Add Workspace Member",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/workspaces/:workspace_id/members",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Directly add a same-org user to a workspace (owner only, no invite round trip)."
        },
        {
          "info": {
            "name": "Update Member Role",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/workspaces/:workspace_id/members/:target_user_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "target_user_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Change a member's role (owner only)."
        },
        {
          "info": {
            "name": "Remove Workspace Member",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/workspaces/:workspace_id/members/:target_user_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "target_user_id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Remove a member from a workspace. Owners and editors may remove members; only owners may remove an owner."
        }
      ]
    }
  ],
  "bundled": true
}