Can I get the form code for a list via API?

I'm trying to set up CM to automatically work with our website hosting platform using the API tools and the PHP wrapper. One bit of info that's important for setting up a website to use CM is the subscribe form details. Specifically, the ID for the email field (example: abcdef-abcdef). Is there a way to retrieve this information via the API calls so that I can set up subscribe forms on my client's websites automatically?

Additionally, I'd also like to find out the URL generated by CM for the Archive, is that possible with the API?

Thanks! To the CM Team: Nice work on the new API system!

Tom

jamesd jamesd, 6 years ago
Kshock :

Is there a way to retrieve this information via the API calls so that I can set up subscribe forms on my client's websites automatically?

If you want to subscribe people via the API, you'll need to read the documentation on adding subscribers, rather than using the subscribe form which you can generate through the Campaign Monitor web app.

Kshock :

Additionally, I'd also like to find out the URL generated by CM for the Archive, is that possible with the API?

Once again, if you want to do this using the API, you're able to retrieve a list of a client's sent campaigns which you can then use on your website however you like.

Kshock, 6 years ago

Hi James,

jamesd :

If you want to subscribe people via the API, you'll need to read the documentation on adding subscribers, rather than using the subscribe form which you can generate through the Campaign Monitor web app.

Actually, what I want to get is the code CM provides when you click on the "Create a Subscribe Form" link within a list in CM. Specifically, all I really need in there is the ID generated for the "email" field.

Is that possible with the API, or is there another way I can get that information?

Thanks for the fast reply!

Tom

jamesd jamesd, 6 years ago

No, that form code deliberately isn't available via the API, as the API provides subscription via a RESTful web service. That form code is only available through the app for convenience if you want to quickly create a subscribe form.

Generally, if something isn't documented in the API docs, it's not available via the API.

Kshock, 6 years ago

It would be great if there was a way to at least get the ID generated for the email field in that subscribe form code, because in order to automate the setup of this on our client sites, I need that ID code to make the form work. Otherwise, I need to manually go into CM, generate the code, copy the ID, then enter it into a database. As nearly all of our clients want to collect subscribers using a form on their website, this would be a very useful thing to be able to do via the API in the future to that automation can be done more completely.

Thanks!

Kshock, 6 years ago

I just realized I can probably do this using the "subscribers" features of the API to set up my own form:

http://www.campaignmonitor.com/api/subscribers/

jamesd jamesd, 6 years ago

Yup, that's what I meant. :) Hope that provides what you need.

Kshock, 6 years ago

It does, thanks James!

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098