Updates a document type

PUT /api/configuration/document-types/{documentTypeId}

Success: 200 OK

Overview

Updates a document type — the category a file uploaded against a member is filed under, such as a medical certificate or a signed waiver.

This is a full replacement, not a partial update. name, description, isSensitive and isAttachment are all overwritten from your body, so omitting name or description clears the existing text, and omitting either boolean stores false. Read the current values with Get document type by ID and send the whole object back.

Two rules restrict what you can change:

Names must also be unique across document types, so reusing another type's name is rejected with 409.

Note the response. A successful update returns 204 No Content with an empty body, not the updated document type. Do not write code that parses a body from this call; fetch the type again if you need to see the result.

Endpoint

PUT {base_url}/api/configuration/document-types/{documentTypeId}

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
documentTypeIdinteger (int32)YesThe document type's identifier, as returned in [].id by List document types. This is the type's id, not the id of any member document filed under it. An id that matches nothing fails with 404.

Request body

FieldTypeRequiredDescription
namestringYesThe document type's name — the label staff pick from when filing a member document. Maximum 255 characters, and unique across document types: reusing another type's name fails with 409. Always overwritten, so omitting it clears the name. If any member document already uses this type, the value must match the stored name exactly (comparison is case-sensitive) or the call fails with 409.
descriptionstringNoLonger explanatory text about what belongs under this type. Maximum 500 characters. Always overwritten, so omitting it or sending null clears the stored text. Unlike name, this can be changed freely even while the type is in use.
isSensitivebooleanNoMarks documents of this type as sensitive, restricting who may view them. Omitting it or sending null sets it to false, which would widen access to every document already filed under the type. Always send the value you want.
isAttachmentbooleanNoMarks the type as one whose documents are handled as file attachments. Omitting it or sending null sets it to false.

Sample request

cURL
curl -X PUT '{base_url}/api/configuration/document-types/{documentTypeId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string",
  "isSensitive": true,
  "isAttachment": true
}'

Response fields

FieldTypeDescription
idinteger (int32)The document type's identifier — the value you pass as documentTypeId. Assigned by the platform and never reused.
keystringThe type's stable code, maximum 55 characters. Unlike name it is not editable through this endpoint, which makes it the safer thing for your integration to match on.
namestringThe type's display name, unique across document types.
descriptionstringThe longer explanatory text, up to 500 characters. Null when never set or cleared.
isSensitivebooleanWhether documents of this type are treated as sensitive.
isAttachmentbooleanWhether documents of this type are handled as file attachments.
isSystembooleanWhether the platform owns this type. true means it cannot be updated or deleted — check this before offering it for editing. It is read-only: there is no request field that sets it.

Sample response

200 OK
{
  "id": 12345,
  "key": "string",
  "name": "string",
  "description": "string",
  "isSensitive": true,
  "isAttachment": true,
  "isSystem": true
}

Errors

StatusMeaningWhen
400Bad requestThe body is not valid JSON for this request, or a value exceeds its maximum length. The body is a validation error object keyed by field name.
404Not foundNo document type has that documentTypeId — Document Type ID {id} cannot be found.
409ConflictThe type is a system type — Document Type ID {id} cannot be changed because it is system. No part of the update is applied, including the editable fields.
409ConflictA member document already uses this type and name differs from the stored name — Document Type ID {id} cannot be changed because it is in use by a member. Resend the stored name to change the other fields.
409ConflictAnother document type already has that name — The document type name {name} already exists.
500Internal server errorAn unexpected server-side failure. The response body is empty.

This page as markdown · All pages · llms.txt