

Post a partial dataset JSON to create a new dataset.
titlemasthead, the ID of one of the existing mastheads, from the site JSON.team, the ID of one of the existing teams, from the teams JSON.id is automatically assigned.sharing defaults to public.| Authorization | API key. | string | Required |
| Content-Type | Must be "application/json". Most clients will set this automatically. | string | Required |
| 200 | Returns the full dataset JSON. |
| 400 | Returns a JSON object explaining the error. |
| 403 | API key does not have editor permissions. |
import requests, os, json
api_key = os.getenv("DATAPRESS_API_KEY")
headers = { "Authorization": api_key }
dataset = {
"title": "My new dataset",
"masthead": "the-masthead-slug", # from /api/v3/site
"team": "tm123" # from /api/v3/teams
}
url = f"https://data.website/api/v3/dataset"
response = requests.post(url, json=dataset, headers=headers)
print(json.dumps(response.json(), indent=2))
{
"dataset": {
"id": "444xy", # Automatically assigned
"title": "My new dataset",
"masthead": "the-masthead-slug",
"team": "tm123",
// [...full JSON structure...]
}
}