Manage Attachments
Create, update, and delete file and link attachments on contacts
A multi-action endpoint for managing contact attachments. Supports three operations: inserting new attachments (files or links), updating existing attachment metadata, and deleting attachments. File uploads are stored in cloud storage (Backblaze B2).
Requires a valid `api_key` and `developer_secret` in the JSON request body. Requests must originate from a whitelisted IP address.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
api_key |
body | string |
Yes | Your Zyntro API key |
developer_secret |
body | string |
Yes | Your developer secret (zdk_XXX). Issued during developer onboarding. |
org_id |
body | string |
Yes | Your organization UUID |
member_id |
body | string |
Yes | The member UUID. Must be a valid member in the organization. |
action |
body | string |
Yes | The operation to perform: `insert`, `update`, or `delete` |
Info:
This is a multi-action endpoint. The additional required fields depend on which `action` you specify. See the sections below for each action's requirements.
Code Samples
bash
curl -X POST https://app.zyntrohq.com/apis/v2/public/crm/manageAttachments \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"developer_secret": "YOUR_DEVELOPER_SECRET",
"org_id": "YOUR_ORG_ID",
"member_id": "YOUR_MEMBER_ID",
"action": "insert",
"contact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"att_type": "link",
"att_name": "Proposal Document",
"att_content": { "link_url": "https://docs.google.com/d/abc123" },
"att_context": "Enterprise pricing proposal sent 2026-04-01"
}'
bash
curl -X POST https://app.zyntrohq.com/apis/v2/public/crm/manageAttachments \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"developer_secret": "YOUR_DEVELOPER_SECRET",
"org_id": "YOUR_ORG_ID",
"member_id": "YOUR_MEMBER_ID",
"action": "insert",
"contact_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"att_type": "file",
"att_name": "signed-contract.pdf",
"file_data": "JVBERi0xLjQKMSAwIG9iago8PC...",
"file_type": "application/pdf"
}'
bash
curl -X POST https://app.zyntrohq.com/apis/v2/public/crm/manageAttachments \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"developer_secret": "YOUR_DEVELOPER_SECRET",
"org_id": "YOUR_ORG_ID",
"member_id": "YOUR_MEMBER_ID",
"action": "delete",
"att_id": "d4e5f6a7-b8c9-0123-defg-456789012345"
}'
Response
200
Attachment inserted
json
{
"data": {
"action": "inserted",
"att_id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"message": "Attachment created successfully"
},
"status": "success"
}
200
Attachment updated
json
{
"data": {
"action": "updated",
"att_id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"message": "Attachment updated successfully"
},
"status": "success"
}
200
Attachment deleted
json
{
"data": {
"action": "deleted",
"att_id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"message": "Attachment deleted successfully"
},
"status": "success"
}
Errors
| Code | Message | Resolution |
|---|---|---|
MISSING_API_KEY |
API key is required The `api_key` field is missing. |
Include your API key. |
INVALID_API_KEY |
Invalid API key No active user matches the key. |
Verify your key. |
IP_NOT_WHITELISTED |
IP address not whitelisted The request originated from an IP not in the key's allowed list. |
Contact your client to add your IP to the developer key whitelist. |
INVALID_DEVELOPER_SECRET |
Invalid developer_secret The developer secret does not match any active key. |
Verify your developer secret. If lost, have your client revoke and reissue the key. |
MISSING_DEVELOPER_SECRET |
Missing developer_secret The `developer_secret` field is missing or empty. |
Include your developer secret in the request body. This is issued during developer onboarding. |
INVALID_ACTION |
action must be one of: insert, update, delete The `action` value is not recognized. |
Use `insert`, `update`, or `delete`. |
INVALID_TYPE |
att_type must be 'link' or 'file' The attachment type is not recognized. |
Use `link` or `file`. |
INVALID_URL |
Invalid URL format in link_url The link URL is not a valid URL. |
Provide a properly formatted URL. |
INVALID_BASE64 |
Invalid base64 file data The file_data could not be decoded from base64. |
Ensure the file content is properly base64-encoded. |
UNSUPPORTED_FILE |
Unsupported file type: ... The MIME type is not in the allowed list. |
Supported types include images (png, jpg, gif, svg, webp), documents (pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv), audio (mp3, wav), video (mp4, webm, mov), and archives (zip). |
STORAGE_ERROR |
Storage not configured for this account Cloud storage is not set up. |
Contact support to configure file storage for your account. |
NOT_FOUND |
Contact not found in this organization / Attachment not found The contact or attachment does not exist. |
Verify the ID values. |