arazzo: 1.0.1 info: title: Anthropic Onboard an Org Member into a Workspace summary: Find an org member by email, create a workspace, and add that member to it. description: >- An end-to-end onboarding flow across the Admin API. The workflow looks up an existing organization member by email, creates a fresh workspace, and adds the resolved member to that workspace with a chosen role. Every step spells out its request inline — including the inline admin x-api-key and anthropic-version headers the spec defines — so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: adminApi url: ../openapi/anthropic-admin-api-openapi.yml type: openapi workflows: - workflowId: onboard-member-to-workspace summary: Resolve an org member by email and place them into a new workspace. description: >- Lists organization members filtered by email to resolve a user id, creates a workspace, and adds the resolved member to the workspace. inputs: type: object required: - adminApiKey - email - workspaceName - workspaceRole properties: adminApiKey: type: string description: An Anthropic Admin API key (starts with sk-ant-admin...) sent in x-api-key. email: type: string description: The email of the existing organization member to onboard. workspaceName: type: string description: Name for the new workspace (1 to 40 characters). workspaceRole: type: string description: >- Role to grant in the workspace: workspace_user, workspace_developer, workspace_admin, or workspace_billing. steps: - stepId: findMember description: >- Look up the organization member by email to resolve the user id needed to add them to a workspace. operationId: listOrganizationMembers parameters: - name: x-api-key in: header value: $inputs.adminApiKey - name: anthropic-version in: header value: "2023-06-01" - name: email in: query value: $inputs.email - name: limit in: query value: 1 successCriteria: - condition: $statusCode == 200 outputs: memberUserId: $response.body#/data/0/id onSuccess: - name: memberFound type: goto stepId: createWorkspace criteria: - context: $response.body condition: $.data.length > 0 type: jsonpath - name: memberMissing type: end criteria: - context: $response.body condition: $.data.length == 0 type: jsonpath - stepId: createWorkspace description: >- Create a new workspace to onboard the resolved member into. operationId: createWorkspace parameters: - name: x-api-key in: header value: $inputs.adminApiKey - name: anthropic-version in: header value: "2023-06-01" requestBody: contentType: application/json payload: name: $inputs.workspaceName successCriteria: - condition: $statusCode == 200 outputs: workspaceId: $response.body#/id - stepId: addMember description: >- Add the resolved organization member to the new workspace with the requested role. operationId: addWorkspaceMember parameters: - name: x-api-key in: header value: $inputs.adminApiKey - name: anthropic-version in: header value: "2023-06-01" - name: workspace_id in: path value: $steps.createWorkspace.outputs.workspaceId requestBody: contentType: application/json payload: user_id: $steps.findMember.outputs.memberUserId workspace_role: $inputs.workspaceRole successCriteria: - condition: $statusCode == 200 outputs: memberUserId: $response.body#/user_id memberRole: $response.body#/workspace_role outputs: workspaceId: $steps.createWorkspace.outputs.workspaceId memberUserId: $steps.addMember.outputs.memberUserId memberRole: $steps.addMember.outputs.memberRole