Skip to main content
POST
/
api
/
admin
/
document-types
Create, update, or delete a document type
curl --request POST \
  --url https://api.propops.app/api/admin/document-types \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "create",
  "csrf_token": "abc123def456",
  "type_name": "Gas Safety Certificate",
  "document_type_id": 1
}
'
{
  "success": true,
  "message": "Operation completed successfully"
}

Authorizations

Authorization
string
header
required

All API requests must include a valid Bearer token in the Authorization header. Tokens are 64-character SHA-256 session hashes issued by the PropOps authentication system.

Example:

Authorization: Bearer a1b2c3d4e5f6...

Body

application/json
action
enum<string>
required
Available options:
create,
update,
delete
csrf_token
string
required
Example:

"abc123def456"

type_name
string
Example:

"Gas Safety Certificate"

document_type_id
integer
Example:

1

Response

Document type updated

success
boolean
Example:

true

message
string
Example:

"Operation completed successfully"