Navigation

Manage Attachments

Create, update, and delete file and link attachments on contacts

POST /apis/v2/public/crm/manageAttachments

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.

Insert Action — Link Attachment

Field Type Required Default Description
contact_id string — The UUID of the contact to attach to
att_type string — Set to link
att_name string — Display name for the attachment. Max 255 characters.
att_content object — Object containing link_url — the URL to attach. Must be a valid URL.
att_context string — Context or description of the attachment
att_weight float 0 Relevance weight for sorting or prioritization

Insert Action — File Attachment

Field Type Required Default Description
contact_id string — The UUID of the contact to attach to
att_type string — Set to file
att_name string — Display name for the file. Max 255 characters.
file_data string — Base64-encoded file content
file_type string — MIME type of the file (e.g., application/pdf, image/png)
file_size integer — File size in bytes
att_context string — Context or description
att_weight float 0 Relevance weight

Update Action

Field Type Required Description
att_id string The UUID of the attachment to update
att_name string New display name
att_context string New context or description
att_weight float New weight value
att_content object For link attachments only — object with updated link_url

Delete Action

Field Type Required Description
att_id string The UUID of the attachment to delete. The database record is removed; files in cloud storage are retained.

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.

Was this article helpful?

NotebookLM Overviews