Upload a certificate document
/workspaces/{workspace}/certificates/{certificate}/documentsAttaches a PDF to a certificate and sets who can read it on your trust center. The file must really be a PDF: its first bytes are checked.
Authentication
Send an API token as a bearer token. This endpoint needs a read and write token, made by an editor, admin or owner. Create one in My account → API tokens; see scopes and roles.
Authorization: Bearer 42|bynh_pat_•••••••HeaderPath parameters
workspacestringRequiredYour workspace slug, e.g. dokan.
certificateintegerRequiredCertificate id.
Request body
multipart/form-datafilestringRequiredmax 20480 KB (20 MB)PDF only (mimes:pdf and mimetypes:application/pdf; the content must start with %PDF-).
visibilityenumRequiredpublic: anyone; nda: after an NDA; private: only your team. One of
public,nda,private.titlestring, nullablemax 160Display title. Defaults to the filename without extension.
Response
201 CreatedThe stored document.
idintegerDocument id.titlestringDisplay title (defaults to the filename without extension).filenamestringOriginal filename, sanitised.sizeintegerBytes.pagesinteger|nullBest-guess page count.visibilityenumWho can read it on the trust center. One ofpublic,nda,private.visibility_labelstringLocalized label.uploaded_bystring|nullUploader’s name. Omitted when the uploader wasn’t loaded (the create-certificate response).uploaded_atstringISO 8601.download_pathstringPath relative to the API base, e.g. /workspaces/dokan/documents/412/download.
Rate limits
This endpoint counts toward your general limit of 120 requests a minute and its own limit of 20 a minute. Its own limit answers 429 without Retry-After; wait and try again.
Errors
Every error is JSON with a message. See Errors.