Add Link

Purpose

To add a link to your contract at any stage.

Request Details

Request URL

https://contracts.zoho.com/api/v1/contracts/{contractApiName}/attachments

Authorization

Authorization: Zoho-oauthtoken 1000.67013ab3960787bcf3affae67e649fc0.83a789c859e040bf11e7d05f9c8b5ef6

Scope

contracts.contracts.CREATE, contracts.contracts.ALL

Possible Operation Types

ALL - Full access to contract information
CREATE - Add a link to a contract

Sample Request

Copiedcurl "https://contracts.zoho.com/api/v1/contracts/msa-with-zenith-dynamics/attachments"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.67013ab3960787bcf3affae67e649fc0.83a789c859e040bf11e7d05f9c8b5ef6"

Input JSON Keys

  • contractattachmentsJSON Array

    Represents the list of attachments associated with the contract.

  • sequenceNumberinteger

    Represents the order in which the attachment was added.

  • linkNamestring

    Represents the display name given to the added link.

  • linkURLstring

    Represents the actual URL of the added link.

  • attachmentTypeinteger

    Represents the type of attachment.

    ValuesDescription
    1File
    2Link

     

Sample Input

Copied{
  "contractAttachments": [
    {
      "sequenceNumber": 1,
      "linkName": "google",
      "linkURL": "google.com",
      "attachmentType": 2
    }
  ]
}

Response JSON Keys

  • contractattachmentsJSON Array

    Represents the list of links added to the contract.

  • contractAttachmentIdstring

    Represents the unique ID of the attachment.

  • sequenceNumberinteger

    Represents the order in which the attachment was added.

  • attachmentTypeinteger

    Represents the type of attachment.

    ValueDescription
    1File
    2Link
  • statusinteger

    Represents the status of the attachment.

    ValueDescription
    0Deleted
    1Active
  • addedByJSON Object

    Represents the details of the user who added the attachment.

  • idnumber

    Represents the unique ID of the user who modified the link.

  • displayNamestring

    Represents the display name of the user.

  • emailIdstring

    Represents the email address of the user who modified the link.

  • modifiedByJSON Object

    Represents the details of the user who last modified the link.

  • addedTimestring

    Represents the date and time when the link was added in the full format (DD MMM YYYY, h:mm a).

  • addedTimeExtstring

    Represents the date and time when the link was added in the medium format (DD-MMM-YYYY).

  • addedTimeFullstring

    Represents the date and time when the link was added in the long format (EEEE, D MMMM, YYYY h:mm a).

  • modifiedTimestring

    Represents the date and time when the link was modified in the full format (DD MMM YYYY, h:mm a).

  • modifiedTimeExtstring

    Represents the date and time when the link was modified in the medium format (DD-MMM-YYYY).

  • linkNamestring

    Represents the display name given to the added link.

  • linkURLstring

    Represents the URL of the added link.

Sample Response

Copied{
    "contractattachments": [
        {
            "modifiedTime": "14 Aug 2025, 11:12 PM",
            "sequenceNumber": 4,
            "attachmentType": 2,
            "addedBy": {
                "displayName": "John Smith",
                "emailId": "john.smith@zylker.com",
                "id": "3000000131411"
            },
            "addedTimeExt": "14-Aug-2025",
            "addedTimeFull": "Thursday, 14 August, 2025 11:12 PM",
            "linkName": "google",
            "modifiedTimeExt": "14-Aug-2025",
            "linkURL": "google.com",
            "addedTime": "14 Aug 2025, 11:12 PM",
            "modifiedBy": {
                "displayName": "John Smith",
                "emailId": "john.smith@zylker.com",
                "id": "3000000131411"
            },
            "contractAttachmentId": "3000000272497",
            "attachmentId": "3000000272495",
            "status": 1
        }
    ]
}

Possible Errors

INVALID_URL_PATTERNHTTP 404

Request URL is incorrect

Resolution: Specify a valid request URL. Refer to the Request URL section above.

OAUTH_SCOPE_MISMATCHHTTP 401

Unauthorized

Resolution: Client does not have contracts.contracts.CREATE scope. Create a new client with valid scope. Refer to the Scope section above.

NO_PERMISSIONHTTP 403

Permission denied to create

Resolution: The user does not have permission to create records. Contact your organization administrator.

INTERNAL_ERRORHTTP 500

Internal Server Error

Resolution: Unexpected and unhandled exception in the server.

INVALID_REQUEST_METHODHTTP 400

The HTTP request method is not a valid one.

Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to the Endpoints section above.

AUTHORIZATION_FAILEDHTTP 400

The user does not have sufficient privilege to create module details.

Resolution: The user does not have permission to create module details. Contact your organization administrator.

AUTHORIZATION_FAILEDHTTP 2131

Duplicate values not allowed.

Resolution: Remove the duplicate values from the sequence number.