Attach File
PATCH
curl -X PATCH https://app.smartsuite.com/api/v1/applications/[tableId]/records/[recordId]/ \
-H "Authorization: Token YOUR_API_KEY" \
-H "ACCOUNT-ID: WORKSPACE_ID" \
-H "Content-Type: application/json" \
--data '{"<file_field_slug>":["https://picsum.photos/200/300"],
"id": "record_id"
}'
Attaches a file referenced by URL to the specified field.
Path Parameters
Param | Type | Description |
---|---|---|
tableId | string | The field's Table (App) Id |
recordId | string | The record Id to attach the file to |
Request Body
Param | Type | Description |
---|---|---|
field_slug | string | Key is the field slug, value is the URL for the file |
id | string | The record id to update |
Response Format
record object
Example Response
{
"title": "test2",
"description": {
"data": {
"type": "doc",
"content": []
},
"html": "<div class=\"rendered\">\n \n</div>",
"preview": ""
},
"assigned_to": [],
"status": {
"value": "backlog",
"updated_on": "2023-06-13T19:54:35.933000Z"
},
"due_date": {
"from_date": {
"date": null,
"include_time": false
},
"to_date": {
"date": null,
"include_time": false
},
"is_overdue": false,
"status_is_completed": false,
"status_updated_on": "2023-06-13T19:54:35.933000Z"
},
"priority": "",
"first_created": {
"on": "2023-06-13T19:54:35.933000Z",
"by": "63a1f65723aaf6bcb564b1f1"
},
"last_updated": {
"on": "2023-06-13T20:13:45.422361Z",
"by": "63a1f65723aaf6bcb564b1f1"
},
"followed_by": [],
"comments_count": 0,
"autonumber": 2,
"safa1e3a3e": [
{
"handle": "gR3sd5PITEqlK9GMaXXj",
"metadata": {
"container": "smart-suite-media",
"filename": "chart (2).png",
"key": "ErSAdUZHTEC8tMzsXZ4u_chart (2).png",
"mimetype": "image/png",
"size": 53736
},
"transform_options": {},
"icon": "image",
"file_type": "image",
"created_on": "2023-06-13T20:13:45.418056Z",
"updated_on": "2023-06-13T20:13:45.418062Z",
"description": ""
}
],
"sd69705038": null,
"s604d7591c": "0.0",
"id": "6488c97b56a5155f585e831b",
"application_slug": "so358tdt",
"application_id": "64405cb560eaf9646e5dd1e2",
"ranking": {
"default": "aagckvkhyq"
},
"deleted_date": {
"date": null,
"include_time": false
},
"deleted_by": null
}