Skip to content

Upload policy document

Request

Multipart upload for a policy. Requires Document Manager Create/Edit scoped to the policy module. Same limits and idempotency behavior as POST /v1/documents/clients.

Security
BearerAuth and ApiKeyAuth
Query
policyIdinteger, >= 1required

Policy ID.

Headers
Idempotency-Keystring

Optional idempotency key for safe retries.

Bodymultipart/form-datarequired
filestring, (binary)required
documentTypestring, <= 100 charactersrequired
reportTypeIdinteger
friendlyNamestring, <= 500 characters
viewAccessstring, <= 50 characters
curl -i -X POST \
  'https://docs.meshvi.com/_mock/apis/meshvi/v1/documents/policies?policyId=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -H 'Idempotency-Key: string' \
  -H 'apiKey: YOUR_API_KEY_HERE' \
  -F file=string \
  -F documentType=string \
  -F reportTypeId=0 \
  -F friendlyName=string \
  -F viewAccess=string

Responses

OK — idempotent replay.

Bodyapplication/json
successboolean
dataobject(DocumentUploadPayload)

Payload inside ApiResponse.data for POST/PUT /v1/documents/* upload and update.

errorstring
Response
{ "success": true, "data": { "documentId": 0, "fileName": "string", "downloadUrl": "string" }, "error": "string" }