Files

Files are documents of any kind (images, spreadsheets, text files, etc.) that are uploaded to Pipedrive, and usually associated with a particular Deal, Person, Organization, Product, Note or Activity. Remote files can only be associated with a particular Deal, Person or Organization. Note that the API currently does not support downloading files although it lets you retrieve a file’s meta-info along with a URL which can be used to download the file by using a standard HTTP GET request.

Get all files

Copy link
Copy to clipboard
GET

/v1/files

Returns data about all files.

Query parameters

start

integer

Pagination start

Default

0

limit

integer

Items shown per page

include_deleted_files

number

When enabled, the list of files will also include deleted files. Please note that trying to download these files will not work.

Values

0

1

sort

string

Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). Supported fields: id, user_id, deal_id, person_id, org_id, product_id, add_time, update_time, file_name, file_type, file_size, comment.

Response
200

Get data about all uploaded to Pipedrive files.

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

      Get one file

      Copy link
      Copy to clipboard
      GET

      /v1/files/{id}

      Returns data about a specific file.

      Path parameters

      id

      integer

      required

      ID of the file

      Response
      200

      Get data about one specific uploaded to Pipedrive file

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

        Download one file

        Copy link
        Copy to clipboard
        GET

        /v1/files/{id}/download

        Initializes a file download.

        Path parameters

        id

        integer

        required

        ID of the file

        Response
        200

        success

        Add file

        Copy link
        Copy to clipboard
        POST

        /v1/files

        Lets you upload a file and associate it with Deal, Person, Organization, Activity or Product. For more information on how to add a file, see this tutorial.

        Body parameters

        multipart/form-data

        file

        string

        required

        A single file, supplied in the multipart/form-data encoding and contained within the given boundaries.

        Format

        binary

        deal_id

        integer

        ID of the deal to associate file(s) with

        person_id

        integer

        ID of the person to associate file(s) with

        org_id

        integer

        ID of the organization to associate file(s) with

        product_id

        integer

        ID of the product to associate file(s) with

        activity_id

        integer

        ID of the activity to associate file(s) with

        Response
        200

        Add a file from computer or Google Drive and associate it with Deal, Person, Organization, Activity or Product.

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

          Create a remote file and link it to an item

          Copy link
          Copy to clipboard
          POST

          /v1/files/remote

          Creates a new empty file in the remote location (googledrive) that will be linked to the item you supply. For more information on how to add a remote file, see this tutorial.

          Body parameters

          application/x-www-form-urlencoded

          file_type

          string

          required

          The file type

          Values

          gdoc

          gslides

          gsheet

          gform

          gdraw

          title

          string

          required

          The title of the file

          item_type

          string

          required

          The item type

          Values

          deal

          organization

          person

          item_id

          integer

          required

          ID of the item to associate the file with

          remote_location

          string

          required

          The location type to send the file to. Only googledrive is supported at the moment.

          Values

          googledrive

          Response
          200

          Creates a new empty file in the remote location (googledrive) that will be linked to the item you supply - deal, person or organization

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

            Link a remote file to an item

            Copy link
            Copy to clipboard
            POST

            /v1/files/remoteLink

            Links an existing remote file (googledrive) to the item you supply. For more information on how to link a remote file, see this tutorial.

            Body parameters

            application/x-www-form-urlencoded

            item_type

            string

            required

            The item type

            Values

            deal

            organization

            person

            item_id

            integer

            required

            ID of the item to associate the file with

            remote_id

            string

            required

            The remote item id

            remote_location

            string

            required

            The location type to send the file to. Only googledrive is supported at the moment.

            Values

            googledrive

            Response
            200

            Links an existing remote file (googledrive) to the item you supply - deal, person, organization

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

              Update file details

              Copy link
              Copy to clipboard
              PUT

              /v1/files/{id}

              Updates the properties of a file.

              Path parameters

              id

              integer

              required

              ID of the file

              Body parameters

              application/x-www-form-urlencoded

              name

              string

              Visible name of the file

              description

              string

              Description of the file

              Response
              200

              Update file name and description.

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

                Delete a file

                Copy link
                Copy to clipboard
                DELETE

                /v1/files/{id}

                Marks a file as deleted.

                Path parameters

                id

                integer

                required

                ID of the file

                Response
                200

                Delete a file from Pipedrive

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

                  Subscribe to Pipedrive’s Developer Newsletter