Tradeshift Dx Category Users Memberships API

The dx-category--users-memberships API from Tradeshift — 9 operation(s) for dx-category--users-memberships.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Identity & Access Management BC-620.20

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

DELETE /rest/external/account/members/{userId} Remove a user from the company account · remove user #
Ask an LLM
“How do I remove a user from my company account?”
“Can I remove a user who still belongs to the account?”
Tell an agent destructive · confirm first
Remove user {userId} from the company account.
Delete user {userId} from the account.
PUT /rest/external/account/users/{userId}/role Replace a user's role in the account · replace roles #
Ask an LLM
“How do I change a user's role in the company account?”
“Does replacing a user's role delete their other memberships?”
Tell an agent
Replace the role of user {userId} in the account.
Set a new role for user {userId} in the company account.
PUT /rest/external/account/users/{userId}/state Set a user's state · set user state #
Ask an LLM
“How do I set the state of a user in the account?”
“Can I change a user's state to inactive?”
Tell an agent
Set the state of user {userId}.
Change user {userId}'s account state.
GET /rest/external/usergroups List user groups · Find user groups by query string #
Ask an LLM
“Which user groups does a user have access to?”
“Can I search user groups by name or state?”
Tell an agent
List user groups matching {query}.
Show user groups with state {state}.
GET /rest/external/users/{userId}/branches List branches a user belongs to · List of current company branches where the specified user is a member #
Ask an LLM
“Which branches is a user a member of?”
“What company branches does a user belong to?”
Tell an agent
List branches user {userId} belongs to.
Show all branches where user {userId} is a member.
GET /rest/external/users/{userId}/current/branches List branches from the user's current branch down · List of current company branches starting from current branch where the… #
Ask an LLM
“Which branches sit under the user's current branch?”
“Can I see the branch hierarchy starting at the user's current branch?”
Tell an agent
List branches from user {userId}'s current branch down.
Show the branch hierarchy under user {userId}'s current branch.
DELETE /rest/external/users/{userId}/memberships/{groupId} Remove a user from a group · remove user membership #
Ask an LLM
“How do I remove a user from a security group?”
“Can I take a user out of one group without affecting other memberships?”
Tell an agent destructive · confirm first
Remove user {userId} from group {groupId}.
Drop user {userId}'s membership in group {groupId}.
PUT /rest/external/users/{userId}/overridingcompanyaccountid Set a user's home company environment · Change home branch for a user #
Ask an LLM
“How do I make a user see a different company when they log in?”
“Does the requester's company need to be an ancestor of the user's company?”
Tell an agent
Set the home company environment of user {userId}.
Make {userId} display the company they belong to after logging in.
PUT /rest/external/users/{userId}/primarybranch/{newGroupId} Change a user's primary group · Change current primary group and remove old primary group membership #
Ask an LLM
“How do I make a user a member of a new primary group?”
“Can I remove a user's old primary group membership when changing it?”
Tell an agent
Make user {userId} a member of group {newGroupId} as their primary group.
Change user {userId}'s primary group to {newGroupId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tradeshift:tradeshift-dx-category-users-memberships-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tradeshift-dx-category-users-memberships-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tradeshift External Dx Category Users Memberships API
  version: 1.0.0
servers:
- url: https://api.tradeshift.com/tradeshift
tags:
- name: dx-category--users-memberships
paths:
  /rest/external/account/members/{userId}:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: UUID identifier of user account.
    delete:
      responses:
        '204':
          description: ''
      description: Remove a member from the current company account. Users who belong to the account (have the account's CompanyAccountId) cannot be removed.
      operationId: delete-rest-external-account-members-userid
      x-annotation-dx-category: users-memberships
      summary: remove user
      tags:
      - dx-category--users-memberships
  /rest/external/account/users/{userId}/role:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: UUID identifier of user account.
    put:
      responses:
        '204':
          description: ''
        '403':
          description: ''
      description: Create a membership for the given user, group and role deleting all the existing group's memberships.
      operationId: put-rest-external-account-users-userid-role
      x-annotation-dx-category: users-memberships
      summary: replace roles
      tags:
      - dx-category--users-memberships
  /rest/external/account/users/{userId}/state:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: UUID identifier of user account.
    put:
      responses:
        '204':
          description: ''
        '403':
          description: ''
      description: Set the state of a user.
      operationId: put-rest-external-account-users-userid-state
      requestBody:
        content:
          text/plain:
            example: LOCKED
            schema:
              type: string
        required: true
      x-annotation-dx-category: users-memberships
      summary: set user state
      tags:
      - dx-category--users-memberships
  /rest/external/usergroups:
    get:
      responses:
        '200':
          description: 'A list of user groups without members returned as an ExternalUserGroupsList.

            In case the user does not have any user groups then a blank list is returned.

            '
        '400':
          description: If one or more of the query parameters are invalid.
      description: 'Gets list of all user groups that the user has access to. Groups are fetched without members

        but each user group entry will have the number of members it has.'
      operationId: get-rest-external-usergroups
      parameters:
      - name: limit
        in: query
        description: The number of user groups to fetch per call.
        schema:
          default: 25
          minimum: 0
          maximum: 100
          type: integer
      - name: page
        in: query
        description: The page number from which to start fetching the user groups.
        schema:
          default: 0
          minimum: 0
          type: integer
      - name: state
        in: query
        description: The state of the user groups.
        schema:
          default: ACTIVE
          type: string
      - name: query
        in: query
        description: User group name query string.
        schema:
          type: string
      - name: member
        in: query
        description: Returned user groups must have the supplied user is as a member.
        schema:
          type: string
      x-annotation-dx-category: users-memberships
      summary: Find user groups by query string
      tags:
      - dx-category--users-memberships
  /rest/external/users/{userId}/branches:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: User account UUID.
    get:
      responses:
        '200':
          description: List of branches
          content:
            application/json:
              example:
              - Id: 59cef2b3-3190-4329-b29f-00ac476b40da
                Name: Simon's Catering and Cocktails AGrvylkxsnevop
                Country: US
              - Id: 89cef2b3-3190-4329-c29f-10ac476b40db
                Name: 'Petes''s Cocktails '
                Country: US
              schema:
                title: Tradeshift Public API 1.0 - GLI List
                type: array
                additionalProperties: false
                items:
                  type: object
                  properties:
                    Id:
                      pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                      description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                      type: string
                    Name:
                      type: string
                    Country:
                      type: string
                  required:
                  - Id
                  - Name
                  - Country
        '400':
          description: Company hierarchy is corrupted, unable to get root branch. Contact support team.
        '404':
          description: User not found or out of company hierarchy
      description: Returns a list of branches for the specified user inside organisation hierarchy of his current company.
      operationId: get-rest-external-users-userid-branches
      x-annotation-dx-category: users-memberships
      summary: List of current company branches where the specified user is a member
      tags:
      - dx-category--users-memberships
  /rest/external/users/{userId}/current/branches:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: User account UUID.
    get:
      responses:
        '200':
          description: List of branches
        '404':
          description: User not found or out of company hierarchy
      description: Returns a list of branches for the specified user inside organisation hierarchy of his current company.
      operationId: get-rest-external-users-userid-current-branches
      x-annotation-dx-category: users-memberships
      summary: List of current company branches starting from current branch where the…
      tags:
      - dx-category--users-memberships
  /rest/external/users/{userId}/memberships/{groupId}:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: UUID identifier of user account.
    - name: groupId
      in: path
      required: true
      schema:
        type: string
      description: UUID identifier of the security group
    delete:
      responses:
        '204':
          description: Always returns a 204
        '400':
          description: returns bad request when users membership cannot be removed
          content:
            application/json:
              example:
                ErrorCode: BadRequest
                Message: Could not resolve type nonExistentType
                ErrorDetail:
                - Key: message
                  Value: Could not resolve type nonExistentType
                - Key: stacktrace
                  Value: "com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"
                ValidationError: []
                RequestId: 2c941598-489c-4fac-8543-03cb921feaf7
              schema:
                title: Tradeshift Public API 1.0 - TradeshiftException
                required:
                - ErrorCode
                - Message
                - RequestId
                type: object
                additionalProperties: false
                properties:
                  ErrorCode:
                    type: string
                  Message:
                    type: string
                  ErrorDetail:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        Key:
                          type: string
                        Value:
                          type: string
                      required:
                      - Key
                      - Value
                  ValidationError:
                    type: array
                    items:
                      type: object
                  RequestId:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
      description: Remove user's membership to a group.
      operationId: delete-rest-external-users-userid-memberships-groupid
      x-annotation-dx-category: users-memberships
      summary: remove user membership
      tags:
      - dx-category--users-memberships
  /rest/external/users/{userId}/overridingcompanyaccountid:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: User account UUID.
    put:
      responses:
        '204':
          description: Successful
        '400':
          description: Bad Request due to invalid input. More details in body.
          content:
            application/json:
              example:
                ErrorCode: BadRequest
                Message: Could not resolve type nonExistentType
                ErrorDetail:
                - Key: message
                  Value: Could not resolve type nonExistentType
                - Key: stacktrace
                  Value: "com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"
                ValidationError: []
                RequestId: 2c941598-489c-4fac-8543-03cb921feaf7
              schema:
                title: Tradeshift Public API 1.0 - TradeshiftException
                required:
                - ErrorCode
                - Message
                - RequestId
                type: object
                additionalProperties: false
                properties:
                  ErrorCode:
                    type: string
                  Message:
                    type: string
                  ErrorDetail:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        Key:
                          type: string
                        Value:
                          type: string
                      required:
                      - Key
                      - Value
                  ValidationError:
                    type: array
                    items:
                      type: object
                  RequestId:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
        '401':
          description: User is not a company admin or out of processed companies hierarchy.
          content:
            application/json:
              example:
                ErrorCode: Unauthorized
                Message: The user was not authorized to perform the operation: 37617bf8-4e04-41f2-bd27-9ad9153419ee/Operation(id=15, name=ADMIN_ID) on 35dea17e-fdd7-46d9-88c8-c5c632ebf92b
                ErrorDetail:
                - Key: userUuid
                  Value: 37617bf8-4e04-41f2-bd27-9ad9153419ee
                - Key: securityGroupUuid
                  Value: 35dea17e-fdd7-46d9-88c8-c5c632ebf92b
                - Key: operationId
                  Value: '15'
                - Key: operationName
                  Value: ADMIN_ID
                - Key: stacktrace
                  Value: ''
                ValidationError: []
                RequestId: 92463020-1aa1-48c6-b87f-ad8b97d0599e
              schema:
                title: Tradeshift Public API 1.0 - TradeshiftException
                required:
                - ErrorCode
                - Message
                - RequestId
                type: object
                additionalProperties: false
                properties:
                  ErrorCode:
                    type: string
                  Message:
                    type: string
                  ErrorDetail:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        Key:
                          type: string
                        Value:
                          type: string
                      required:
                      - Key
                      - Value
                  ValidationError:
                    type: array
                    items:
                      type: object
                  RequestId:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
        '404':
          description: User not found.
          content:
            application/json:
              example:
                ErrorCode: ResourceNotFound
                Message: 'Error: ResourceNotFound: The object did not exist'
                ErrorDetail: []
                ValidationError: []
                RequestId: e52264d2-f5c9-43ef-92f1-c40fa64cb3c2
              schema:
                title: Tradeshift Public API 1.0 - TradeshiftException
                required:
                - ErrorCode
                - Message
                - RequestId
                type: object
                additionalProperties: false
                properties:
                  ErrorCode:
                    type: string
                  Message:
                    type: string
                  ErrorDetail:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        Key:
                          type: string
                        Value:
                          type: string
                      required:
                      - Key
                      - Value
                  ValidationError:
                    type: array
                    items:
                      type: object
                  RequestId:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
      description: 'Change home company environment which is displayed after the user logs in.

        The requester must be a company admin and the requester''s company must be a parent to the user''s company and

        overriding company, otherwise 401 returns.'
      operationId: put-rest-external-users-userid-overridingcompanyaccountid
      requestBody:
        content:
          text/plain:
            example: f54bca78-3ac9-4843-ae4a-f6808c0ea477
            schema:
              type: string
        required: true
      x-annotation-dx-category: users-memberships
      summary: Change home branch for a user
      tags:
      - dx-category--users-memberships
  /rest/external/users/{userId}/primarybranch/{newGroupId}:
    parameters:
    - name: userId
      in: path
      required: true
      schema:
        type: string
      description: User account UUID.
    - name: newGroupId
      in: path
      required: true
      schema:
        type: string
      description: UUID identifier of the security group
    put:
      responses:
        '204':
          description: OK
        '400':
          description: User is not a memeber of new primary group or group is out of company hierarchy
        '401':
          description: Requester is not authorized to perform operation.
        '404':
          description: User not found or out of company hierarchy
      description: 'Change current primary group and remove old primary group membership. The user must be a member of new group.

        The requester must be a company admin and requester''s company must be a parent to user''s primary company,

        otherwise 401 returns.'
      operationId: put-rest-external-users-userid-primarybranch-newgroupid
      x-annotation-dx-category: users-memberships
      summary: Change current primary group and remove old primary group membership
      tags:
      - dx-category--users-memberships