openapi: 3.0.3 info: title: Stytch B2B Authentication Application Organizations API version: 2.0.0 description: Stytch's B2B API for multi-tenant authentication. Supports Organizations, Members, SSO (SAML/OIDC), Magic Links, OTP, OAuth, Discovery, Sessions, B2B RBAC, SCIM, TOTP, Recovery Codes, Passwords, Impersonation, and the B2B IDP. contact: name: Stytch url: https://stytch.com/docs license: name: Proprietary servers: - url: https://api.stytch.com description: Production - url: https://test.stytch.com description: Test tags: - name: Organizations paths: /v1/b2b/organizations/{organization_id}/members/{member_id}: put: summary: Update operationId: api_organization_v1_organizations_members_Update tags: - Organizations description: Updates a Member specified by `organization_id` and `member_id`. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_UpdateRequest' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_UpdateResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n name: \"Jane Doe\",\n external_id: \"my-new-external-id\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.Update(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.UpdateParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t\tName: \"Jane Doe\",\n\t\tExternalID: \"my-new-external-id\",\n\t}\n\n\toptions := &members.UpdateParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.Update(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.UpdateRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.UpdateRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n UpdateRequest params = new UpdateRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n params.setName(\"Jane Doe\");\n params.setExternalId(\"my-new-external-id\");\n\n UpdateRequestOptions options = new UpdateRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().update(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.UpdateRequest\nimport com.stytch.java.b2b.models.organizationsmembers.UpdateRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.update(\n UpdateRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n name = \"Jane Doe\",\n externalId = \"my-new-external-id\",\n ),\n UpdateRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n name: \"Jane Doe\",\n external_id: \"my-new-external-id\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.update(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->update([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n 'name' => 'Jane Doe',\n 'external_id' => 'my-new-external-id',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import UpdateRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.update(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n name=\"Jane Doe\",\n external_id=\"my-new-external-id\",\n method_options=UpdateRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.update(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n name: \"Jane Doe\",\n external_id: \"my-new-external-id\",\n method_options: StytchB2B::Organizations::Members::UpdateRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::UpdateRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.update(\n UpdateRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n name: Some(String::from(\"Jane Doe\")),\n external_id: Some(String::from(\"my-new-external-id\")),\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# PUT /v1/b2b/organizations/{organization_id}/members/{member_id}\ncurl --request PUT \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId} \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\" \\\n -d '{\n \"name\": \"Jane Doe\",\n \"external_id\": \"my-new-external-id\"\n }'" delete: summary: Delete operationId: api_organization_v1_organizations_members_Delete tags: - Organizations description: Deletes a Member specified by `organization_id` and `member_id`. parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_DeleteResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.Delete(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.DeleteParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\toptions := &members.DeleteParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.Delete(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n DeleteRequest params = new DeleteRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n DeleteRequestOptions options = new DeleteRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().delete(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteRequest\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.delete(\n DeleteRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n DeleteRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.delete(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->delete([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import DeleteRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.delete(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n method_options=DeleteRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.delete(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n method_options: StytchB2B::Organizations::Members::DeleteRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::DeleteRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.delete(\n DeleteRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}\ncurl --request DELETE \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId} \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate: put: summary: Reactivate operationId: api_organization_v1_organizations_members_Reactivate tags: - Organizations description: 'Reactivates a deleted Member''s status and its associated email status (if applicable) to active, specified by `organization_id` and `member_id`. This endpoint will only work for Members with at least one verified email where their `email_address_verified` is `true`. Note that this endpoint does not accept an `external_id`. The Stytch `member_id` must be provided.' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_ReactivateRequest' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_ReactivateResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.Reactivate(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.ReactivateParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\toptions := &members.ReactivateParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.Reactivate(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.ReactivateRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.ReactivateRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n ReactivateRequest params = new ReactivateRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n ReactivateRequestOptions options = new ReactivateRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().reactivate(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.ReactivateRequest\nimport com.stytch.java.b2b.models.organizationsmembers.ReactivateRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.reactivate(\n ReactivateRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n ReactivateRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.reactivate(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->reactivate([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import ReactivateRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.reactivate(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n method_options=ReactivateRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.reactivate(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n method_options: StytchB2B::Organizations::Members::ReactivateRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::ReactivateRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.reactivate(\n ReactivateRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# PUT /v1/b2b/organizations/{organization_id}/members/{member_id}/reactivate\ncurl --request PUT \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/reactivate \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}: delete: summary: Deletemfaphonenumber operationId: api_organization_v1_organizations_members_DeleteMFAPhoneNumber tags: - Organizations description: "Delete a Member's MFA phone number. \n\nTo change a Member's phone number, you must first call this endpoint to delete the existing phone number.\n\nExisting Member Sessions that include a phone number authentication factor will not be revoked if the phone number is deleted, and MFA will not be enforced until the Member logs in again.\nIf you wish to enforce MFA immediately after a phone number is deleted, you can do so by prompting the Member to enter a new phone number\nand calling the [OTP SMS send](https://stytch.com/docs/b2b/api/otp-sms-send) endpoint, then calling the [OTP SMS Authenticate](https://stytch.com/docs/b2b/api/authenticate-otp-sms) endpoint." parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_DeleteMFAPhoneNumberResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.DeleteMFAPhoneNumber(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.DeleteMFAPhoneNumberParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\toptions := &members.DeleteMFAPhoneNumberParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.DeleteMFAPhoneNumber(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteMFAPhoneNumberRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteMFAPhoneNumberRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n DeleteMFAPhoneNumberRequest params = new DeleteMFAPhoneNumberRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n DeleteMFAPhoneNumberRequestOptions options = new DeleteMFAPhoneNumberRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().deleteMFAPhoneNumber(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteMFAPhoneNumberRequest\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteMFAPhoneNumberRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.deleteMFAPhoneNumber(\n DeleteMFAPhoneNumberRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n DeleteMFAPhoneNumberRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.deleteMFAPhoneNumber(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->delete_mfa_phone_number([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import DeleteMFAPhoneNumberRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.delete_mfa_phone_number(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n method_options=DeleteMFAPhoneNumberRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.delete_mfa_phone_number(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n method_options: StytchB2B::Organizations::Members::DeleteMFAPhoneNumberRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::DeleteMFAPhoneNumberRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.delete_mfa_phone_number(\n DeleteMFAPhoneNumberRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# DELETE /v1/b2b/organizations/{organization_id}/members/mfa_phone_numbers/{member_id}\ncurl --request DELETE \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/mfa_phone_numbers/${memberId} \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" /v1/b2b/organizations/{organization_id}/members/{member_id}/totp: delete: summary: Deletetotp operationId: api_organization_v1_organizations_members_DeleteTOTP tags: - Organizations description: 'Delete a Member''s MFA TOTP registration. To mint a new registration for a Member, you must first call this endpoint to delete the existing registration. Existing Member Sessions that include the TOTP authentication factor will not be revoked if the registration is deleted, and MFA will not be enforced until the Member logs in again.' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_DeleteTOTPResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.DeleteTOTP(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.DeleteTOTPParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\toptions := &members.DeleteTOTPParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.DeleteTOTP(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteTOTPRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteTOTPRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n DeleteTOTPRequest params = new DeleteTOTPRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n DeleteTOTPRequestOptions options = new DeleteTOTPRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().deleteTOTP(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteTOTPRequest\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteTOTPRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.deleteTOTP(\n DeleteTOTPRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n DeleteTOTPRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.deleteTOTP(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->delete_totp([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import DeleteTOTPRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.delete_totp(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n method_options=DeleteTOTPRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.delete_totp(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n method_options: StytchB2B::Organizations::Members::DeleteTOTPRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::DeleteTOTPRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.delete_totp(\n DeleteTOTPRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/totp\ncurl --request DELETE \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/totp \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" /v1/b2b/organizations/members/search: post: summary: Search operationId: api_organization_v1_organizations_members_Search tags: - Organizations description: ' **Warning**: This endpoint is not recommended for use in login flows. Scaling issues may occur, as search performance may vary from ~150 milliseconds to 9 seconds depending on query complexity and rate limits are set to 100 requests/minute. Search for Members within specified Organizations. An array with at least one `organization_id` is required. Submitting an empty `query` returns all non-deleted Members within the specified Organizations. All fuzzy search filters require a minimum of three characters.' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_SearchRequest' parameters: - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_SearchResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// POST /v1/b2b/organizations/members/search\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_ids: [\"${organizationId}\"],\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.Search(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// POST /v1/b2b/organizations/members/search\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.SearchParams{\n\t\tOrganizationIds: []string{\"${organizationId}\"},\n\t}\n\n\toptions := &members.SearchParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.Search(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// POST /v1/b2b/organizations/members/search\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.SearchRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.SearchRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n SearchRequest params = new SearchRequest();\n params.setOrganizationIds(new String(\"${organizationId}\"));\n\n SearchRequestOptions options = new SearchRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().search(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// POST /v1/b2b/organizations/members/search\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.SearchRequest\nimport com.stytch.java.b2b.models.organizationsmembers.SearchRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.search(\n SearchRequest(\n organizationIds = arrayOf(\"${organizationId}\"),\n ),\n SearchRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// POST /v1/b2b/organizations/members/search\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_ids: [\"${organizationId}\"],\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.search(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->search([\n 'organization_ids' => ['${organizationId}'],\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# POST /v1/b2b/organizations/members/search\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import SearchRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.search(\n organization_ids=[\"${organizationId}\"],\n method_options=SearchRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# POST /v1/b2b/organizations/members/search\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.search(\n organization_ids: ['${organizationId}'],\n method_options: StytchB2B::Organizations::Members::SearchRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// POST /v1/b2b/organizations/members/search\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::SearchRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.search(\n SearchRequest{\n organization_ids: vec![\"${organizationId}\"],\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# POST /v1/b2b/organizations/members/search\ncurl --request POST \\\n --url https://test.stytch.com/v1/b2b/organizations/members/search \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\" \\\n -d '{\n \"organization_ids\": [\"${organizationId}\"]\n }'" /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}: delete: summary: Deletepassword operationId: api_organization_v1_organizations_members_DeletePassword tags: - Organizations description: "Delete a Member's password. \n\nThis endpoint only works for Organization-scoped passwords. For cross-org password Projects, use [Require Password Reset By Email](https://stytch.com/docs/b2b/api/passwords-require-reset-by-email) instead." parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_password_id in: path required: true schema: type: string description: Globally unique UUID that identifies a Member's password. description: Globally unique UUID that identifies a Member's password. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_DeletePasswordResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_password_id: \"${exampleMemberPasswordId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.DeletePassword(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.DeletePasswordParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberPasswordID: \"${exampleMemberPasswordId}\",\n\t}\n\n\toptions := &members.DeletePasswordParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.DeletePassword(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.DeletePasswordRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.DeletePasswordRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n DeletePasswordRequest params = new DeletePasswordRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberPasswordId(\"${exampleMemberPasswordId}\");\n\n DeletePasswordRequestOptions options = new DeletePasswordRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().deletePassword(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.DeletePasswordRequest\nimport com.stytch.java.b2b.models.organizationsmembers.DeletePasswordRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.deletePassword(\n DeletePasswordRequest(\n organizationId = \"${organizationId}\",\n memberPasswordId = \"${exampleMemberPasswordId}\",\n ),\n DeletePasswordRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_password_id: \"${exampleMemberPasswordId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.deletePassword(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->delete_password([\n 'organization_id' => '${organizationId}',\n 'member_password_id' => '${exampleMemberPasswordId}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import DeletePasswordRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.delete_password(\n organization_id=\"${organizationId}\",\n member_password_id=\"${exampleMemberPasswordId}\",\n method_options=DeletePasswordRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.delete_password(\n organization_id: \"${organizationId}\",\n member_password_id: \"${exampleMemberPasswordId}\",\n method_options: StytchB2B::Organizations::Members::DeletePasswordRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::DeletePasswordRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.delete_password(\n DeletePasswordRequest{\n organization_id: \"${organizationId}\",\n member_password_id: \"${exampleMemberPasswordId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# DELETE /v1/b2b/organizations/{organization_id}/members/passwords/{member_password_id}\ncurl --request DELETE \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/passwords/${exampleMemberPasswordId} \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" /v1/b2b/organizations/members/dangerously_get/{member_id}: get: summary: Dangerouslyget operationId: api_organization_v1_organizations_members_DangerouslyGet tags: - Organizations description: Get a Member by `member_id`. This endpoint does not require an `organization_id`, enabling you to get members across organizations. This is a dangerous operation. Incorrect use may open you up to indirect object reference (IDOR) attacks. We recommend using the [Get Member](https://stytch.com/docs/b2b/api/get-member) API instead. parameters: - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. - name: include_deleted in: query required: false schema: type: boolean description: Whether to include deleted Members in the response. Defaults to false. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_GetResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/members/dangerously_get/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n member_id: \"${memberId}\",\n};\n\nclient.Organizations.Members.DangerouslyGet(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/members/dangerously_get/{member_id}\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.DangerouslyGetParams{\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\tresp, err := client.Organizations.Members.DangerouslyGet(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/members/dangerously_get/{member_id}\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.DangerouslyGetRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n DangerouslyGetRequest params = new DangerouslyGetRequest();\n params.setMemberId(\"${memberId}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().dangerouslyGet(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/members/dangerously_get/{member_id}\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.DangerouslyGetRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.dangerouslyGet(\n DangerouslyGetRequest(\n memberId = \"${memberId}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/members/dangerously_get/{member_id}\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n member_id: \"${memberId}\",\n};\n\nclient.organizations.members.dangerouslyGet(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->dangerously_get([\n 'member_id' => '${memberId}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/members/dangerously_get/{member_id}\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.dangerously_get(\n member_id=\"${memberId}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/members/dangerously_get/{member_id}\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.dangerously_get(\n member_id: \"${memberId}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/members/dangerously_get/{member_id}\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::DangerouslyGetRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.dangerously_get(\n DangerouslyGetRequest{\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/members/dangerously_get/{member_id}\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/members/dangerously_get/${memberId} \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json'" /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers: get: summary: Oidcproviders operationId: api_organization_v1_organizations_members_OIDCProviders tags: - Organizations description: "Retrieve the saved OIDC access tokens and ID tokens for a member. After a successful OIDC login, Stytch will save the \nissued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the \naccess token automatically." parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: include_refresh_token in: query required: false schema: type: boolean description: Whether to return the refresh token Stytch has stored for the OAuth Provider. Defaults to false. **Important:** If your application exchanges the refresh token, Stytch may not be able to automatically refresh access tokens in the future. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_OIDCProvidersResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.Organizations.Members.OIDCProviders(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.OIDCProviderInformationParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\tresp, err := client.Organizations.Members.OIDCProviders(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.OIDCProviderInformationRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n OIDCProviderInformationRequest params = new OIDCProviderInformationRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().oidcProviders(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.OIDCProviderInformationRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.oidcProviders(\n OIDCProviderInformationRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nclient.organizations.members.oidcProviders(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->oidc_providers([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.oidc_providers(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.oidc_providers(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::OIDCProviderInformationRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.oidc_providers(\n OIDCProviderInformationRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providers\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/oidc_providers \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json'" /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email: post: summary: Unlinkretiredemail operationId: api_organization_v1_organizations_members_UnlinkRetiredEmail tags: - Organizations description: "Unlinks a retired email address from a Member specified by their `organization_id` and `member_id`. The email address\nto be retired can be identified in the request body by either its `email_id`, its `email_address`, or both. If using\nboth identifiers they must refer to the same email.\n\nA previously active email address can be marked as retired in one of two ways:\n\n- It's replaced with a new primary email address during an explicit Member update.\n- A new email address is surfaced by an OAuth, SAML or OIDC provider. In this case the new email address becomes the\n Member's primary email address and the old primary email address is retired.\n\nA retired email address cannot be used by other Members in the same Organization. However, unlinking retired email\naddresses allows them to be subsequently re-used by other Organization Members. Retired email addresses can be viewed\non the [Member object](https://stytch.com/docs/b2b/api/member-object)." requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_UnlinkRetiredEmailRequest' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_UnlinkRetiredEmailResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_id: \"${emailId}\",\n email_address: \"${email}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.UnlinkRetiredEmail(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.UnlinkRetiredEmailParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t\tEmailID: \"${emailId}\",\n\t\tEmailAddress: \"${email}\",\n\t}\n\n\toptions := &members.UnlinkRetiredEmailParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.UnlinkRetiredEmail(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.UnlinkRetiredEmailRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.UnlinkRetiredEmailRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n UnlinkRetiredEmailRequest params = new UnlinkRetiredEmailRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n params.setEmailId(\"${emailId}\");\n params.setEmailAddress(\"${email}\");\n\n UnlinkRetiredEmailRequestOptions options = new UnlinkRetiredEmailRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().unlinkRetiredEmail(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.UnlinkRetiredEmailRequest\nimport com.stytch.java.b2b.models.organizationsmembers.UnlinkRetiredEmailRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.unlinkRetiredEmail(\n UnlinkRetiredEmailRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n emailId = \"${emailId}\",\n emailAddress = \"${email}\",\n ),\n UnlinkRetiredEmailRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_id: \"${emailId}\",\n email_address: \"${email}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.unlinkRetiredEmail(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->unlink_retired_email([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n 'email_id' => '${emailId}',\n 'email_address' => '${email}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import UnlinkRetiredEmailRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.unlink_retired_email(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n email_id=\"${emailId}\",\n email_address=\"${email}\",\n method_options=UnlinkRetiredEmailRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.unlink_retired_email(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_id: \"${emailId}\",\n email_address: \"${email}\",\n method_options: StytchB2B::Organizations::Members::UnlinkRetiredEmailRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::UnlinkRetiredEmailRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.unlink_retired_email(\n UnlinkRetiredEmailRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_id: Some(String::from(\"${emailId}\")),\n email_address: Some(String::from(\"${email}\")),\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email\ncurl --request POST \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/unlink_retired_email \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\" \\\n -d '{\n \"email_id\": \"${emailId}\",\n \"email_address\": \"${email}\"\n }'" /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update: post: summary: Startemailupdate operationId: api_organization_v1_organizations_members_StartEmailUpdate tags: - Organizations description: 'Starts a self-serve email update for a Member specified by their `organization_id` and `member_id`. To perform a self-serve update, members must be active and have an active, verified email address. The new email address must meet the following requirements: - Must not be in use by another member (retired emails count as used until they are [unlinked](https://stytch.com/docs/b2b/api/unlink-retired-member-email)) - Must not be updating for another member (i.e. two members cannot attempt to update to the same email at once) The member will receive an Email Magic Link (or Email OTP Code, if `EMAIL_OTP` is specified as the delivery method) that expires in 5 minutes. If they do not verify their new email address in that timeframe, the email will be freed up for other members to use. If using Email Magic Links, the magic link will redirect to your `login_redirect_url` (or the configured default if one isn''t provided), and you should invoke the [Authenticate Magic Link](https://stytch.com/docs/b2b/api/authenticate-magic-link) endpoint as normal to complete the flow. If using Email OTP Codes, you should invoke the [Authenticate Email OTP Code](https://stytch.com/docs/b2b/api/authenticate-email-otp) endpoint as normal to complete the flow. Make sure to pass the new email address to the endpoint.' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_StartEmailUpdateRequest' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_StartEmailUpdateResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_address: \"${email}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.StartEmailUpdate(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.StartEmailUpdateParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t\tEmailAddress: \"${email}\",\n\t}\n\n\toptions := &members.StartEmailUpdateParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.StartEmailUpdate(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.StartEmailUpdateRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.StartEmailUpdateRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n StartEmailUpdateRequest params = new StartEmailUpdateRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n params.setEmailAddress(\"${email}\");\n\n StartEmailUpdateRequestOptions options = new StartEmailUpdateRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().startEmailUpdate(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.StartEmailUpdateRequest\nimport com.stytch.java.b2b.models.organizationsmembers.StartEmailUpdateRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.startEmailUpdate(\n StartEmailUpdateRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n emailAddress = \"${email}\",\n ),\n StartEmailUpdateRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_address: \"${email}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.startEmailUpdate(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->start_email_update([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n 'email_address' => '${email}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import StartEmailUpdateRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.start_email_update(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n email_address=\"${email}\",\n method_options=StartEmailUpdateRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.start_email_update(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_address: \"${email}\",\n method_options: StytchB2B::Organizations::Members::StartEmailUpdateRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::StartEmailUpdateRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.start_email_update(\n StartEmailUpdateRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n email_address: \"${email}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# POST /v1/b2b/organizations/{organization_id}/members/{member_id}/start_email_update\ncurl --request POST \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/start_email_update \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\" \\\n -d '{\n \"email_address\": \"${email}\"\n }'" /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps: get: summary: Getconnectedapps operationId: api_organization_v1_organizations_members_GetConnectedApps tags: - Organizations description: 'Member Get Connected Apps retrieves a list of Connected Apps with which the Member has successfully completed an authorization flow. If the Member revokes a Connected App''s access (e.g. via the Revoke Connected App endpoint) then the Connected App will no longer be returned in the response. A Connected App''s access may also be revoked if the Organization''s allowed Connected App policy changes.' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_GetConnectedAppsResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.GetConnectedApps(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.GetConnectedAppsParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tMemberID: \"${memberId}\",\n\t}\n\n\toptions := &members.GetConnectedAppsParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.GetConnectedApps(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.GetConnectedAppsRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.GetConnectedAppsRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n GetConnectedAppsRequest params = new GetConnectedAppsRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setMemberId(\"${memberId}\");\n\n GetConnectedAppsRequestOptions options = new GetConnectedAppsRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().getConnectedApps(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.GetConnectedAppsRequest\nimport com.stytch.java.b2b.models.organizationsmembers.GetConnectedAppsRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.getConnectedApps(\n GetConnectedAppsRequest(\n organizationId = \"${organizationId}\",\n memberId = \"${memberId}\",\n ),\n GetConnectedAppsRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.getConnectedApps(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->get_connected_apps([\n 'organization_id' => '${organizationId}',\n 'member_id' => '${memberId}',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import GetConnectedAppsRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.get_connected_apps(\n organization_id=\"${organizationId}\",\n member_id=\"${memberId}\",\n method_options=GetConnectedAppsRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.get_connected_apps(\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n method_options: StytchB2B::Organizations::Members::GetConnectedAppsRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::GetConnectedAppsRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.get_connected_apps(\n GetConnectedAppsRequest{\n organization_id: \"${organizationId}\",\n member_id: \"${memberId}\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/members/{member_id}/connected_apps\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members/${memberId}/connected_apps \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id: delete: summary: Deleteexternalid operationId: api_organization_v1_organizations_members_DeleteExternalId tags: - Organizations parameters: - name: organization_id in: path required: true schema: type: string - name: member_id in: path required: true schema: type: string - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_DeleteExternalIdResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n member_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.DeleteExternalId(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.DeleteExternalIDParams{\n\t\tOrganizationID: \"TODO_MISSING_EXAMPLE_VALUE\",\n\t\tMemberID: \"TODO_MISSING_EXAMPLE_VALUE\",\n\t}\n\n\toptions := &members.DeleteExternalIDParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.DeleteExternalID(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteExternalIdRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteExternalIdRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n DeleteExternalIdRequest params = new DeleteExternalIdRequest();\n params.setOrganizationId(\"TODO_MISSING_EXAMPLE_VALUE\");\n params.setMemberId(\"TODO_MISSING_EXAMPLE_VALUE\");\n\n DeleteExternalIdRequestOptions options = new DeleteExternalIdRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().deleteExternalId(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteExternalIdRequest\nimport com.stytch.java.b2b.models.organizationsmembers.DeleteExternalIdRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.deleteExternalId(\n DeleteExternalIdRequest(\n organizationId = \"TODO_MISSING_EXAMPLE_VALUE\",\n memberId = \"TODO_MISSING_EXAMPLE_VALUE\",\n ),\n DeleteExternalIdRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n member_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.deleteExternalId(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->delete_external_id([\n 'organization_id' => 'TODO_MISSING_EXAMPLE_VALUE',\n 'member_id' => 'TODO_MISSING_EXAMPLE_VALUE',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import DeleteExternalIdRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.delete_external_id(\n organization_id=\"TODO_MISSING_EXAMPLE_VALUE\",\n member_id=\"TODO_MISSING_EXAMPLE_VALUE\",\n method_options=DeleteExternalIdRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.delete_external_id(\n organization_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n member_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n method_options: StytchB2B::Organizations::Members::DeleteExternalIdRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::DeleteExternalIdRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.delete_external_id(\n DeleteExternalIdRequest{\n organization_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n member_id: \"TODO_MISSING_EXAMPLE_VALUE\",\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# DELETE /v1/b2b/organizations/{organization_id}/members/{member_id}/external_id\ncurl --request DELETE \\\n --url https://test.stytch.com/v1/b2b/organizations/TODO_MISSING_EXAMPLE_VALUE/members/TODO_MISSING_EXAMPLE_VALUE/external_id \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\"" /v1/b2b/organizations/{organization_id}/members: post: summary: Create operationId: api_organization_v1_organizations_members_Create tags: - Organizations description: Creates a Member. An `organization_id` and `email_address` are required. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_CreateRequest' parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: X-Stytch-Member-Session in: header required: false description: A Stytch session that can be used to run the request with the given member's permissions. schema: type: string - name: X-Stytch-Member-SessionJWT in: header required: false description: A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions. schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_CreateResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// POST /v1/b2b/organizations/{organization_id}/members\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n email_address: \"${email}\",\n external_id: \"my-external-id\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.Organizations.Members.Create(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// POST /v1/b2b/organizations/{organization_id}/members\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/methodoptions\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.CreateParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tEmailAddress: \"${email}\",\n\t\tExternalID: \"my-external-id\",\n\t}\n\n\toptions := &members.CreateParamsOptions{\n\t\tAuthorization: methodoptions.Authorization{\n\t\t\tSessionToken: \"${sessionToken}\",\n\t\t},\n\t}\n\n\tresp, err := client.Organizations.Members.Create(context.Background(), params, options)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// POST /v1/b2b/organizations/{organization_id}/members\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.CreateRequest;\nimport com.stytch.java.b2b.models.organizationsmembers.CreateRequestOptions;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.methodoptions.Authorization;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n CreateRequest params = new CreateRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setEmailAddress(\"${email}\");\n params.setExternalId(\"my-external-id\");\n\n CreateRequestOptions options = new CreateRequestOptions();\n Authorization authorization = new Authorization();\n authorization.setSessionToken(\"${sessionToken}\");\n options.setAuthorization(authorization);\n\n Object result = StytchB2BClient.getOrganizations().getMembers().create(params, options);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// POST /v1/b2b/organizations/{organization_id}/members\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.CreateRequest\nimport com.stytch.java.b2b.models.organizationsmembers.CreateRequestOptions\nimport com.stytch.java.common.methodoptions.Authorization\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.create(\n CreateRequest(\n organizationId = \"${organizationId}\",\n emailAddress = \"${email}\",\n externalId = \"my-external-id\",\n ),\n CreateRequestOptions(\n Authorization(\n sessionToken = \"${sessionToken}\",\n ),\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// POST /v1/b2b/organizations/{organization_id}/members\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n email_address: \"${email}\",\n external_id: \"my-external-id\",\n};\n\nconst options = {\n authorization: {\n session_token: '${sessionToken}',\n },\n};\n\nclient.organizations.members.create(params, options)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->create([\n 'organization_id' => '${organizationId}',\n 'email_address' => '${email}',\n 'external_id' => 'my-external-id',\n], [\n 'authorization' => ['session_token' => '${sessionToken}'],\n\n]);" - lang: python label: Python source: "# POST /v1/b2b/organizations/{organization_id}/members\nfrom stytch import B2BClient\nfrom stytch.b2b.models.organizations_members import CreateRequestOptions\nfrom stytch.shared.method_options import Authorization\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.create(\n organization_id=\"${organizationId}\",\n email_address=\"${email}\",\n external_id=\"my-external-id\",\n method_options=CreateRequestOptions(\n authorization=Authorization(\n session_token=\"${sessionToken}\",\n ),\n ),\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# POST /v1/b2b/organizations/{organization_id}/members\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.create(\n organization_id: \"${organizationId}\",\n email_address: \"${email}\",\n external_id: \"my-external-id\",\n method_options: StytchB2B::Organizations::Members::CreateRequestOptions.new(\n authorization: Stytch::MethodOptions::Authorization.new(session_token: '${sessionToken}')\n )\n)\n\nputs resp" - lang: rust label: Rust source: "// POST /v1/b2b/organizations/{organization_id}/members\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::CreateRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.create(\n CreateRequest{\n organization_id: \"${organizationId}\",\n email_address: \"${email}\",\n external_id: Some(String::from(\"my-external-id\")),\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# POST /v1/b2b/organizations/{organization_id}/members\ncurl --request POST \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/members \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n -H \"X-Stytch-Member-Session: ${sessionToken}\" \\\n -d '{\n \"email_address\": \"${email}\",\n \"external_id\": \"my-external-id\"\n }'" /v1/b2b/organizations/{organization_id}/member: get: summary: Get operationId: api_organization_v1_organizations_members_Get tags: - Organizations description: Get a Member by `member_id` or `email_address`. parameters: - name: organization_id in: path required: true schema: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - name: member_id in: query required: false schema: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - name: email_address in: query required: false schema: type: string description: The email address of the Member. responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/api_organization_v1_organizations_members_GetResponse' '400': description: Bad request '401': description: Unauthorized content: application/json: example: status_code: 401 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: unauthorized_credentials error_message: Unauthorized credentials. error_url: https://stytch.com/docs/api/errors/401 '429': description: Too Many Requests content: application/json: example: status_code: 429 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: too_many_requests error_message: Too many requests have been made. error_url: https://stytch.com/docs/api/errors/429 '500': description: Internal server error content: application/json: example: status_code: 500 request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141 error_type: internal_server_error error_message: Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong. error_url: https://stytch.com/docs/api/errors/500 x-code-samples: - lang: csharp label: C# source: "// GET /v1/b2b/organizations/{organization_id}/member\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n email_address: \"${email}\",\n};\n\nclient.Organizations.Members.Get(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: go label: Go source: "// GET /v1/b2b/organizations/{organization_id}/member\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/b2bstytchapi\"\n\t\"github.com/stytchauth/stytch-go/v17/stytch/b2b/organizations/members\"\n)\n\nfunc main() {\n\tclient, err := b2bstytchapi.NewClient(\n\t\t\"${projectId}\",\n\t\t\"${secret}\",\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"error instantiating client: %v\", err)\n\t}\n\n\tparams := &members.GetParams{\n\t\tOrganizationID: \"${organizationId}\",\n\t\tEmailAddress: \"${email}\",\n\t}\n\n\tresp, err := client.Organizations.Members.Get(context.Background(), params)\n\tif err != nil {\n\t\tlog.Fatalf(\"error in method call: %v\", err)\n\t}\n\n\tlog.Println(resp)\n}\n" - lang: java label: Java source: "// GET /v1/b2b/organizations/{organization_id}/member\npackage com.example;\n\nimport com.stytch.java.b2b.models.organizationsmembers.GetRequest;\nimport com.stytch.java.b2b.StytchB2BClient;\nimport com.stytch.java.common.StytchResult;\n\npublic class Main {\n public static void main(String[] args) {\n StytchB2BClient.configure(\"${projectId}\", \"${secret}\");\n\n GetRequest params = new GetRequest();\n params.setOrganizationId(\"${organizationId}\");\n params.setEmailAddress(\"${email}\");\n\n Object result = StytchB2BClient.getOrganizations().getMembers().get(params);\n if (result instanceof StytchResult.Success) {\n System.out.println(((StytchResult.Success) result).getValue());\n } else {\n System.out.println(((StytchResult.Error) result).getException());\n }\n }\n}" - lang: kotlin label: Kotlin source: "// GET /v1/b2b/organizations/{organization_id}/member\npackage com.example\n\nimport com.stytch.java.b2b.StytchB2BClient\nimport com.stytch.java.b2b.models.organizationsmembers.GetRequest\n\nfun main() {\n StytchB2BClient.configure(\n projectId = \"${projectId}\",\n secret = \"${secret}\",\n )\n\n when (\n val result =\n StytchB2BClient.organizations.members.get(\n GetRequest(\n organizationId = \"${organizationId}\",\n emailAddress = \"${email}\",\n ),\n )\n ) {\n is StytchResult.Success -> println(result.value)\n is StytchResult.Error -> println(result.exception)\n }\n}\n" - lang: javascript label: Node.js source: "// GET /v1/b2b/organizations/{organization_id}/member\nconst stytch = require('stytch');\n\nconst client = new stytch.B2BClient({\n project_id: '${projectId}',\n secret: '${secret}',\n});\n\nconst params = {\n organization_id: \"${organizationId}\",\n email_address: \"${email}\",\n};\n\nclient.organizations.members.get(params)\n .then(resp => { console.log(resp) })\n .catch(err => { console.log(err) });" - lang: php label: PHP source: "$response = $client->organizations->members->get([\n 'organization_id' => '${organizationId}',\n 'email_address' => '${email}',\n]);" - lang: python label: Python source: "# GET /v1/b2b/organizations/{organization_id}/member\nfrom stytch import B2BClient\n\nclient = B2BClient(\n project_id=\"${projectId}\",\n secret=\"${secret}\",\n)\n\nresp = client.organizations.members.get(\n organization_id=\"${organizationId}\",\n email_address=\"${email}\",\n)\n\nprint(resp)\n" - lang: ruby label: Ruby source: "# GET /v1/b2b/organizations/{organization_id}/member\nrequire 'stytch'\n\nclient = StytchB2B::Client.new(\n project_id: \"${projectId}\",\n secret: \"${secret}\"\n)\n\nresp = client.organizations.members.get(\n organization_id: \"${organizationId}\",\n email_address: \"${email}\"\n \n)\n\nputs resp" - lang: rust label: Rust source: "// GET /v1/b2b/organizations/{organization_id}/member\nuse stytch::b2b::client::Client;\nuse stytch::b2b::organizations_members::GetRequest;\n\nfn main() {\n let client = Client::new(\"${projectId}\", \"${secret}\").unwrap();\n let resp = client.organizations.members.get(\n GetRequest{\n organization_id: \"${organizationId}\",\n email_address: Some(String::from(\"${email}\")),\n ..Default::default()\n }\n ).await;\n println!(\"The response is {:?}\", resp);\n}" - lang: bash label: cURL source: "# GET /v1/b2b/organizations/{organization_id}/member\ncurl --request GET \\\n --url https://test.stytch.com/v1/b2b/organizations/${organizationId}/member \\\n -u '${projectId}:${secret}' \\\n -H 'Content-Type: application/json' \\\n --get \\\n --data-urlencode 'email_address=${email}'" components: schemas: api_organization_v1_organizations_members_GetResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_organization_v1_organizations_members_UnlinkRetiredEmailRequest: type: object properties: email_id: type: string description: The globally unique UUID of a Member's email. email_address: type: string description: The email address of the Member. description: Request type api_b2b_scim_v1_IMs: type: object properties: value: type: string type: type: string primary: type: boolean required: - value - type - primary api_organization_v1_OIDCProviderInfo: type: object properties: provider_subject: type: string description: The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols. id_token: type: string description: The `id_token` returned by the OAuth provider. ID Tokens are JWTs that contain structured information about a user. The exact content of each ID Token varies from provider to provider. ID Tokens are returned from OAuth providers that conform to the [OpenID Connect](https://openid.net/foundation/) specification, which is based on OAuth. access_token: type: string description: The `access_token` that you may use to access the User's data in the provider's API. access_token_expires_in: type: integer format: int32 description: The number of seconds until the access token expires. scopes: type: array items: type: string description: The OAuth scopes included for a given provider. See each provider's section above to see which scopes are included by default and how to add custom scopes. connection_id: type: string description: Globally unique UUID that identifies a specific SSO `connection_id` for a Member. refresh_token: type: string description: The `refresh_token` that you may use to obtain a new `access_token` for the User within the provider's API. required: - provider_subject - id_token - access_token - access_token_expires_in - scopes - connection_id api_b2b_scim_v1_SCIMAttributes: type: object properties: user_name: type: string id: type: string external_id: type: string active: type: boolean groups: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_Group' display_name: type: string nick_name: type: string profile_url: type: string user_type: type: string title: type: string preferred_language: type: string locale: type: string timezone: type: string emails: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_Email' phone_numbers: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_PhoneNumber' addresses: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_Address' ims: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_IMs' photos: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_Photo' entitlements: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_Entitlement' roles: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_Role' x509certificates: type: array items: $ref: '#/components/schemas/api_b2b_scim_v1_X509Certificate' name: $ref: '#/components/schemas/api_b2b_scim_v1_Name' enterprise_extension: $ref: '#/components/schemas/api_b2b_scim_v1_EnterpriseExtension' required: - user_name - id - external_id - active - groups - display_name - nick_name - profile_url - user_type - title - preferred_language - locale - timezone - emails - phone_numbers - addresses - ims - photos - entitlements - roles - x509certificates api_organization_v1_organizations_members_CreateResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_organization_v1_MemberRoleSource: type: object properties: type: type: string description: "The type of role assignment. The possible values are:\n \n `direct_assignment` – an explicitly assigned Role.\n\n Directly assigned roles can be updated by passing in the `roles` argument to the\n [Update Member](https://stytch.com/docs/b2b/api/update-member) endpoint.\n \n `email_assignment` – an implicit Role granted by the Member's email domain, regardless of their login method.\n\n Email implicit role assignments can be updated by passing in the `rbac_email_implicit_role_assignments` argument to\n the [Update Organization](https://stytch.com/docs/b2b/api/update-organization) endpoint.\n \n `sso_connection` – an implicit Role granted by the Member's SSO connection. This is currently only available\n for SAML connections and not for OIDC. If the Member has a SAML Member registration with the given connection, this\n role assignment will appear in the list. However, for authorization check purposes (in\n [sessions authenticate](https://stytch.com/docs/b2b/api/authenticate-session) or in any endpoint that enforces RBAC with session\n headers), the Member will only be granted the Role if their session contains an authentication factor with the\n specified SAML connection.\n\n SAML connection implicit role assignments can be updated by passing in the\n `saml_connection_implicit_role_assignments` argument to the\n [Update SAML connection](https://stytch.com/docs/b2b/api/update-saml-connection) endpoint.\n \n `sso_connection_group` – an implicit Role granted by the Member's SSO connection and group. This is currently only\n available for SAML connections and not for OIDC. If the Member has a SAML Member registration with the given\n connection, and belongs to a specific group within the IdP, this role assignment will appear in the list. However,\n for authorization check purposes (in [sessions authenticate](https://stytch.com/docs/b2b/api/authenticate-session) or in any endpoint\n that enforces RBAC with session headers), the Member will only be granted the role if their session contains an\n authentication factor with the specified SAML connection.\n\n SAML group implicit role assignments can be updated by passing in the `saml_group_implicit_role_assignments`\n argument to the [Update SAML connection](https://stytch.com/docs/b2b/api/update-saml-connection) endpoint.\n\n `scim_connection_group` – an implicit Role granted by the Member's SCIM connection and group. If the Member has\n a SCIM Member registration with the given connection, and belongs to a specific group within the IdP, this role assignment will appear in the list.\n\n SCIM group implicit role assignments can be updated by passing in the `scim_group_implicit_role_assignments`\n argument to the [Update SCIM connection](https://stytch.com/docs/b2b/api/update-scim-connection) endpoint.\n " details: type: object additionalProperties: true description: "An object containing additional metadata about the source assignment. The fields will vary depending\n on the role assignment type as follows:\n \n `direct_assignment` – no additional details.\n \n `email_assignment` – will contain the email domain that granted the assignment.\n \n `sso_connection` – will contain the `connection_id` of the SAML connection that granted the assignment.\n \n `sso_connection_group` – will contain the `connection_id` of the SAML connection and the name of the `group`\n that granted the assignment.\n \n `scim_connection_group` – will contain the `connection_id` of the SAML connection and the `group_id`\n that granted the assignment.\n " required: - type api_b2b_scim_v1_Entitlement: type: object properties: value: type: string type: type: string primary: type: boolean required: - value - type - primary api_b2b_scim_v1_X509Certificate: type: object properties: value: type: string type: type: string primary: type: boolean required: - value - type - primary api_organization_v1_StartEmailUpdateRequestLocale: type: string enum: - en - es - pt-br - fr api_organization_v1_organizations_members_StartEmailUpdateRequest: type: object properties: email_address: type: string description: The new email address for the Member. login_redirect_url: type: string description: "The URL that the Member clicks from the login Email Magic Link. This URL should be an endpoint in the backend server that\n verifies the request by querying Stytch's authenticate endpoint and finishes the login. If this value is not passed, the default login\n redirect URL that you set in your Dashboard is used. If you have not set a default login redirect URL, an error is returned." locale: $ref: '#/components/schemas/api_organization_v1_StartEmailUpdateRequestLocale' description: 'Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! ' login_template_id: type: string description: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”. delivery_method: $ref: '#/components/schemas/api_organization_v1_StartEmailUpdateRequestDeliveryMethod' description: The method that should be used to verify a member's new email address. The options are `EMAIL_MAGIC_LINK` or `EMAIL_OTP`. This field is optional, if no value is provided, `EMAIL_MAGIC_LINK` will be used. description: Request type required: - email_address api_organization_v1_SCIMRegistration: type: object properties: connection_id: type: string description: The ID of the SCIM connection. registration_id: type: string description: The unique ID of a SCIM Registration. external_id: type: string description: The ID of the member given by the identity provider. scim_attributes: $ref: '#/components/schemas/api_b2b_scim_v1_SCIMAttributes' description: An object for storing SCIM attributes brought over from the identity provider. required: - connection_id - registration_id api_b2b_scim_v1_Email: type: object properties: value: type: string type: type: string primary: type: boolean required: - value - type - primary api_organization_v1_organizations_members_StartEmailUpdateResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_organization_v1_MemberConnectedApp: type: object properties: connected_app_id: type: string description: The ID of the Connected App. name: type: string description: The name of the Connected App. description: type: string description: A description of the Connected App. client_type: type: string description: The type of Connected App. Supported values are `first_party`, `first_party_public`, `third_party`, and `third_party_public`. scopes_granted: type: string description: The scopes granted to the Connected App at the completion of the last authorization flow. logo_url: type: string description: The logo URL of the Connected App, if any. required: - connected_app_id - name - description - client_type - scopes_granted api_organization_v1_organizations_members_UnlinkRetiredEmailResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. organization_id: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - organization_id - member - organization - status_code api_organization_v1_organizations_members_ReactivateResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_organization_v1_Organization: type: object properties: organization_id: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. organization_name: type: string description: The name of the Organization. Must be between 1 and 128 characters in length. organization_logo_url: type: string description: The image URL of the Organization logo. organization_slug: type: string description: 'The unique URL slug of the Organization. The slug only accepts alphanumeric characters and the following reserved characters: `-` `.` `_` `~`. Must be between 2 and 128 characters in length. Wherever an organization_id is expected in a path or request parameter, you may also use the organization_slug as a convenience.' sso_jit_provisioning: type: string description: "The authentication setting that controls the JIT provisioning of Members when authenticating via SSO. The accepted values are:\n \n `ALL_ALLOWED` – the default setting, new Members will be automatically provisioned upon successful authentication via any of the Organization's `sso_active_connections`.\n \n `RESTRICTED` – only new Members with SSO logins that comply with `sso_jit_provisioning_allowed_connections` can be provisioned upon authentication.\n \n `NOT_ALLOWED` – disable JIT provisioning via SSO.\n " sso_jit_provisioning_allowed_connections: type: array items: type: string description: "An array of `connection_id`s that reference [SAML Connection objects](https://stytch.com/docs/b2b/api/saml-connection-object).\n Only these connections will be allowed to JIT provision Members via SSO when `sso_jit_provisioning` is set to `RESTRICTED`." sso_active_connections: type: array items: $ref: '#/components/schemas/api_organization_v1_ActiveSSOConnection' description: An array of active [SAML Connection references](https://stytch.com/docs/b2b/api/saml-connection-object) or [OIDC Connection references](https://stytch.com/docs/b2b/api/oidc-connection-object). email_allowed_domains: type: array items: type: string description: "An array of email domains that allow invites or JIT provisioning for new Members. This list is enforced when either `email_invites` or `email_jit_provisioning` is set to `RESTRICTED`.\n \n \n Common domains such as `gmail.com` are not allowed. See the [common email domains resource](https://stytch.com/docs/b2b/api/common-email-domains) for the full list." email_jit_provisioning: type: string description: "The authentication setting that controls how a new Member can be provisioned by authenticating via Email Magic Link or OAuth. The accepted values are:\n \n `RESTRICTED` – only new Members with verified emails that comply with `email_allowed_domains` can be provisioned upon authentication via Email Magic Link or OAuth.\n \n `NOT_ALLOWED` – the default setting, disables JIT provisioning via Email Magic Link and OAuth.\n " email_invites: type: string description: "The authentication setting that controls how a new Member can be invited to an organization by email. The accepted values are:\n \n `ALL_ALLOWED` – any new Member can be invited to join via email.\n \n `RESTRICTED` – only new Members with verified emails that comply with `email_allowed_domains` can be invited via email.\n \n `NOT_ALLOWED` – disable email invites.\n " auth_methods: type: string description: "The setting that controls which authentication methods can be used by Members of an Organization. The accepted values are:\n \n `ALL_ALLOWED` – the default setting which allows all authentication methods to be used.\n \n `RESTRICTED` – only methods that comply with `allowed_auth_methods` can be used for authentication. This setting does not apply to Members with `is_breakglass` set to `true`.\n " allowed_auth_methods: type: array items: type: string description: "An array of allowed authentication methods. This list is enforced when `auth_methods` is set to `RESTRICTED`.\n The list's accepted values are: `sso`, `magic_link`, `email_otp`, `password`, `google_oauth`, `microsoft_oauth`, `slack_oauth`, `github_oauth`, and `hubspot_oauth`.\n " mfa_policy: type: string description: "The setting that controls the MFA policy for all Members in the Organization. The accepted values are:\n \n `REQUIRED_FOR_ALL` – All Members within the Organization will be required to complete MFA every time they wish to log in. However, any active Session that existed prior to this setting change will remain valid.\n \n `OPTIONAL` – The default value. The Organization does not require MFA by default for all Members. Members will be required to complete MFA only if their `mfa_enrolled` status is set to true.\n " rbac_email_implicit_role_assignments: type: array items: $ref: '#/components/schemas/api_organization_v1_EmailImplicitRoleAssignment' description: "Implicit role assignments based off of email domains.\n For each domain-Role pair, all Members whose email addresses have the specified email domain will be granted the\n associated Role, regardless of their login method. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment)\n for more information about role assignment." mfa_methods: type: string description: "The setting that controls which MFA methods can be used by Members of an Organization. The accepted values are:\n \n `ALL_ALLOWED` – the default setting which allows all authentication methods to be used.\n \n `RESTRICTED` – only methods that comply with `allowed_mfa_methods` can be used for authentication. This setting does not apply to Members with `is_breakglass` set to `true`.\n " allowed_mfa_methods: type: array items: type: string description: "An array of allowed MFA authentication methods. This list is enforced when `mfa_methods` is set to `RESTRICTED`.\n The list's accepted values are: `sms_otp` and `totp`.\n " oauth_tenant_jit_provisioning: type: string description: "The authentication setting that controls how a new Member can JIT provision into an organization by tenant. The accepted values are:\n \n `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.\n \n `NOT_ALLOWED` – the default setting, disables JIT provisioning by OAuth Tenant.\n " claimed_email_domains: type: array items: type: string description: A list of email domains that are claimed by the Organization. first_party_connected_apps_allowed_type: type: string description: "The authentication setting that sets the Organization's policy towards first party Connected Apps. The accepted values are:\n \n `ALL_ALLOWED` – the default setting, any first party Connected App in the Project is permitted for use by Members.\n \n `RESTRICTED` – only first party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.\n \n `NOT_ALLOWED` – no first party Connected Apps are permitted.\n " allowed_first_party_connected_apps: type: array items: type: string description: An array of first party Connected App IDs that are allowed for the Organization. Only used when the Organization's `first_party_connected_apps_allowed_type` is `RESTRICTED`. third_party_connected_apps_allowed_type: type: string description: "The authentication setting that sets the Organization's policy towards third party Connected Apps. The accepted values are:\n \n `ALL_ALLOWED` – the default setting, any third party Connected App in the Project is permitted for use by Members.\n \n `RESTRICTED` – only third party Connected Apps with IDs in `allowed_first_party_connected_apps` can be used by Members.\n \n `NOT_ALLOWED` – no third party Connected Apps are permitted.\n " allowed_third_party_connected_apps: type: array items: type: string description: An array of third party Connected App IDs that are allowed for the Organization. Only used when the Organization's `third_party_connected_apps_allowed_type` is `RESTRICTED`. custom_roles: type: array items: $ref: '#/components/schemas/api_organization_v1_CustomRole' trusted_metadata: type: object additionalProperties: true description: An arbitrary JSON object for storing application-specific data or identity-provider-specific data. created_at: type: string description: The timestamp of the Organization's creation. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. updated_at: type: string description: The timestamp of when the Organization was last updated. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. organization_external_id: type: string description: A unique identifier for the organization. sso_default_connection_id: type: string description: The default connection used for SSO when there are multiple active connections. scim_active_connection: $ref: '#/components/schemas/api_organization_v1_ActiveSCIMConnection' description: An active [SCIM Connection references](https://stytch.com/docs/b2b/api/scim-connection-object). allowed_oauth_tenants: type: object additionalProperties: true description: A map of allowed OAuth tenants. If this field is not passed in, the Organization will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack", "hubspot", and "github". required: - organization_id - organization_name - organization_logo_url - organization_slug - sso_jit_provisioning - sso_jit_provisioning_allowed_connections - sso_active_connections - email_allowed_domains - email_jit_provisioning - email_invites - auth_methods - allowed_auth_methods - mfa_policy - rbac_email_implicit_role_assignments - mfa_methods - allowed_mfa_methods - oauth_tenant_jit_provisioning - claimed_email_domains - first_party_connected_apps_allowed_type - allowed_first_party_connected_apps - third_party_connected_apps_allowed_type - allowed_third_party_connected_apps - custom_roles api_organization_v1_organizations_members_UpdateResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_organization_v1_EmailImplicitRoleAssignment: type: object properties: domain: type: string description: Email domain that grants the specified Role. role_id: type: string description: "The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable.\n\n Reserved `role_id`s that are predefined by Stytch include:\n\n * `stytch_member`\n * `stytch_admin`\n\n Check out the [guide on Stytch default Roles](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more detailed explanation.\n\n " required: - domain - role_id api_organization_v1_ResultsMetadata: type: object properties: total: type: integer format: int32 description: The total number of results returned by your search query. If totals have been disabled for your Stytch Workspace to improve search performance, the value will always be -1. next_cursor: type: string description: The `next_cursor` string is returned when your search result contains more than one page of results. This value is passed into your next search call in the `cursor` field. required: - total api_organization_v1_organizations_members_DeleteExternalIdResponse: type: object properties: request_id: type: string member_id: type: string member: $ref: '#/components/schemas/api_organization_v1_Member' organization: $ref: '#/components/schemas/api_organization_v1_Organization' status_code: type: integer format: int32 required: - request_id - member_id - member - organization - status_code api_organization_v1_organizations_members_ReactivateRequest: type: object properties: {} description: Request type api_organization_v1_organizations_members_DeleteTOTPResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_organization_v1_organizations_members_SearchResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. members: type: array items: $ref: '#/components/schemas/api_organization_v1_Member' description: An array of [Member objects](https://stytch.com/docs/b2b/api/member-object). results_metadata: $ref: '#/components/schemas/api_organization_v1_ResultsMetadata' description: The search `results_metadata` object contains metadata relevant to your specific query like `total` and `next_cursor`. organizations: type: object additionalProperties: $ref: '#/components/schemas/api_organization_v1_Organization' status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - members - results_metadata - organizations - status_code api_organization_v1_CustomRole: type: object properties: role_id: type: string description: type: string permissions: type: array items: $ref: '#/components/schemas/api_organization_v1_CustomRolePermission' required: - role_id - description - permissions api_organization_v1_organizations_members_OIDCProvidersResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. registrations: type: array items: $ref: '#/components/schemas/api_organization_v1_OIDCProviderInfo' description: A list of tokens the member is registered with. status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - registrations - status_code api_organization_v1_ActiveSSOConnection: type: object properties: connection_id: type: string description: Globally unique UUID that identifies a specific SSO `connection_id` for a Member. display_name: type: string description: A human-readable display name for the connection. identity_provider: type: string required: - connection_id - display_name - identity_provider api_organization_v1_SearchQuery: type: object properties: operator: $ref: '#/components/schemas/api_organization_v1_SearchQueryOperator' description: "The action to perform on the operands. The accepted values are:\n\n `AND` – all the operand values provided must match.\n\n `OR` – **[DEPRECATED]** the operator will return any matches to at least one of the operand values you supply. This parameter is retained for legacy use cases only and is no longer supported. We strongly recommend breaking down complex queries into multiple search queries instead." operands: type: array items: type: object additionalProperties: true description: An array of operand objects that contains all of the filters and values to apply to your search query. required: - operator - operands api_organization_v1_SearchQueryOperator: type: string enum: - OR - AND api_b2b_scim_v1_Manager: type: object properties: value: type: string ref: type: string display_name: type: string required: - value - ref - display_name api_organization_v1_StartEmailUpdateRequestDeliveryMethod: type: string enum: - EMAIL_MAGIC_LINK - EMAIL_OTP api_b2b_scim_v1_Role: type: object properties: value: type: string type: type: string primary: type: boolean required: - value - type - primary api_b2b_scim_v1_PhoneNumber: type: object properties: value: type: string type: type: string primary: type: boolean required: - value - type - primary api_organization_v1_organizations_members_UpdateRequest: type: object properties: name: type: string description: 'The name of the Member. If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.info.name` action on the `stytch.member` Resource. Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.info.name` action on the `stytch.self` Resource.' trusted_metadata: type: object additionalProperties: true description: "An arbitrary JSON object for storing application-specific data or identity-provider-specific data.\n If a session header is passed into the request, this field may **not** be passed into the request. You cannot\n update trusted metadata when acting as a Member." untrusted_metadata: type: object additionalProperties: true description: "An arbitrary JSON object of application-specific data. These fields can be edited directly by the\n frontend SDK, and should not be used to store critical information. See the [Metadata resource](https://stytch.com/docs/b2b/api/metadata)\n for complete field behavior details.\n\nIf this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.info.untrusted-metadata` action on the `stytch.member` Resource. Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.info.untrusted-metadata` action on the `stytch.self` Resource." is_breakglass: type: boolean description: 'Identifies the Member as a break glass user - someone who has permissions to authenticate into an Organization by bypassing the Organization''s settings. A break glass account is typically used for emergency purposes to gain access outside of normal authentication procedures. Refer to the [Organization object](https://stytch.com/docs/b2b/api/organization-object) and its `auth_methods` and `allowed_auth_methods` fields for more details. If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.is-breakglass` action on the `stytch.member` Resource.' mfa_phone_number: type: string description: 'Sets the Member''s phone number. Throws an error if the Member already has a phone number. To change the Member''s phone number, use the [Delete member phone number endpoint](https://stytch.com/docs/b2b/api/delete-member-mfa-phone-number) to delete the Member''s existing phone number first. If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.info.mfa-phone` action on the `stytch.member` Resource. Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.info.mfa-phone` action on the `stytch.self` Resource.' mfa_enrolled: type: boolean description: 'Sets whether the Member is enrolled in MFA. If true, the Member must complete an MFA step whenever they wish to log in to their Organization. If false, the Member only needs to complete an MFA step if the Organization''s MFA policy is set to `REQUIRED_FOR_ALL`. If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.mfa-enrolled` action on the `stytch.member` Resource. Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.settings.mfa-enrolled` action on the `stytch.self` Resource.' roles: type: array items: type: string description: "Roles to explicitly assign to this Member.\n Will completely replace any existing explicitly assigned roles. See the\n [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment.\n\n If a Role is removed from a Member, and the Member is also implicitly assigned this Role from an SSO connection\n or an SSO group, we will by default revoke any existing sessions for the Member that contain any SSO\n authentication factors with the affected connection ID. You can preserve these sessions by passing in the\n `preserve_existing_sessions` parameter with a value of `true`.\n\nIf this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.roles` action on the `stytch.member` Resource." preserve_existing_sessions: type: boolean description: "Whether to preserve existing sessions when explicit Roles that are revoked are also implicitly assigned\n by SSO connection or SSO group. Defaults to `false` - that is, existing Member Sessions that contain SSO\n authentication factors with the affected SSO connection IDs will be revoked." default_mfa_method: type: string description: 'The Member''s default MFA method. This value is used to determine which secondary MFA method to use in the case of multiple methods registered for a Member. The current possible values are `sms_otp` and `totp`. If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.default-mfa-method` action on the `stytch.member` Resource. Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.settings.default-mfa-method` action on the `stytch.self` Resource.' email_address: type: string description: "Updates the Member's `email_address`, if provided. This will clear any existing passwords and require re-verification of the new email address.\n If a Member's email address is changed, other Members in the same Organization cannot use the old email address, although the Member may update back to their old email address.\n A Member's email address can only be useable again by other Members if the Member is deleted.\n\nIf this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.info.email` action on the `stytch.member` Resource. Members cannot update their own email address." external_id: type: string description: An identifier that can be used in most API calls where a `member_id` is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters. External IDs must be unique within an organization, but may be reused across different organizations in the same project. unlink_email: type: boolean description: If `unlink_email` is `true` and an `email_address` is provided, the Member's previous email will be deleted instead of retired. Defaults to `false`. description: Request type api_organization_v1_OAuthRegistration: type: object properties: provider_type: type: string description: Denotes the OAuth identity provider that the user has authenticated with, e.g. Google, Microsoft, GitHub etc. provider_subject: type: string description: The unique identifier for the User within a given OAuth provider. Also commonly called the `sub` or "Subject field" in OAuth protocols. member_oauth_registration_id: type: string description: The unique ID of an OAuth registration. profile_picture_url: type: string description: If available, the `profile_picture_url` is a URL of the User's profile picture set in OAuth identity the provider that the User has authenticated with, e.g. Google profile picture. locale: type: string description: If available, the `locale` is the Member's locale set in the OAuth identity provider that the user has authenticated with. required: - provider_type - provider_subject - member_oauth_registration_id api_organization_v1_CustomRolePermission: type: object properties: resource_id: type: string actions: type: array items: type: string required: - resource_id - actions api_organization_v1_ActiveSCIMConnection: type: object properties: connection_id: type: string description: The ID of the SCIM connection. display_name: type: string description: A human-readable display name for the connection. bearer_token_last_four: type: string bearer_token_expires_at: type: string required: - connection_id - display_name - bearer_token_last_four api_organization_v1_organizations_members_DeleteMFAPhoneNumberResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_organization_v1_organizations_members_CreateRequest: type: object properties: email_address: type: string description: The email address of the Member. name: type: string description: The name of the Member. trusted_metadata: type: object additionalProperties: true description: An arbitrary JSON object for storing application-specific data or identity-provider-specific data. untrusted_metadata: type: object additionalProperties: true description: "An arbitrary JSON object of application-specific data. These fields can be edited directly by the\n frontend SDK, and should not be used to store critical information. See the [Metadata resource](https://stytch.com/docs/b2b/api/metadata)\n for complete field behavior details." create_member_as_pending: type: boolean description: Flag for whether or not to save a Member as `pending` or `active` in Stytch. It defaults to false. If true, new Members will be created with status `pending` in Stytch's backend. Their status will remain `pending` and they will continue to receive signup email templates for every Email Magic Link until that Member authenticates and becomes `active`. If false, new Members will be created with status `active`. is_breakglass: type: boolean description: Identifies the Member as a break glass user - someone who has permissions to authenticate into an Organization by bypassing the Organization's settings. A break glass account is typically used for emergency purposes to gain access outside of normal authentication procedures. Refer to the [Organization object](https://stytch.com/docs/b2b/api/organization-object) and its `auth_methods` and `allowed_auth_methods` fields for more details. mfa_phone_number: type: string description: The Member's phone number. A Member may only have one phone number. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). mfa_enrolled: type: boolean description: Sets whether the Member is enrolled in MFA. If true, the Member must complete an MFA step whenever they wish to log in to their Organization. If false, the Member only needs to complete an MFA step if the Organization's MFA policy is set to `REQUIRED_FOR_ALL`. roles: type: array items: type: string description: "Roles to explicitly assign to this Member. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment)\n for more information about role assignment." external_id: type: string description: An identifier that can be used in most API calls where a `member_id` is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters. External IDs must be unique within an organization, but may be reused across different organizations in the same project. description: Request type required: - email_address api_organization_v1_organizations_members_SearchRequest: type: object properties: organization_ids: type: array items: type: string description: An array of organization_ids. At least one value is required. cursor: type: string description: The `cursor` field allows you to paginate through your results. Each result array is limited to 1000 results. If your query returns more than 1000 results, you will need to paginate the responses using the `cursor`. If you receive a response that includes a non-null `next_cursor` in the `results_metadata` object, repeat the search call with the `next_cursor` value set to the `cursor` field to retrieve the next page of results. Continue to make search calls until the `next_cursor` in the response is null. limit: type: integer format: int32 minimum: 0 description: The number of search results to return per page. The default limit is 100. A maximum of 1000 results can be returned by a single search request. If the total size of your result set is greater than one page size, you must paginate the response. See the `cursor` field. query: $ref: '#/components/schemas/api_organization_v1_SearchQuery' description: The optional query object contains the operator, i.e. `AND` or `OR`, and the operands that will filter your results. Only an operator is required. If you include no operands, no filtering will be applied. If you include no query object, it will return all Members with no filtering applied. description: Request type required: - organization_ids api_organization_v1_SSORegistration: type: object properties: connection_id: type: string description: Globally unique UUID that identifies a specific SSO `connection_id` for a Member. external_id: type: string description: The ID of the member given by the identity provider. registration_id: type: string description: The unique ID of an SSO Registration. sso_attributes: type: object additionalProperties: true description: An object for storing SSO attributes brought over from the identity provider. required: - connection_id - external_id - registration_id api_organization_v1_organizations_members_DeletePasswordResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. member: $ref: '#/components/schemas/api_organization_v1_Member' description: The [Member object](https://stytch.com/docs/b2b/api/member-object) organization: $ref: '#/components/schemas/api_organization_v1_Organization' description: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - member - organization - status_code api_b2b_scim_v1_EnterpriseExtension: type: object properties: employee_number: type: string cost_center: type: string division: type: string department: type: string organization: type: string manager: $ref: '#/components/schemas/api_b2b_scim_v1_Manager' required: - employee_number - cost_center - division - department - organization api_organization_v1_Member: type: object properties: organization_id: type: string description: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. member_id: type: string description: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. email_address: type: string description: The email address of the Member. status: type: string description: 'The status of the Member. The possible values are: `pending`, `invited`, `active`, or `deleted`.' name: type: string description: The name of the Member. sso_registrations: type: array items: $ref: '#/components/schemas/api_organization_v1_SSORegistration' description: An array of registered [SAML Connection](https://stytch.com/docs/b2b/api/saml-connection-object) or [OIDC Connection](https://stytch.com/docs/b2b/api/oidc-connection-object) objects the Member has authenticated with. is_breakglass: type: boolean description: Identifies the Member as a break glass user - someone who has permissions to authenticate into an Organization by bypassing the Organization's settings. A break glass account is typically used for emergency purposes to gain access outside of normal authentication procedures. Refer to the [Organization object](https://stytch.com/docs/b2b/api/organization-object) and its `auth_methods` and `allowed_auth_methods` fields for more details. member_password_id: type: string description: Globally unique UUID that identifies a Member's password. oauth_registrations: type: array items: $ref: '#/components/schemas/api_organization_v1_OAuthRegistration' description: A list of OAuth registrations for this member. email_address_verified: type: boolean description: Whether or not the Member's email address is verified. mfa_phone_number_verified: type: boolean description: Whether or not the Member's phone number is verified. is_admin: type: boolean description: "Whether or not the Member has the `stytch_admin` Role. This Role is automatically granted to Members\n who create an Organization through the [discovery flow](https://stytch.com/docs/b2b/api/create-organization-via-discovery). See the\n [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for more details on this Role." totp_registration_id: type: string description: Globally unique UUID that identifies a TOTP instance. retired_email_addresses: type: array items: $ref: '#/components/schemas/api_organization_v1_RetiredEmail' description: "\n A list of retired email addresses for this member.\n A previously active email address can be marked as retired in one of two ways:\n - It's replaced with a new primary email address during an explicit Member update.\n - A new email address is surfaced by an OAuth, SAML or OIDC provider. In this case the new email address becomes the\n Member's primary email address and the old primary email address is retired.\n \n A retired email address cannot be used by other Members in the same Organization. However, unlinking retired email\n addresses allows them to be subsequently re-used by other Organization Members. Retired email addresses can be unlinked\n using the [Unlink Retired Email endpoint](https://stytch.com/docs/b2b/api/unlink-retired-member-email).\n " is_locked: type: boolean description: Whether the Member is temporarily locked due to too many failed authentication attempts. See the [User Locking Guide](https://stytch.com/docs/resources/platform/user-locks) for more information. mfa_enrolled: type: boolean description: Sets whether the Member is enrolled in MFA. If true, the Member must complete an MFA step whenever they wish to log in to their Organization. If false, the Member only needs to complete an MFA step if the Organization's MFA policy is set to `REQUIRED_FOR_ALL`. mfa_phone_number: type: string description: The Member's phone number. A Member may only have one phone number. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). default_mfa_method: type: string description: The Member's default MFA method. This value is used to determine which secondary MFA method to use in the case of multiple methods registered for a Member. The current possible values are `sms_otp` and `totp`. roles: type: array items: $ref: '#/components/schemas/api_organization_v1_MemberRole' description: "Explicit or implicit Roles assigned to this Member, along with details about the role assignment source.\n See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment." trusted_metadata: type: object additionalProperties: true description: An arbitrary JSON object for storing application-specific data or identity-provider-specific data. untrusted_metadata: type: object additionalProperties: true description: "An arbitrary JSON object of application-specific data. These fields can be edited directly by the\n frontend SDK, and should not be used to store critical information. See the [Metadata resource](https://stytch.com/docs/b2b/api/metadata)\n for complete field behavior details." created_at: type: string description: The timestamp of the Member's creation. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. updated_at: type: string description: The timestamp of when the Member was last updated. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. scim_registration: $ref: '#/components/schemas/api_organization_v1_SCIMRegistration' description: A scim member registration, referencing a [SCIM Connection](https://stytch.com/docs/b2b/api/scim-connection-object) object in use for the Member creation. external_id: type: string description: The ID of the member given by the identity provider. lock_created_at: type: string description: When the member lock was created, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. lock_expires_at: type: string description: When the member lock expires, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. required: - organization_id - member_id - email_address - status - name - sso_registrations - is_breakglass - member_password_id - oauth_registrations - email_address_verified - mfa_phone_number_verified - is_admin - totp_registration_id - retired_email_addresses - is_locked - mfa_enrolled - mfa_phone_number - default_mfa_method - roles api_b2b_scim_v1_Address: type: object properties: formatted: type: string street_address: type: string locality: type: string region: type: string postal_code: type: string country: type: string type: type: string primary: type: boolean required: - formatted - street_address - locality - region - postal_code - country - type - primary api_organization_v1_RetiredEmail: type: object properties: email_id: type: string description: The globally unique UUID of a Member's email. email_address: type: string description: The email address of the Member. required: - email_id - email_address api_organization_v1_MemberRole: type: object properties: role_id: type: string description: "The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable.\n\n Reserved `role_id`s that are predefined by Stytch include:\n\n * `stytch_member`\n * `stytch_admin`\n\n Check out the [guide on Stytch default Roles](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more detailed explanation.\n\n " sources: type: array items: $ref: '#/components/schemas/api_organization_v1_MemberRoleSource' description: A list of sources for this role assignment. A role assignment can come from multiple sources - for example, the Role could be both explicitly assigned and implicitly granted from the Member's email domain. required: - role_id - sources api_b2b_scim_v1_Group: type: object properties: value: type: string display: type: string required: - value - display api_organization_v1_organizations_members_GetConnectedAppsResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. connected_apps: type: array items: $ref: '#/components/schemas/api_organization_v1_MemberConnectedApp' description: An array of Connected Apps with which the Member has successfully completed an authorization flow. status_code: type: integer format: int32 required: - request_id - connected_apps - status_code api_organization_v1_organizations_members_DeleteResponse: type: object properties: request_id: type: string description: Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. member_id: type: string description: Globally unique UUID that identifies a specific Member. status_code: type: integer format: int32 description: The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. required: - request_id - member_id - status_code api_b2b_scim_v1_Photo: type: object properties: value: type: string type: type: string primary: type: boolean required: - value - type - primary api_b2b_scim_v1_Name: type: object properties: formatted: type: string family_name: type: string given_name: type: string middle_name: type: string honorific_prefix: type: string honorific_suffix: type: string required: - formatted - family_name - given_name - middle_name - honorific_prefix - honorific_suffix securitySchemes: basicAuth: type: http scheme: basic