Measure MapAPI

Comment on a project

POST/projects/{pid}/comments
projects:write EnterpriseOpen GuestSince v2
Leaves a comment on the project's map, from your account: a pin with a note, as in the app. It reaches the project's people as any comment does, by notification and email, and sends the project.comment.added webhook.

Path parameters

  • pidstringrequired
    The project's ID, the part after /p/ in its address in the app.

Request body application/json

Fields of CommentCreate:

  • textstringrequired
    The comment. Not blank.
    at most 2000 characters
  • latitudenumberrequired
    Where the comment's pin goes on the map.
    -90 to 90
  • longitudenumberrequired
    -180 to 180

Responses

  • Comment:

    • typestringrequired
      Always"project_comment"
    • idstringrequired
    • projectIdstringrequired
    • timestampinteger(int64)required
      When it was left, in milliseconds since 1 January 1970 (UTC).
    • textstringrequired
    • latitudenumber(double)
    • longitudenumber(double)
    • uidstring
      Who left it.
    • userNamestring
    • userPhotoUrlstring

Errors

A failed request answers with one of these, in an Error body.

400invalid_bodyA value in the request body is missing, has the wrong type, is too long or is not one of the accepted values.
401unauthorized_actionThe item is not on your account or your members', the request came from a web page on a website the key does not allow, or the action is not allowed for this person.
403insufficient_scopeThe key does not have the access this endpoint needs. Create a key with that access.
403invalid_api_keyNo key was sent in the Authorization header, or the key is unknown, revoked, or past the time it kept working after being replaced.
404project_not_foundThe project does not exist.

Try it

This key is

The key stays in this tab and goes only to the API. Use a sandbox key while you try things: requests are real, and what they change is changed.

The project's ID, the part after `/p/` in its address in the app.
POST https://api.measuremaponline.com/api/v2/projects/Xr7Lp2Qm9KdT4wZs/comments

Fill in your API key to send.

As a cURL command
Shell
curl -X POST 'https://api.measuremaponline.com/api/v2/projects/Xr7Lp2Qm9KdT4wZs/comments' \
  -H "Authorization: $MMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "The quote is ready. Could you confirm the side garden is included?",
  "latitude": 51.50729,
  "longitude": -0.12744
}'