<p>This is most likely possible by serving up restful resources that refer to Craft data with some sort of PHP API that you'll need to write. The APIs you write will just need to grab data using <a href="http://buildwithcraft.com/classreference" rel="nofollow">Craft's API</a></p>

<p>As for hiding certain content for mobile (or whatever frontend platform), I'd create a Lightswitch field for section that you can use to signify content that is "mobile only" or whatever you'd like.</p>

<p>BTW - your API doesn't even necessarily need to be in PHP - You can probably use AngularJS or some other JS server-side framework and use Twig templating. Someone correct me if I'm wrong about that... The great thing about Craft CMS is it's frontend-agnostic</p>

CC BY-SA 3.0
2015-02-11T11:43:46.023Z
Just read this related post last night: http://abandon.ie/notebook/using-angularjs-with-craft-cms
Fred Carlsen
CC BY-SA 3.0
2015-02-11T12:50:47.113Z
Interesting timing! All this is interesting to me as well since I'll be needing to provide an API for our data after we migrate everything to Craft. Thanks for the share.
Chad W
CC BY-SA 3.0
2015-02-10T18:22:45.670Z
2015-02-10T18:35:26.000Z
2015-02-10T18:35:26.000Z
Chad W
<p>I do the same thing for an app, I generate a json when changed are made during the day in craft cms. This is being done in a custom plugin ran by a cronjob. The app then checks if there is a new json on launch and downloads it. I then visualise everything from that json. Images are being synced aswel.</p>

CC BY-SA 3.0
2018-04-09T09:10:07.053Z
2018-04-09T09:10:07.053Z
Pieter-Jan De Bruyne
<p>We're just looking at potentially using Craft as a CMS to serve up content to a mobile apple/android app. Ideally content would be delivered as JSON and there be some sort of authentication from the app side (like an api key) as some of the content isn't intended to be publicly accessible. Can craft do this?</p>

<p>Many thanks!</p>

<json>
Craft as a CMS for mobile app content
# Craft as a CMS for mobile app content

(Asked by: username_0 on 2015-02-10)

We're just looking at potentially using Craft as a CMS to serve up content to a mobile apple/android app. Ideally content would be delivered as JSON and there be some sort of authentication from the app side (like an api key) as some of the content isn't intended to be publicly accessible. Can craft do this?

Many thanks!

**Tags:** json


---

## 2 answers

### Answer by username_1 on 2015-02-10. Score: 4

This is most likely possible by serving up restful resources that refer to Craft data with some sort of PHP API that you'll need to write. The APIs you write will just need to grab data using [Craft's API](http://buildwithcraft.com/classreference)

As for hiding certain content for mobile (or whatever frontend platform), I'd create a Lightswitch field for section that you can use to signify content that is "mobile only" or whatever you'd like.

BTW - your API doesn't even necessarily need to be in PHP - You can probably use AngularJS or some other JS server-side framework and use Twig templating. Someone correct me if I'm wrong about that... The great thing about Craft CMS is it's frontend-agnostic

> **Comments:**
> **username_2**: Just read this related post last night: http://abandon.ie/notebook/using-angularjs-with-craft-cms  
> **username_1**: Interesting timing! All this is interesting to me as well since I'll be needing to provide an API for our data after we migrate everything to Craft. Thanks for the share.  

---

### Answer by username_3 on 2018-04-09. Score: 0

I do the same thing for an app, I generate a json when changed are made during the day in craft cms. This is being done in a custom plugin ran by a cronjob. The app then checks if there is a new json on launch and downloads it. I then visualise everything from that json. Images are being synced aswel.


---

