go to pipedrive.com
Log inSign up

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

Returns data about all files.

API v1
Request
GET

/v1/files

Query parameters

start

integer

Pagination start

Default

0

limit

integer

Items shown per page

sort

string

The 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

OK

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

      Get one file

      Copy link

      Returns data about a specific file.

      API v1
      Request
      GET

      /v1/files/{id}

      Path parameters

      id

      integer

      required

      The ID of the file

      Response
      200

      OK

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

        Download one file

        Copy link

        Initializes a file download.

        API v1
        Request
        GET

        /v1/files/{id}/download

        Path parameters

        id

        integer

        required

        The ID of the file

        Response
        200

        OK

        Add file

        Copy link

        Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file.

        API v1
        Request
        POST

        /v1/files

        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

        The ID of the deal to associate file(s) with

        person_id

        integer

        The ID of the person to associate file(s) with

        org_id

        integer

        The ID of the organization to associate file(s) with

        product_id

        integer

        The ID of the product to associate file(s) with

        activity_id

        integer

        The ID of the activity to associate file(s) with

        lead_id

        string

        The ID of the lead to associate file(s) with

        Format

        uuid

        Response
        200

        OK

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

          Create a remote file and link it to an item

          Copy link

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

          API v1
          Request
          POST

          /v1/files/remote

          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

          The 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

          OK

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

            Link a remote file to an item

            Copy link

            Links an existing remote file (googledrive) to the item you supply. For more information, see the tutorial for adding a remote file.

            API v1
            Request
            POST

            /v1/files/remoteLink

            Body parameters

            application/x-www-form-urlencoded

            item_type

            string

            required

            The item type

            Values

            deal

            organization

            person

            item_id

            integer

            required

            The 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

            OK

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

              Update file details

              Copy link

              Updates the properties of a file.

              API v1
              Request
              PUT

              /v1/files/{id}

              Path parameters

              id

              integer

              required

              The ID of the file

              Body parameters

              application/x-www-form-urlencoded

              name

              string

              The visible name of the file

              description

              string

              The description of the file

              Response
              200

              OK

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

                Delete a file

                Copy link

                Marks a file as deleted. After 30 days, the file will be permanently deleted.

                API v1
                Request
                DELETE

                /v1/files/{id}

                Path parameters

                id

                integer

                required

                The ID of the file

                Response
                200

                OK

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

                  Subscribe to Pipedrive’s Developer Newsletter