Teams

Teams allow you to form groups of users withing the organization for more efficient management.

Get all teams

Copy link
Copy to clipboard
GET

/v1/teams

Returns data about teams within the company.

Query parameters

order_by

string

The field name to sort returned teams by

Default

id

Values

id

name

manager_id

active_flag

skip_users

number

When enabled, the teams will not include IDs of member users

Default

1

Values

0

1

Response
200

The list of team objects

Expand all
Copy code
    • true
    • [ ... ]

    Get a single team

    Copy link
    Copy to clipboard
    GET

    /v1/teams/{id}

    Returns data about a specific team.

    Path parameters

    id

    integer

    required

    The ID of the team

    Query parameters

    skip_users

    number

    When enabled, the teams will not include IDs of member users

    Default

    1

    Values

    0

    1

    Response
    200

    The team data

    Expand all
    Copy code
      • true
      • { ... }

      Get all users in a team

      Copy link
      Copy to clipboard
      GET

      /v1/teams/{id}/users

      Returns a list of all user IDs within a team.

      Path parameters

      id

      integer

      required

      The ID of the team

      Response
      200

      A list of user IDs within a team

      Expand all
      Copy code
        • true
        • [ ... ]

        Get all teams of a user

        Copy link
        Copy to clipboard
        GET

        /v1/teams/user/{id}

        Returns data about all teams which have the specified user as a member.

        Path parameters

        id

        integer

        required

        The ID of the user

        Query parameters

        order_by

        string

        The field name to sort returned teams by

        Default

        id

        Values

        id

        name

        manager_id

        active_flag

        skip_users

        number

        When enabled, the teams will not include IDs of member users

        Default

        1

        Values

        0

        1

        Response
        200

        The list of team objects

        Expand all
        Copy code
          • true
          • [ ... ]

          Add a new team

          Copy link
          Copy to clipboard
          POST

          /v1/teams

          Adds a new team to the company and returns the created object.

          Body parameters

          application/json

          name

          string

          required

          The team name

          description

          string

          The team description

          manager_id

          integer

          required

          The team manager ID

          users

          array

          The list of user IDs

          Response
          200

          The team data

          Expand all
          Copy code
            • true
            • { ... }

            Add users to a team

            Copy link
            Copy to clipboard
            POST

            /v1/teams/{id}/users

            Adds users to an existing team.

            Path parameters

            id

            integer

            required

            The ID of the team

            Body parameters

            application/json

            users

            array

            required

            The list of user IDs

            Response
            200

            A list of user IDs within a team

            Expand all
            Copy code
              • true
              • [ ... ]

              Update a team

              Copy link
              Copy to clipboard
              PUT

              /v1/teams/{id}

              Updates an existing team and returns the updated object.

              Path parameters

              id

              integer

              required

              The ID of the team

              Body parameters

              application/json

              name

              string

              required

              The team name

              description

              string

              The team description

              manager_id

              integer

              required

              The team manager ID

              users

              array

              The list of user IDs

              active_flag

              Flag that indicates whether the team is active

              Values

              0

              1

              deleted_flag

              Flag that indicates whether the team is deleted

              Values

              0

              1

              Response
              200

              The team data

              Expand all
              Copy code
                • true
                • { ... }

                Delete users from a team

                Copy link
                Copy to clipboard
                DELETE

                /v1/teams/{id}/users

                Deletes users from an existing team.

                Path parameters

                id

                integer

                required

                The ID of the team

                Body parameters

                application/json

                users

                array

                required

                The list of user IDs

                Response
                200

                A list of user IDs within a team

                Expand all
                Copy code
                  • true
                  • [ ... ]

                  Subscribe to Pipedrive’s Developer Newsletter