Get an upload URL for a file
View as MarkdownPOST
/v1/attachments/uploadsChecks access and limits and returns a signed URL (15 minutes) to PUT the file's bytes to. upload is null when the same bytes are already stored. Then record the file with attachment.create. Needs edit access to the document (or membership for workspace files).
curl -X POST "https://api.lydie.co/v1/attachments/uploads" \
-H "Authorization: Bearer $LYDIE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
"contentType": "string",
"size": 0,
"sha256": "string"
}'Body
Default
null
Response
- maxBytesinteger
{
"upload": null,
"maxBytes": -9007199254740991
}Errors use one envelope for every endpoint. See Errors and versions.