Skip to content

Get signed S3 URL

GET https://api.prosperworks.com/developer_api/v1/{{entity_type}}/{{entity_id}}/files/s3_signed_url

This API endpoint is step 1 of 3 to upload a file and attach it to an existing entity.

The endpoint gets a signed S3 URL to start the upload process, where {{entity_type}} and {{entity_id}} are replaced with the following:

Field Type Details Default
entity_type* string Must be one of: "leads", "people", "opportunities", "companies", "projects"
entity_id* number ID of the entity record

* indicates a required field

Example Requests

Get signed S3 URL to upload file to leads entity

1
2
3
4
5
curl --location --request GET "https://api.prosperworks.com/developer_api/v1/leads/210110/files/s3_signed_url" \
  --header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
  --header "X-PW-Application: developer_api" \
  --header "X-PW-UserEmail: YOUR_EMAIL_HERE" \
  --header "Content-Type: application/json"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "url": "https://ali-userassets-staging.s3.amazonaws.com/",
  "method": "POST",
  "body": {
    "policy": "eyJleHBpcmF0aW9uIjoiMjAxOS0wNS0xN1QxODoyNzozOC4wMDBaIiwiY29uZGl0aW9ucyI6W3siYnVja2V0IjoiYWxpLXVzZXJhc3NldHMtc3RhZ2luZyJ9LHsiYWNsIjoicHJpdmF0ZSJ9LHsia2V5IjoidGVtcF91cGxvYWRzL2MzZDdmZjUxLTE0MWYtNDIwZS05Yjg5LTI5NDZjOThmMzhiNi84NTgzZDAyNy1lMWQzLTRjOWQtYjE4NC04YjBkNmIxMDBlYzYifSxbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwwLDEwNzM3NDE4MjRdLHsic3VjY2Vzc19hY3Rpb25fc3RhdHVzIjoiMjAxIn1dfQ==",
    "signature": "nUUFLO43nlg/VzjaqeA+qFGg5+I=",
    "aws_access_key_id": "AKIAJ2RYRNMVJJWLRENA",
    "key": "temp_uploads/c3d7ff51-141f-420e-9b89-2946c98f38b6/8583d027-e1d3-4c9d-b184-8b0d6b100ec6",
    "acl": "private",
    "success_action_status": "201"
  },
  "sample_curl": "curl -X POST -v                 -F \"key=temp_uploads/c3d7ff51-141f-420e-9b89-2946c98f38b6/8583d027-e1d3-4c9d-b184-8b0d6b100ec6\"                 -F \"signature=nUUFLO43nlg/VzjaqeA+qFGg5+I=\"                 -F \"success_action_status=201\"                 -F \"acl=private\"                 -F \"policy=eyJleHBpcmF0aW9uIjoiMjAxOS0wNS0xN1QxODoyNzozOC4wMDBaIiwiY29uZGl0aW9ucyI6W3siYnVja2V0IjoiYWxpLXVzZXJhc3NldHMtc3RhZ2luZyJ9LHsiYWNsIjoicHJpdmF0ZSJ9LHsia2V5IjoidGVtcF91cGxvYWRzL2MzZDdmZjUxLTE0MWYtNDIwZS05Yjg5LTI5NDZjOThmMzhiNi84NTgzZDAyNy1lMWQzLTRjOWQtYjE4NC04YjBkNmIxMDBlYzYifSxbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwwLDEwNzM3NDE4MjRdLHsic3VjY2Vzc19hY3Rpb25fc3RhdHVzIjoiMjAxIn1dfQ==\"                 -F \"aws_access_key_id=AKIAJ2SYRNMGJJWLRENA\"                 -F file=@your-file.txt                 \"https://ali-userassets-staging.s3.amazonaws.com/\"\n"
}