Skip to content
#

Update Project

Update project name, icon, or color

PATCH /api/v1/projects/{projectId}
On this page
#

Request

projectId string · path · required

The unique identifier of the project

Authorization string · header · required

Bearer token for authentication

name string · body

New project name (1-255 characters)

icon string · body

New project icon. Available options:

  • Code2, Terminal, Bot, Brain, Sparkles
  • Database, GitBranch, Bug, FolderKanban
  • Folder, Files, Library, BookOpen
  • Briefcase, Package, Layers, AppWindow
  • Rocket, Palette, Paintbrush, PenTool
  • Lightbulb, BarChart3, Settings, Globe

color string · body

New project color. Available options:

  • rose, pink, orange, amber, emerald
  • cyan, blue, purple, slate, gray
#

Response

success boolean

Indicates if the request was successful

data object

data

name string

Updated project name

icon string

Updated project icon

color string

Updated project color

#

Request examples

cURL

curl -X PATCH \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Name", "icon": "Rocket", "color": "emerald"}' \
  https://cloud.specstory.com/api/v1/projects/proj_abc123

JavaScript

const response = await fetch('https://cloud.specstory.com/api/v1/projects/proj_abc123', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Updated Name',
    icon: 'Rocket',
    color: 'emerald'
  })
});

const data = await response.json();

Python

import requests

response = requests.patch(
    'https://cloud.specstory.com/api/v1/projects/proj_abc123',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'name': 'Updated Name',
        'icon': 'Rocket',
        'color': 'emerald'
    }
)

data = response.json()
#

Response examples

200 Success

{
  "success": true,
  "data": {
    "name": "Updated Name",
    "icon": "Rocket",
    "color": "emerald"
  }
}

403 Forbidden

{
  "success": false,
  "error": "You do not have permission to update this project"
}

404 Not Found

{
  "success": false,
  "error": "Project not found"
}