- Getting Started with HYEGRO API
- User Guide
- Developer Guide
- HYEGRO Developer Docs
- HYEGRO CRM API v1.0
- Users
- Leads
- Contacts
- Accounts
- Products & Inventory
- Deals
- Quotations
- Orders
- Invoices
- Cases
- Activities & Tasks
- Search
- METADATA API
- Files & Attachments
Create Attachment
POST
https://backend.test-hyegro.com/attachments/
attachment (schemas.AttachmentCreate): The attachment data to be created.
db (Session): The database session.
current_user (schemas.User): The user creating the new attachment.
schemas.Attachment: The created attachment.
Request
Query Params
schema
Schema
Any of
Body Params application/json
file_name
string
File Name
file_type
string
File Type
file_size
integer
File Size
bucket_name
string
Bucket Name
storage_path
string
Storage Path
description
Description
Any of
parent_table
string
Parent Table
parent_id
integer
Parent Id
is_active
boolean
Is Active
Default:
true
is_private
boolean
Is Private
Default:
false
file_url
File Url
Any of
signed_url_expiry
Signed Url Expiry
Any of
Example
{
"file_name": "string",
"file_type": "string",
"file_size": 0,
"bucket_name": "string",
"storage_path": "string",
"description": "string",
"parent_table": "string",
"parent_id": 0,
"is_active": true,
"is_private": false,
"file_url": "string",
"signed_url_expiry": "2019-08-24T14:15:22Z"
}
Responses
🟢200OK
application/json
Body
file_name
string
File Name
file_type
string
File Type
file_size
integer
File Size
bucket_name
string
Bucket Name
storage_path
string
Storage Path
description
Description
Any of
parent_table
string
Parent Table
parent_id
integer
Parent Id
is_active
boolean
Is Active
Default:
true
is_private
boolean
Is Private
Default:
false
file_url
File Url
Any of
signed_url_expiry
Signed Url Expiry
Any of
id
integer
Id
created_at
string <date-time>
Created At
updated_at
string <date-time>
Updated At
Example
{
"file_name": "string",
"file_type": "string",
"file_size": 0,
"bucket_name": "string",
"storage_path": "string",
"description": "string",
"parent_table": "string",
"parent_id": 0,
"is_active": true,
"is_private": false,
"file_url": "string",
"signed_url_expiry": "2019-08-24T14:15:22Z",
"id": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
🟠422Parameter Error
Modified at 2025-04-14 16:23:20