Source: https://developers.woosmap.com/api-reference/datasets-api/post-datasets/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Create Dataset



# Create Dataset

 POST 
https://api.woosmap.com/datasets

Creates a dataset.

**Rate limit** : `1/1s`

**Ratelimit:** 1/1s

### Authorization

[`private_key`](#authorization-datasets-privatekeywithwrite)
apiKeyquery

Private key with write permission. Must stay private.

[`X-Api-Key`](#authorization-datasets-privatekeywithwriteheader)
apiKeyheader

Private key with write permission. Must stay private.

### Request Body

application/json

[`name`](#req-name)
stringrequired

The friendly name

[`url`](#req-url)
string (uri)required

[`schema_mapping`](#req-schema-mapping)
array

### Response

200application/json

Successful Response

[`id`](#resp-200-id)
string (uuid)required

[`name`](#resp-200-name)
stringrequired

[`url`](#resp-200-url)
string

The url of the data to fetch

[`reimport_key`](#resp-200-reimport-key)
string

The reimport key to be used with the reimport hook endpoint.

[`created_at`](#resp-200-created-at)
string (date-time)required

The date when the dataset was created.

[`updated_at`](#resp-200-updated-at)
stringrequired

The date when the dataset was last updated.

[`scheduled_for_deletion_after`](#resp-200-scheduled-for-deletion-after)
string

After this date the dataset will be automatically removed

### Errors

#401

Unable to locate credentials.

 

`application/json`

[`detail`](#err-401-detail)
stringrequired

#402

Out of free quota.

 

`application/json`

[`detail`](#err-402-detail)
stringrequired

#403

Credentials found, but not matching.

 

`application/json`

[`detail`](#err-403-detail)
stringrequired

#422

Validation Error

 

`application/json`

[`detail`](#err-422-detail)
object[]

Show 3 propertiesHide 3 properties

detail.[`loc`](#err-422-detail-loc)
any[]required

detail.[`msg`](#err-422-detail-msg)
stringrequired

detail.[`type`](#err-422-detail-type)
stringrequired

#429

Rate limit reached

 

`application/json`

[`details`](#err-429-details)
stringrequired

```shell
curl -L 'https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY' \
-H 'content-type: application/json' \
-d '{
  "name": "string",
  "url": "http://example.com",
  "schema_mapping": [
    {
      "schema_key": "title",
      "data_key": "string"
    }
  ]
}'
```

```javascript
const myHeaders = new Headers();
myHeaders.append("content-type", "application/json");

const raw = JSON.stringify({
  "name": "string",
  "url": "http://example.com",
  "schema_mapping": [
    {
      "schema_key": "title",
      "data_key": "string"
    }
  ]
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

```python
import requests
import json

url = "https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY"

payload = json.dumps({
    "name": "string",
    "url": "http://example.com",
    "schema_mapping": [
        {
            "schema_key": "title",
            "data_key": "string"
        }
    ]
})
headers = {
    'content-type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
```
