Skip to main content
POST
/
v1
/
files
Create file object
curl --request POST \
  --url https://staging.api.us.aptlydone.com/document/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "tenantId": "550e8400-e29b-41d4-a716-446655440010",
  "name": "project_document.pdf",
  "type": "application/pdf",
  "link": "https://example.com/files/project_document.pdf",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000"
}'
{
  "statusCode": 200,
  "timestamp": "2025-06-24T08:51:01.116Z",
  "message": "Success",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "project_document.pdf",
    "type": "application/pdf",
    "link": "https://example.com/files/project_document.pdf",
    "tenantId": "550e8400-e29b-41d4-a716-446655440010",
    "createdBy": "550e8400-e29b-41d4-a716-446655440001",
    "createdAt": "2025-02-13T12:00:00Z",
    "updatedBy": null,
    "updatedAt": null,
    "deletedBy": null,
    "deletedAt": null,
    "isDeleted": false
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
tenantId
string<uuid>
required

Tenant ID associated with the file

Example:

"550e8400-e29b-41d4-a716-446655440010"

name
string
required

Name of the file

Example:

"project_document.pdf"

type
string
required

Type of the file

Example:

"application/pdf"

Link to the file storage

Example:

"https://example.com/files/project_document.pdf"

createdBy
string<uuid>
required

User ID who created the file

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

201 - application/json

File created successfully

statusCode
number
required

HTTP Status code

Example:

200

timestamp
string
required

Timestamp of the response

Example:

"2025-06-24T08:51:01.116Z"

message
string
required

Response message

Example:

"Success"

data
object
required

Response data