WorkerWorkers Kv Namespace

Create a Namespace

POST

Creates a namespace under the given title. A 400 is returned if the account already owns a namespace with this title. A namespace must be explicitly deleted to be replaced.

Path parameters

account_identifierstringRequired
Identifier

Request

This endpoint expects an object.
title
stringRequired
A human-readable string name for a Namespace.

Response

This endpoint returns an object
result
objectOptional
POST
1curl -X POST https://api.cloudflare.com/client/v4/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "title": "My Own Namespace"
6}'
200Successful
1{
2 "result": {
3 "id": "0f2ac74b498b48028cb68387c421e279",
4 "title": "My Own Namespace",
5 "supports_url_encoding": true
6 }
7}