Get document type by ID
Retrieves details of a specific document type based on user permissions
Authorization
ApiKeyAuth Bearer token for API authentication
In: header
Path Parameters
Document type ID
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://app.docutray.com/api/document-types/string"{
"data": {
"id": "string",
"name": "string",
"codeType": "string",
"description": "string",
"isPublic": true,
"isDraft": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Invalid document type ID"
}{
"error": "Invalid API key"
}{
"error": "Insufficient permissions"
}{
"error": "Document type not found"
}{
"error": "Rate limit exceeded"
}{
"error": "Error processing request"
}Create a new document type POST
Creates a new document type. **Non-admin users:** - `isPublic` is forced to `false` - `source` is set to `USER` - `codeType` must be prefixed with the organization slug (e.g., `orgname_my_type`) - At least 3 characters required after the prefix **Admin users:** - Can set `isPublic` to `true` - `source` defaults to `ADMIN` - No prefix requirement on `codeType`
List accessible document types GET
Retrieves the list of document types the user has access to. Includes: - Documents created by the user - Documents from the user's organizations - Public published documents (isPublic=true and isDraft=false) Supports pagination and search.