How to retrieve list of my templates using API?

I am a PHP developer, but new to integration of Infusionsoft APIs.

I am trying to create a platform, where I need to show my users all their Templates that they have created on Infusionsoft. Is there an API method using which I can retrieve a list of Template IDs and Titles?

Hi @Pragati_Paliwal, are you referring to email broadcast templates (Marketing > Email Broadcasts > Send Email) or classic templates (Marketing > Templates)?

The templates that you can create under marketing (notes, emails, phone, task etc) can be read using the Templates table via the query method of the api.

Hi @Nicholas_Trecina , I am referring to classic templates (Marketing > Templates). Do you have php code as an example or API name?

I have tried to read via query but not getting any result. May be I am not passing right parameters. If you have integrated it before, can you please share your code with me?

I think the first thing to do, as @Nicholas_Trecina has suggested, is to clear up what templates you are looking to get. Some templates are not found on that table so this is really the key to knowing. Where are the templates you are looking for created in the UI?

Here’s a snippet of PHP code that will get you the first 100 classic templates:

$infusionsoft->data()->query('Template', 100, 0, array('Id' => '%'), array('Id', 'Categories', 'PieceTitle', 'PieceType'))

I got the classic template Ids. Thanks for you help @Nicholas_Trecina and @John_Borelli

@Nicholas_Trecina and @John_Borelli, can we have API to get any association between these email template and subscriber list id. So we can track clicks and open for any particular email id with respect to any template id

There isn’t a call for it but if you plan ahead and raise the tag on clicks for emails sent using specific templates then you would have that. Opens aren’t an accurate measure since email clients all have different rules for reporting opens and there isn’t a way in IS to trigger anything on an ‘open’ regardless.