Cloud API Integration
The MeasureSquare Cloud API provides REST access to the M2 diagram project data.
#Base URL
https://cloud.measuresquare.com/api
#Authentication
Publishable API Key
- When sending API requests from front-end script
- No domain restrictions
- Only read access: Read the special diagram data
HTTP header M2DiagramKey: YOUR_PUBLIC_API_KEY
You can roll your publishable API key with your secret API key in your background server.
Or you can roll your publishable API key manually from your M2Cloud Group Setting page too.
Secret API Key
- When sending API requests from a server, DO NOT use in front-end
- Full access: read & write
- Make sure you keep this type of API key secret

#Roll your publishable API key
To roll your publishable key from your server, with your secret API key, post your request to this URL:
https://cloud.measuresquare.com/api/rollpublicwebkey
Returns: string - returns the new publishable API key
For more details, see M2Cloud API Document