---
title: "Workspaces | Rendley API Docs"
description: "Workspaces hold projects and their media library. List the ones your key can reach, and create, rename or delete them."
url: https://docs.rendley.com/api/workspaces/
---

# Workspaces

Workspaces hold projects and their media library. List the ones your key can reach, and create, rename or delete them.

## List workspaces

List all workspaces belonging to the authenticated user.

GET`https://api.rendley.com/v1/workspaces`

```
const res = await fetch("https://api.rendley.com/v1/workspaces", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();
```

```
curl "https://api.rendley.com/v1/workspaces" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```
import requests

res = requests.get(
    "https://api.rendley.com/v1/workspaces",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]
```

```
$ch = curl_init("https://api.rendley.com/v1/workspaces");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];
```

```
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/workspaces", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
```

```
require "net/http"
require "json"

uri = URI("https://api.rendley.com/v1/workspaces")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]
```

Response 200

```
{
  "data": [
    {
      "created_by": "string",
      "id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
      "name": "string",
      "organization_id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
      "social_analytics": true,
      "social_publishing": true,
      "templates": true,
      "thumbnail_studio": true,
      "voice_clone_limit": 0
    }
  ]
}
```

## Create a workspace

Create a new workspace for the authenticated user.

POST`https://api.rendley.com/v1/workspaces`

" }">

Body

`name`requiredstring

Max matches the workspaces.name column (VARCHAR(255)).

```
const res = await fetch("https://api.rendley.com/v1/workspaces", {
  method: "POST",
  headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "<name>"
  }),
});
const { data } = await res.json();
```

```
curl -X POST "https://api.rendley.com/v1/workspaces" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<name>"
  }'
```

```
import requests

res = requests.post(
    "https://api.rendley.com/v1/workspaces",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "<name>"
    },
)
data = res.json()["data"]
```

```
$ch = curl_init("https://api.rendley.com/v1/workspaces");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["name" => "<name>"]));

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];
```

```
package main

import (
	"fmt"
	"io"
	"net/http"
	"bytes"
)

func main() {
	body := bytes.NewBufferString(`{
  "name": "<name>"
}`)
	req, _ := http.NewRequest("POST", "https://api.rendley.com/v1/workspaces", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
```

```
require "net/http"
require "json"

uri = URI("https://api.rendley.com/v1/workspaces")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { name: "<name>" }.to_json

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]
```

Response 200

```
{
  "data": {
    "created_by": "string",
    "id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
    "name": "string",
    "organization_id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
    "social_analytics": true,
    "social_publishing": true,
    "templates": true,
    "thumbnail_studio": true,
    "voice_clone_limit": 0
  }
}
```

## Get a workspace

GET`https://api.rendley.com/v1/workspaces/{id}`

Returns a single workspace the authenticated user has access to. Used to load a specific (e.g. last-opened) workspace at startup rather than defaulting to the first.

`id`requiredstring

```
const res = await fetch("https://api.rendley.com/v1/workspaces/ID", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();
```

```
curl "https://api.rendley.com/v1/workspaces/ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```
import requests

res = requests.get(
    "https://api.rendley.com/v1/workspaces/ID",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]
```

```
$ch = curl_init("https://api.rendley.com/v1/workspaces/ID");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];
```

```
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.rendley.com/v1/workspaces/ID", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
```

```
require "net/http"
require "json"

uri = URI("https://api.rendley.com/v1/workspaces/ID")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]
```

Response 200

```
{
  "data": {
    "created_by": "string",
    "id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
    "name": "string",
    "organization_id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
    "social_analytics": true,
    "social_publishing": true,
    "templates": true,
    "thumbnail_studio": true,
    "voice_clone_limit": 0
  }
}
```

## Rename a workspace

Update a workspace's name. Only the workspace owner can do this.

PUT`https://api.rendley.com/v1/workspaces/{id}`

" }">

`id`requiredstring

Body

`name`requiredstring

```
const res = await fetch("https://api.rendley.com/v1/workspaces/ID", {
  method: "PUT",
  headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "<name>"
  }),
});
const { data } = await res.json();
```

```
curl -X PUT "https://api.rendley.com/v1/workspaces/ID" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<name>"
  }'
```

```
import requests

res = requests.put(
    "https://api.rendley.com/v1/workspaces/ID",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "<name>"
    },
)
data = res.json()["data"]
```

```
$ch = curl_init("https://api.rendley.com/v1/workspaces/ID");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["name" => "<name>"]));

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];
```

```
package main

import (
	"fmt"
	"io"
	"net/http"
	"bytes"
)

func main() {
	body := bytes.NewBufferString(`{
  "name": "<name>"
}`)
	req, _ := http.NewRequest("PUT", "https://api.rendley.com/v1/workspaces/ID", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
```

```
require "net/http"
require "json"

uri = URI("https://api.rendley.com/v1/workspaces/ID")
req = Net::HTTP::Put.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"
req["Content-Type"] = "application/json"
req.body = { name: "<name>" }.to_json

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]
```

Response 200

```
{
  "data": {
    "created_by": "string",
    "id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
    "name": "string",
    "organization_id": "3f0d5a4e-3d2a-4c1f-9b3e-2a1c4d5e6f70",
    "social_analytics": true,
    "social_publishing": true,
    "templates": true,
    "thumbnail_studio": true,
    "voice_clone_limit": 0
  }
}
```

## Delete a workspace

DELETE`https://api.rendley.com/v1/workspaces/{id}`

Delete a workspace and all of its contents (projects, brand kit, etc.). Only the workspace owner can do this, and the user's last remaining workspace can't be deleted.

`id`requiredstring

```
const res = await fetch("https://api.rendley.com/v1/workspaces/ID", {
  method: "DELETE",
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const { data } = await res.json();
```

```
curl -X DELETE "https://api.rendley.com/v1/workspaces/ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```
import requests

res = requests.delete(
    "https://api.rendley.com/v1/workspaces/ID",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()["data"]
```

```
$ch = curl_init("https://api.rendley.com/v1/workspaces/ID");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Authorization: Bearer YOUR_API_KEY"]);

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true)["data"];
```

```
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://api.rendley.com/v1/workspaces/ID", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
```

```
require "net/http"
require "json"

uri = URI("https://api.rendley.com/v1/workspaces/ID")
req = Net::HTTP::Delete.new(uri)
req["Authorization"] = "Bearer YOUR_API_KEY"

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)["data"]
```

[Previous pageUsers](https://docs.rendley.com/api/users/) [Next pageProjects](https://docs.rendley.com/api/projects/)
