Files

Create a file upload

Stores a private object in Needle. Pass filename and contentType to mint a short-lived signed PUT URL, then PUT the bytes to uploadUrl. Or pass sourceUrl to copy a public https file into Needle. Then pass the returned url when sending a LinkedIn message or InMail, or on a campaign send step. downloadUrl is a preview link; do not pass it to LinkedIn.

POST

/api/v1/files

Request bodyrequired

filenameoptional

string

contentTypeoptional

string

sourceUrloptional

string · uri

Public https URL. Needle copies the file into a private object and returns the url to attach.

Response

201Object identity, a preview URL, and a short-lived upload URL when you still need to PUT bytes.

url

string

Private object identity. Store this on a send or a campaign step. Not a download link.

uploadUrl

string | null

Short-lived signed PUT URL when you upload bytes yourself. Null when Needle already copied sourceUrl. Discard after use.

filename

string

downloadUrl

string

Preview URL on needle.app that redirects to a short-lived signed GET. Do not send this to LinkedIn.

expiresAt

string · date-time

When the preview URL stops redirecting. Each visit mints a fresh signature until then.

requestId

string · uuid

Id of this request, for support and troubleshooting

Errors

  • 400: Bad request
  • 401: Unauthorized: missing or invalid API key
  • 403: Forbidden
  • 404: Not found
  • 422: Invalid request payload

Search docs

Search documentation, API reference, and MCP tools

We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy