POST/api/v1/artifacts/upload-url

Get a single upload URL

The one-request upload markdrop.in uses for smaller files: returns a presigned URL to PUT the whole file to, then publish it. For anything large, or to resume, use Start a file upload.

API token required20 per minute per IP
Code samples and Try it

Request body

#

application/json, required

  • filenamestringRequired

    1–255 characters.

  • content_typestringRequired

    Up to 255 characters.

  • size_bytesintegerRequired

    At least 1.

  • target_slugstring

    Matches ^[A-Za-z0-9_-]{1,64}$.

Responses

#
  • 200OK.
  • 401No token, or the token is revoked or mistyped.
  • 413The file is over the size limit for its type.
  • 415That file type isn't supported.
  • 422The request didn't validate. detail lists each problem, with where it is (loc) and why (msg).
  • 429Too many requests from your IP address. Wait the seconds in Retry-After.
200 response: 5 fields (ArtifactUploadUrlResponse)
  • upload_urlstring
  • blob_keystring
  • mimestring
  • required_content_typestring
  • expires_ininteger

    When the document is deleted. custom needs custom_expires_at.

Did this page help?