I'd like to create a campaign through API. However, I do not see how to
There are no options to add an attachment through API. I suggest using a download URL that links to the file instead.
For unsubscribe tag, it's the same as how you'd use unsubscribe tags inside Sendy itself.
When you create or edit a campaign, you will find the unsubscribe tags at the bottom of the page (see screenshot below):
You can use the unsubscribe tags like so:
<unsubscribe>Click here to unsubscribe</unsubscribe>
<a href="[unsubscribe]">Click here to unsubscribe</a>
Paste either of the above into the 'HTML' of your email where you want it to appear.
When each recipient receives your email, the tags will automatically be converted to unsubscribe links unique to each recipient. If the recipient clicks on the unsubscribe link, they'll be unsubscribed instantly off the list(s) they belong to.