Pipedrive LegacyTeams API

Legacy teams allow you to form groups of users withing the organization for more efficient management. Previously Legacy Teams were called Teams and occupied the `v1/teams*` path. They're being deprecated because we are preparing for an upgraded version of the Teams API, which requires migrating the current functionality to a new path URL `v1/legacyTeams*`. The functionality and [OAuth scopes](https://pipedrive.readme.io/docs/marketplace-scopes-and-permissions-explanations) of all the Teams API endpoints will remain the same.

Documentation

📖
Documentation
https://developers.pipedrive.com/
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Deals
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Leads
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Persons
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Organizations
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Activities
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Pipelines
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Stages
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Products
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Notes
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Files
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Mailbox
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/CallLogs
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Users
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Roles
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Filters
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Goals
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Subscriptions
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Projects
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/DealFields
📖
APIReference
https://developers.pipedrive.com/docs/api/v1/Webhooks
📖
Documentation
https://pipedrive.readme.io/docs/guide-for-webhooks-v2
📖
Documentation
https://developers.pipedrive.com/docs/api/v1/oauth2

Specifications

Other Resources

OpenAPI Specification

pipedrive-legacyteams-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Pipedrive API v1 Activities LegacyTeams API
  version: 1.0.0
  description: 'Activities are appointments/tasks/events on a calendar that can be associated with a deal, a lead, a person and an organization. Activities can be of different type (such as call, meeting, lunch or a custom type - see ActivityTypes object) and can be assigned to a particular user. Note that activities can also be created without a specific date/time.

    '
servers:
- url: https://api.pipedrive.com/v1
tags:
- name: LegacyTeams
  description: 'Legacy teams allow you to form groups of users withing the organization for more efficient management. Previously Legacy Teams were called Teams and occupied the `v1/teams*` path. They''re being deprecated because we are preparing for an upgraded version of the Teams API, which requires migrating the current functionality to a new path URL `v1/legacyTeams*`. The functionality and [OAuth scopes](https://pipedrive.readme.io/docs/marketplace-scopes-and-permissions-explanations) of all the Teams API endpoints will remain the same.

    '
paths:
  /legacyTeams:
    get:
      summary: Get all teams
      description: Returns data about teams within the company.
      x-token-cost: 20
      operationId: getTeams
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - users:read
      parameters:
      - in: query
        name: order_by
        schema:
          type: string
          enum:
          - id
          - name
          - manager_id
          - active_flag
          default: id
        description: The field name to sort returned teams by
      - in: query
        name: skip_users
        schema:
          title: numberBooleanDefault0
          type: number
          default: 0
          enum:
          - 0
          - 1
        description: When enabled, the teams will not include IDs of member users
      responses:
        '200':
          description: The list of team objects
          content:
            application/json:
              schema:
                title: GetTeamsResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: object
                        title: baseTeam
                        allOf:
                        - title: teamId
                          type: object
                          properties:
                            id:
                              type: integer
                              description: The team ID
                        - type: object
                          title: updateTeamWithAdditionalProperties
                          allOf:
                          - title: updateTeamRequest
                            allOf:
                            - title: addTeamRequest
                              type: object
                              properties:
                                name:
                                  type: string
                                  description: The team name
                                description:
                                  type: string
                                  description: The team description
                                manager_id:
                                  type: integer
                                  description: The team manager ID
                                users:
                                  type: array
                                  items:
                                    type: integer
                                  description: The list of user IDs
                            - type: object
                              properties:
                                active_flag:
                                  allOf:
                                  - title: numberBoolean
                                    type: number
                                    enum:
                                    - 0
                                    - 1
                                  description: Flag that indicates whether the team is active
                                deleted_flag:
                                  allOf:
                                  - title: numberBoolean
                                    type: number
                                    enum:
                                    - 0
                                    - 1
                                  description: Flag that indicates whether the team is deleted
                          - type: object
                            title: baseTeamAdditionalProperties
                            properties:
                              add_time:
                                type: string
                                description: 'The team creation time. Format: YYYY-MM-DD HH:MM:SS'
                              created_by_user_id:
                                type: integer
                                description: The ID of the user who created the team
              example:
                success: true
                data:
                - id: 1
                  name: Closers
                  description: Berlin office Sales Team
                  manager_id: 4
                  users:
                  - 2
                  - 3
                  - 4
                  - 5
                  active_flag: 1
                  deleted_flag: 0
                  add_time: '2019-10-07 09:06:09'
                  created_by_user_id: 2
                - id: 2
                  name: Coffee
                  description: London office Sales Team
                  manager_id: 7
                  users:
                  - 5
                  - 8
                  active_flag: 0
                  deleted_flag: 0
                  add_time: '2018-04-11 12:54:43'
                  created_by_user_id: 7
    post:
      summary: Add a new team
      description: Adds a new team to the company and returns the created object.
      x-token-cost: 10
      operationId: addTeam
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - admin
      requestBody:
        content:
          application/json:
            schema:
              title: addTeamRequest
              type: object
              properties:
                name:
                  type: string
                  description: The team name
                description:
                  type: string
                  description: The team description
                manager_id:
                  type: integer
                  description: The team manager ID
                users:
                  type: array
                  items:
                    type: integer
                  description: The list of user IDs
              required:
              - name
              - manager_id
      responses:
        '200':
          description: The team data
          content:
            application/json:
              schema:
                title: GetTeamResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: object
                      title: baseTeam
                      allOf:
                      - title: teamId
                        type: object
                        properties:
                          id:
                            type: integer
                            description: The team ID
                      - type: object
                        title: updateTeamWithAdditionalProperties
                        allOf:
                        - title: updateTeamRequest
                          allOf:
                          - title: addTeamRequest
                            type: object
                            properties:
                              name:
                                type: string
                                description: The team name
                              description:
                                type: string
                                description: The team description
                              manager_id:
                                type: integer
                                description: The team manager ID
                              users:
                                type: array
                                items:
                                  type: integer
                                description: The list of user IDs
                          - type: object
                            properties:
                              active_flag:
                                allOf:
                                - title: numberBoolean
                                  type: number
                                  enum:
                                  - 0
                                  - 1
                                description: Flag that indicates whether the team is active
                              deleted_flag:
                                allOf:
                                - title: numberBoolean
                                  type: number
                                  enum:
                                  - 0
                                  - 1
                                description: Flag that indicates whether the team is deleted
                        - type: object
                          title: baseTeamAdditionalProperties
                          properties:
                            add_time:
                              type: string
                              description: 'The team creation time. Format: YYYY-MM-DD HH:MM:SS'
                            created_by_user_id:
                              type: integer
                              description: The ID of the user who created the team
              example:
                success: true
                data:
                  id: 1
                  name: Closers
                  description: Berlin office Sales Team
                  manager_id: 4
                  users:
                  - 2
                  - 3
                  - 5
                  active_flag: 1
                  deleted_flag: 0
                  add_time: '2019-10-07 09:06:09'
                  created_by_user_id: 2
        '403':
          description: Forbidden response
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: You do not have permissions to do this.
                error_info: Please check developers.pipedrive.com
                data: null
                additional_data: null
  /legacyTeams/{id}:
    get:
      summary: Get a single team
      description: Returns data about a specific team.
      x-token-cost: 2
      operationId: getTeam
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - users:read
      parameters:
      - in: path
        name: id
        description: The ID of the team
        required: true
        schema:
          type: integer
      - in: query
        name: skip_users
        schema:
          title: numberBooleanDefault0
          type: number
          default: 0
          enum:
          - 0
          - 1
        description: When enabled, the teams will not include IDs of member users
      responses:
        '200':
          description: The team data
          content:
            application/json:
              schema:
                title: GetTeamResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: object
                      title: baseTeam
                      allOf:
                      - title: teamId
                        type: object
                        properties:
                          id:
                            type: integer
                            description: The team ID
                      - type: object
                        title: updateTeamWithAdditionalProperties
                        allOf:
                        - title: updateTeamRequest
                          allOf:
                          - title: addTeamRequest
                            type: object
                            properties:
                              name:
                                type: string
                                description: The team name
                              description:
                                type: string
                                description: The team description
                              manager_id:
                                type: integer
                                description: The team manager ID
                              users:
                                type: array
                                items:
                                  type: integer
                                description: The list of user IDs
                          - type: object
                            properties:
                              active_flag:
                                allOf:
                                - title: numberBoolean
                                  type: number
                                  enum:
                                  - 0
                                  - 1
                                description: Flag that indicates whether the team is active
                              deleted_flag:
                                allOf:
                                - title: numberBoolean
                                  type: number
                                  enum:
                                  - 0
                                  - 1
                                description: Flag that indicates whether the team is deleted
                        - type: object
                          title: baseTeamAdditionalProperties
                          properties:
                            add_time:
                              type: string
                              description: 'The team creation time. Format: YYYY-MM-DD HH:MM:SS'
                            created_by_user_id:
                              type: integer
                              description: The ID of the user who created the team
              example:
                success: true
                data:
                  id: 1
                  name: Closers
                  description: Berlin office Sales Team
                  manager_id: 4
                  users:
                  - 2
                  - 3
                  - 5
                  active_flag: 1
                  deleted_flag: 0
                  add_time: '2019-10-07 09:06:09'
                  created_by_user_id: 2
        '404':
          description: Team with specified ID does not exist or is inaccessible
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: Team 1 does not exist
    put:
      summary: Update a team
      description: Updates an existing team and returns the updated object.
      x-token-cost: 10
      operationId: updateTeam
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - admin
      parameters:
      - in: path
        name: id
        description: The ID of the team
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              title: updateTeamRequest
              allOf:
              - title: addTeamRequest
                type: object
                properties:
                  name:
                    type: string
                    description: The team name
                  description:
                    type: string
                    description: The team description
                  manager_id:
                    type: integer
                    description: The team manager ID
                  users:
                    type: array
                    items:
                      type: integer
                    description: The list of user IDs
              - type: object
                properties:
                  active_flag:
                    allOf:
                    - title: numberBoolean
                      type: number
                      enum:
                      - 0
                      - 1
                    description: Flag that indicates whether the team is active
                  deleted_flag:
                    allOf:
                    - title: numberBoolean
                      type: number
                      enum:
                      - 0
                      - 1
                    description: Flag that indicates whether the team is deleted
      responses:
        '200':
          description: The team data
          content:
            application/json:
              schema:
                title: GetTeamResponse
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: object
                      title: baseTeam
                      allOf:
                      - title: teamId
                        type: object
                        properties:
                          id:
                            type: integer
                            description: The team ID
                      - type: object
                        title: updateTeamWithAdditionalProperties
                        allOf:
                        - title: updateTeamRequest
                          allOf:
                          - title: addTeamRequest
                            type: object
                            properties:
                              name:
                                type: string
                                description: The team name
                              description:
                                type: string
                                description: The team description
                              manager_id:
                                type: integer
                                description: The team manager ID
                              users:
                                type: array
                                items:
                                  type: integer
                                description: The list of user IDs
                          - type: object
                            properties:
                              active_flag:
                                allOf:
                                - title: numberBoolean
                                  type: number
                                  enum:
                                  - 0
                                  - 1
                                description: Flag that indicates whether the team is active
                              deleted_flag:
                                allOf:
                                - title: numberBoolean
                                  type: number
                                  enum:
                                  - 0
                                  - 1
                                description: Flag that indicates whether the team is deleted
                        - type: object
                          title: baseTeamAdditionalProperties
                          properties:
                            add_time:
                              type: string
                              description: 'The team creation time. Format: YYYY-MM-DD HH:MM:SS'
                            created_by_user_id:
                              type: integer
                              description: The ID of the user who created the team
              example:
                success: true
                data:
                  id: 1
                  name: Closers
                  description: Berlin office Sales Team
                  manager_id: 4
                  users:
                  - 2
                  - 3
                  - 5
                  active_flag: 1
                  deleted_flag: 0
                  add_time: '2019-10-07 09:06:09'
                  created_by_user_id: 2
        '403':
          description: Forbidden response
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: You do not have permissions to do this.
                error_info: Please check developers.pipedrive.com
                data: null
                additional_data: null
        '404':
          description: Team with specified ID does not exist or is inaccessible
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: Team 1 does not exist
  /legacyTeams/{id}/users:
    get:
      summary: Get all users in a team
      description: Returns a list of all user IDs within a team.
      x-token-cost: 20
      operationId: getTeamUsers
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - users:read
      parameters:
      - in: path
        name: id
        description: The ID of the team
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: A list of user IDs within a team
          content:
            application/json:
              schema:
                title: userIds
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: integer
                      description: The list of user IDs
              example:
                success: true
                data:
                - 2
                - 3
                - 4
                - 5
        '404':
          description: Team with specified ID does not exist or is inaccessible
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: Team 1 does not exist
    post:
      summary: Add users to a team
      description: Adds users to an existing team.
      x-token-cost: 10
      operationId: addTeamUser
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - admin
      parameters:
      - in: path
        name: id
        description: The ID of the team
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              title: addTeamUserRequest
              type: object
              required:
              - users
              properties:
                users:
                  type: array
                  items:
                    type: integer
                  description: The list of user IDs
      responses:
        '200':
          description: A list of user IDs within a team
          content:
            application/json:
              schema:
                title: userIds
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: integer
                      description: The list of user IDs
              example:
                success: true
                data:
                - 2
                - 3
                - 4
                - 5
        '403':
          description: Forbidden response
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: You do not have permissions to do this.
                error_info: Please check developers.pipedrive.com
                data: null
                additional_data: null
        '404':
          description: Team with specified ID does not exist or is inaccessible
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: Team 1 does not exist
    delete:
      summary: Delete users from a team
      description: Deletes users from an existing team.
      x-token-cost: 10
      operationId: deleteTeamUser
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - admin
      parameters:
      - in: path
        name: id
        description: The ID of the team
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              title: deleteTeamUserRequest
              type: object
              required:
              - users
              properties:
                users:
                  type: array
                  items:
                    type: integer
                  description: The list of user IDs
      responses:
        '200':
          description: A list of user IDs within a team
          content:
            application/json:
              schema:
                title: userIds
                allOf:
                - title: baseResponse
                  type: object
                  properties:
                    success:
                      type: boolean
                      description: If the response is successful or not
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: integer
                      description: The list of user IDs
              example:
                success: true
                data:
                - 2
                - 3
                - 4
                - 5
        '403':
          description: Forbidden response
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: You do not have permissions to do this.
                error_info: Please check developers.pipedrive.com
                data: null
                additional_data: null
        '404':
          description: Team with specified ID does not exist or is inaccessible
          content:
            application/json:
              schema:
                title: failResponse
                type: object
                properties:
                  success:
                    type: boolean
                    description: If the response is successful or not
                  error:
                    type: string
                    description: The error message
              example:
                success: false
                error: Team 1 does not exist
  /legacyTeams/user/{id}:
    get:
      summary: Get all teams of a user
      description: Returns data about all teams which have the specified user as a member.
      x-token-cost: 20
      operationId: getUserTeams
      deprecated: true
      tags:
      - LegacyTeams
      security:
      - api_key: []
      - oauth2:
        - users:read
      parameters:
      - in: path
        name: id
        description: The ID of the user
        required: true
        schema:
          type: integer
      - in: query
        name: order_by
        schema:
          type: string
          enum:
          - id
          - name
          - manager_id
          - active_flag
          default: id
        description: The field name to sort returned teams by
      - in: query
        name: skip_users
        schema:
          title: numberBooleanDefault0
          type: number
          default: 0
          enum:
          - 0
          - 1
        description: When enabled, the teams will not include IDs of member users
      responses:
        '200':
          description: The list of team objects
          content:
            application/json:
              schema:
                title: GetTeamsResponse
                allOf:
                - title: baseRespons

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