Social Features (Likes, Comments, Follows)

Programmatically interact with the social layer around published posters.

Once a map is published, you can read and write the social signals around it via the v1 REST API. All write operations require a bearer API key, and always use the www host: the apex domain redirects cross-origin, which drops the Authorization header.

Voting

curl -X POST https://www.cartoart.net/api/v1/maps/$MAP_ID/vote \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": 1}'

value is 1 for an upvote or -1 for a downvote. To remove your vote, call DELETE /api/v1/maps/{id}/vote instead of posting -1. Voting on an unpublished map returns 403.

Commenting

curl -X POST https://www.cartoart.net/api/v1/maps/$MAP_ID/comments \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "Stunning composition — the river line really anchors this one."}'

Comment bodies are limited to 5,000 characters. Comments can be read with GET /api/v1/maps/{id}/comments, updated with PATCH /api/v1/maps/{id}/comments/{commentId}, and deleted with DELETE /api/v1/maps/{id}/comments/{commentId}.

Following a creator

curl -X POST https://www.cartoart.net/api/v1/users/$USER_ID/follow \
  -H "Authorization: Bearer $API_KEY"

The follow endpoint takes the target's user ID (not username); an unknown ID returns 404. Use DELETE /api/v1/users/{id}/follow to unfollow.

Best practices

  • Social counts update in the background, so short client-side caching is fine.
  • Treat social endpoints as best-effort: a 5xx here should never block a poster-generation flow.