Add file

POST {{baseUrl}}/files

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.

Request Body

[{"name"=>"file", "value"=>nil, "datatype"=>"null"}, {"name"=>"deal_id", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"person_id", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"org_id", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"product_id", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"activity_id", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"lead_id", "value"=>"<uuid>", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:123,&quot;user_id&quot;:456,&quot;deal_id&quot;:1,&quot;person_id&quot;:789,&quot;org_id&quot;:1,&quot;product_id&quot;:1,&quot;activity_id&quot;:1,&quot;lead_id&quot;:&quot;adf21080-0e10-11eb-879b-05d71fb426ec&quot;,&quot;log_id&quot;:null,&quot;add_time&quot;:&quot;2020-02-20 14:36:35&quot;,&quot;update_time&quot;:&quot;2020-02-20 14:36:31&quot;,&quot;file_name&quot;:&quot;IMG_8189_52233498214699de9579e7b304a81b157b2eb2137e8062.jpg&quot;,&quot;file_type&quot;:&quot;img&quot;,&quot;file_size&quot;:7801780,&quot;active_flag&quot;:true,&quot;inline_flag&quot;:false,&quot;remote_location&quot;:&quot;googledocs&quot;,&quot;remote_id&quot;:&quot;1mT6jshiv6537IirwOExXJuG1jdR4F0FQ&quot;,&quot;cid&quot;:&quot;&quot;,&quot;s3_bucket&quot;:&quot;&quot;,&quot;mail_message_id&quot;:&quot;&quot;,&quot;mail_template_id&quot;:&quot;&quot;,&quot;deal_name&quot;:&quot;&quot;,&quot;person_name&quot;:&quot;Person&quot;,&quot;org_name&quot;:&quot;&quot;,&quot;product_name&quot;:&quot;&quot;,&quot;lead_name&quot;:&quot;Test lead name&quot;,&quot;url&quot;:&quot;https://2a7f.pipedrive.com/v1/files/123/download&quot;,&quot;name&quot;:&quot;IMG_8189.jpg&quot;,&quot;description&quot;:&quot;&quot;}}