Stytch Organizations API

The Organizations API from Stytch — 14 operation(s) for organizations.

OpenAPI Specification

stytch-organizations-api-openapi.yml Raw ↑
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=\"${

# --- truncated at 32 KB (230 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stytch/refs/heads/main/openapi/stytch-organizations-api-openapi.yml