Skip to content

Your map

The map object

{
    "name": "Changemap",
    "slug": "changemap",
    // canonical url for this map
    "changemap_url": "https://changemap.co/hellocode/changemap/",
    "created": "2022-03-08T07:38:14.365352Z",
    // raw markdown
    "description": "Welcome! Here's where we're building Changemap *in public*.",
    // html output
    "parsed_description": "<p>Welcome! Here&rsquo;s where we&rsquo;re building Changemap <em>in public</em>.",
    "url": "https://changemap.co",
    "contact_email": "",
    "avatar": "https://changemap.co/media/avatars/m_changemap.png",
    // details of the team owning the map
    "team": {
        "name": "Hello Code",
        "slug": "hellocode",
        "url": "https://hellocode.co",
        "created": "2016-10-14T06:08:17.089263Z",
        "avatar": "https://changemap.co/media/avatars/t_hellocode1536145568.png"
    },
    // array of the map's lists
    "lists": [
        {
            "id": 78,
            "name": "Suggestions",
            "role": {
                "name": "Suggestions",
                // hex code for the icon colour
                "colour": "46d6ff"
            },
            // options for the list
            "suggestions": true,
            "comments": true,
            "votes": true,
            "display_count": 10
        },
        // ...snip...
    ]
}

Get your map

Each API token is scoped to a single map, so requesting a map will always return the scoped map.

GET https://changemap.co/api/1/map/

Request

curl "https://changemap.co/api/1/map/" \
  -H "Authorization: Token [your_token]"
import requests

url = "https://changemap.co/api/1/map/"
requests.get(url,
    headers={'Authorization':'Token [your_token]'})

Response

Returns the map object.

{
    "id": 1,
    "changemap_url": "https://changemap.co/hellocode/changemap/",
    // snip...
}

Update your map

Info

Only allowed for tokens with read, write, and manage scope

POST https://changemap.co/api/1/map/edit/

Parameters

Send a JSON object or form-encoded parameters corresponding to the partial fields you'd like to update.

Field Description
name The map's name as a string. Updating this won't change your map's URL.
description Markdown string of the welcome message on the map page.
url String URL listed under the welcome message as the canonical location of this project.
contact_email String, default email address used to send things like "suggestion declined" emails.
is_active Boolean, set to false to archive this map. Once archived a map cannot be viewed until it's reactivated.

Request

Here's an example of updating the description.

curl "https://changemap.co/api/1/map/edit/" \
  -X "POST" -d "description=Hi folks! *So excited* to show you what we're working on!"
  -H "Authorization: Token [your_token]" \
  -H "Content-type: application/x-www-form-urlencoded"
import requests
import json

pk = 1
url = f"https://changemap.co/api/1/map/edit/"

update = json.dumps({
    "description": "Hi folks! *So excited* to show you what we're working on!",
})

requests.post(url, data=update,
    headers={'Authorization':'Token [your_token]',
    'Content-type':'application/json'})

Response

Returns the updated map object. Error responses include a HTTP 400 if your data was invalid.

{
    "id": 1,
    "changemap_url": "https://changemap.co/hellocode/changemap/",
    // snip...
}