- Edited
- Best Answerset by KevinTheJedi
Attachments don’t work like that. If you want a link to a file hosted externally then you must include the link within the body. If you want to attach (upload) the actual file and contents then you must download the file and put the raw contents within the JSON payload as shown in the documentation.
Also, if you want to add a link to an external file to a custom field you must pass that as a string value with the custom field’s Variable name as the key in the JSON payload. If you want to upload the actual file and contents do the same as I mentioned in the above paragraph however the key will be the custom field’s Variable name.
P.S.
If you are using PHP to generate the JSON payload you can use something like PHP’s native file_get_contents()
function to get the file’s raw contents.
Cheers.