/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