> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.rightbrain.ai/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rightbrain.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rightbrain.ai/_mcp/server.

# Create Project Skill Revision

POST https://app.rightbrain.ai/api/v1/org/{org_id}/project/{project_id}/skill/{skill_id}/revision
Content-Type: application/json

Create a new revision for a project-scoped skill.

Reference: https://docs.rightbrain.ai/api-reference/api-reference/skills/create-project-skill-revision

## Authentication

- `Authorization` header (bearer token, required) — API key or access token, sent as `Authorization: Bearer <token>`. The simplest option: create an API key in your dashboard under Settings, then paste it here.

## Servers

- `https://app.rightbrain.ai/api/v1` (Production, default)
- `https://app.rightbrain.ai/api/v1` (Staging API)
- `https://app.rblocal.dev/api/v1` (Local development)

## Request

### Path parameters

- `skill_id` (string, required) — The skill ID
- `org_id` (string, required) — The organization ID
- `project_id` (string, required) — The project ID

### Body (application/json)

This endpoint expects a ProjectSkillRevisionCreate.

- `instructions` (string, required) — The primary instructions for this revision.
- `reference_docs` (map from string to string, optional, nullable) — Optional named reference files bundled with this revision.
- `assets` (map from string to string, optional, nullable) — Optional named asset files bundled with this revision.
- `skill_metadata` (map from string to any, optional, nullable) — Optional ADK skill metadata for this revision.
- `capabilities` (SkillCapabilities, optional, nullable) — Optional typed capability contract for this revision.
- `annotation` (string, optional, nullable) — Optional human note describing this revision.
- `activate` (boolean, optional, default: true) — Whether to immediately activate this revision.

## Response

### 201

Project skill revision created

- `id` (string, required)
- `skill_id` (string, required)
- `instructions` (string, required)
- `skill_metadata` (map from string to any, required, nullable)
- `capabilities` (SkillCapabilities, required, nullable)
- `annotation` (string, required, nullable)
- `created` (string, required)
- `reference_files` (list of string, required)
- `asset_files` (list of string, required)
- `reference_file_contents` (list of SkillRevisionFileContent, optional)
- `asset_file_contents` (list of SkillRevisionFileContent, optional)
- `script_files` (list of string, optional, default: [])

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (MalformedResourceIdentifierErrorPayload, required) — The error payload.

### 401 Unauthorized Error

Unauthorized - Authentication failed **Common causes:** - Missing `Authorization` header - Expired access token - Invalid or malformed token - Using API key in wrong format **Resolution:** Ensure you're including a valid Bearer token or API key in the Authorization header.

- `detail` (ErrorResponseDetail, required) — A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

### 403 Forbidden Error

Forbidden - Insufficient permissions for Skill **Common causes:** - Your role lacks the required permission for this action - The Skill belongs to a different organization or project - The action requires admin or owner privileges **Resolution:** Contact your organization admin to request appropriate access.

- `CreateProjectSkillRevisionRequestForbiddenError`
  - PermissionCheckFailedErrorResponse: PermissionCheckFailedErrorResponse
  - MissingAuthenticationErrorResponse: MissingAuthenticationErrorResponse

### 404 Not Found Error

Skill not found

- `detail` (ErrorResponseDetail, required) — A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

### 422 Unprocessable Entity Error

Unprocessable Entity - Invalid create project skill revision **Common causes:** - Request is well-formed but violates business rules - Invalid combination of fields (e.g., mutually exclusive options) - Referenced resource doesn't exist or is in wrong state - Field value is valid type but out of acceptable range **Resolution:** Check the error message for specific validation failures and adjust your request.

- `detail` (ErrorResponseDetail, required) — A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

### 500 Internal Server Error

Internal Server Error - Failed to create project skill revision

- `detail` (ErrorResponseDetail, required) — A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

## Types

### SkillCapabilities

- `schema_version` ("1.0.0", required) — Versioned schema identifier for the capability contract.
- `dependencies` (list of SkillCapabilitiesDependenciesItems, required) — Declarative dependency requirements for this skill revision.

### SkillRevisionFileContent

- `path` (string, required)
- `content` (string, required)
- `size_bytes` (integer, required) — The UTF-8 encoded file size in bytes.
- `size_kb` (double, required) — The UTF-8 encoded file size in kilobytes, rounded to 2 decimals.

### MalformedResourceIdentifierErrorPayload

- `message` (string, required) — Human readable representation of the error
- `reason` (enum, required) — The machine-readable error reason.
  - Allowed values: `MALFORMED_RESOURCE_IDENTIFIER`
- `malformedResourceIdentifierError` (MalformedResourceIdentifierErrorDetails, required) — Metadata detailing more information about the error.

### ErrorResponseDetail

A plain error message, a list of field-level validation errors, a service validation error, or a domain error object with `reason` and `message`.

- string
- list of ErrorResponseDetailOneOf1Items
- ErrorResponseDetail2
- ErrorResponseDetail3
- ErrorResponseDetail4

### PermissionCheckFailedErrorResponse

- `detail` (PermissionCheckFailedErrorPayload, required) — The error payload.

### MissingAuthenticationErrorResponse

- `detail` (MissingAuthenticationErrorPayload, required) — The error payload.

### SkillCapabilitiesDependenciesItems

- `type`: `integration` (IntegrationSkillDependency)
  - `id` (string, required) — Stable identifier for this dependency within the capability set.
  - `required` (boolean, required) — Whether the dependency must be resolvable for the skill to function.
  - `selector` (IntegrationCapabilitySelector, required)
  - `credential_policy` (enum, optional, nullable) — Credential policy required by this Integration dependency.
    - Allowed values: `invoker`, `fixed_connection`, `project_default`
- `type`: `mcp_server` (McpServerSkillDependency)
  - `id` (string, required) — Stable identifier for this dependency within the capability set.
  - `required` (boolean, required) — Whether the dependency must be resolvable for the skill to function.
  - `selector` (McpServerCapabilitySelector, required)
- `type`: `mcp_tool` (McpToolSkillDependency)
  - `id` (string, required) — Stable identifier for this dependency within the capability set.
  - `required` (boolean, required) — Whether the dependency must be resolvable for the skill to function.
  - `selector` (McpToolCapabilitySelector, required)
- `type`: `registered_tool` (RegisteredToolSkillDependency)
  - `id` (string, required) — Stable identifier for this dependency within the capability set.
  - `required` (boolean, required) — Whether the dependency must be resolvable for the skill to function.
  - `selector` (RegisteredToolCapabilitySelector, required)

### MalformedResourceIdentifierErrorDetails

- `field` (string, required)
- `value` (any, required)
- `expected_format` (string, required)

### ErrorResponseDetailOneOf1Items

- `type` (string, required) — Error type identifier
- `loc` (list of ErrorResponseDetailOneOf1ItemsLocItems, optional) — Path to the error location. Integer segments index into a list.
- `msg` (string, optional) — Human-readable error message. Present on errors produced by FastAPI's own request validation.
- `message` (string, optional) — Human-readable error message. Used instead of `msg` by Rightbrain's own validators.

### ErrorResponseDetail2

Validation error returned by a service after request parsing, such as a Task clone dependency failure.

- `type` ("validation_error", required)
- `errors` (list of ErrorResponseDetailOneOf2ErrorsItems, required)

### ErrorResponseDetail3

Domain error raised via a brain.exc.BaseError subclass. The exact extra field name and shape vary by error type.

- `reason` (string, required) — Machine-readable, upper-snake-case error reason, e.g. RESOURCE_NOT_FOUND, PERMISSION_CHECK_FAILED, TAG_NAME_CONFLICT.
- `message` (string, required) — Human-readable error message

### ErrorResponseDetail4

Integration precondition failure. Uses `code` rather than `reason`, and carries no extra field. Raised by the Gmail trigger routes when the underlying integration is not authorized.

- `code` (string, required) — Machine-readable code, e.g. GMAIL_INTEGRATION_AUTH_REQUIRED.
- `message` (string, required) — Human-readable error message

### PermissionCheckFailedErrorPayload

- `message` (string, required) — Human readable representation of the error
- `reason` (enum, required) — The machine-readable error reason.
  - Allowed values: `PERMISSION_CHECK_FAILED`
- `permissionCheckFailedError` (PermissionCheckFailedErrorDetails, required) — Metadata detailing more information about the error.

### MissingAuthenticationErrorPayload

- `message` (string, required) — Human readable representation of the error
- `reason` (enum, required) — The machine-readable error reason.
  - Allowed values: `MISSING_AUTHENTICATION`
- `missingAuthenticationError` (EmptyErrorDetails, required) — Metadata detailing more information about the error.

### IntegrationCapabilitySelector

- `integration_type` (string, required) — Stable integration type identifier required by the skill.
- `tool_name` (string, required) — Integration tool name required by the skill.

### McpServerCapabilitySelector

- `mcp_server_slug` (string, required) — Canonical MCP server slug required by the skill.

### McpToolCapabilitySelector

- `mcp_server_slug` (string, required) — Canonical MCP server slug required by the skill.
- `tool_name` (string, required) — MCP tool name required by the skill.

### RegisteredToolCapabilitySelector

- `value` (string, required) — Stable registered tool key for the required capability.
- `kind` ("registered_key", optional, default: registered_key) — Selector kind for a platform-registered tool capability.

### ErrorResponseDetailOneOf1ItemsLocItems

- string
- integer

### ErrorResponseDetailOneOf2ErrorsItems

- `type` (string, required) — Error type identifier
- `loc` (list of ErrorResponseDetailOneOf2ErrorsItemsLocItems, optional) — Path to the error location. Integer segments index into a list.
- `msg` (string, optional) — Human-readable error message. Present on errors produced by FastAPI's own request validation.
- `message` (string, optional) — Human-readable error message. Used instead of `msg` by Rightbrain's own validators.

### PermissionCheckFailedErrorDetails

- `permission` (string, required)
- `subject` (IAMObjectErrorDetails, optional, nullable)
- `resource` (IAMObjectErrorDetails, optional, nullable)

### EmptyErrorDetails

### ErrorResponseDetailOneOf2ErrorsItemsLocItems

- string
- integer

### IAMObjectErrorDetails

- `type` (string, required)
- `id` (string, optional, nullable)

## Examples

**Request**

```json
{
  "instructions": "Approve refunds requested within 30 days. Escalate older requests to finance.",
  "annotation": "Clarified the escalation path.",
  "activate": false
}
```

**Response**

```json
{
  "id": "019df849-e12a-b57e-62d4-0e5875e91ef4",
  "skill_id": "019d6b01-1a10-7001-8b1a-2a5c9d4e1001",
  "instructions": "Approve refunds requested within 30 days. Escalate older requests to finance.",
  "skill_metadata": {},
  "capabilities": null,
  "annotation": "Clarified the escalation path.",
  "created": "2026-07-21T15:40:00Z",
  "reference_files": [],
  "asset_files": [],
  "reference_file_contents": [],
  "asset_file_contents": [],
  "script_files": []
}
```

**SDK Code**

```python New revision, left inactive
import requests

url = "https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision"

payload = {
    "instructions": "Approve refunds requested within 30 days. Escalate older requests to finance.",
    "annotation": "Clarified the escalation path.",
    "activate": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript New revision, left inactive
const url = 'https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"instructions":"Approve refunds requested within 30 days. Escalate older requests to finance.","annotation":"Clarified the escalation path.","activate":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go New revision, left inactive
package main

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

func main() {

	url := "https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision"

	payload := strings.NewReader("{\n  \"instructions\": \"Approve refunds requested within 30 days. Escalate older requests to finance.\",\n  \"annotation\": \"Clarified the escalation path.\",\n  \"activate\": false\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby New revision, left inactive
require 'uri'
require 'net/http'

url = URI("https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"instructions\": \"Approve refunds requested within 30 days. Escalate older requests to finance.\",\n  \"annotation\": \"Clarified the escalation path.\",\n  \"activate\": false\n}"

response = http.request(request)
puts response.read_body
```

```java New revision, left inactive
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"instructions\": \"Approve refunds requested within 30 days. Escalate older requests to finance.\",\n  \"annotation\": \"Clarified the escalation path.\",\n  \"activate\": false\n}")
  .asString();
```

```php New revision, left inactive
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision', [
  'body' => '{
  "instructions": "Approve refunds requested within 30 days. Escalate older requests to finance.",
  "annotation": "Clarified the escalation path.",
  "activate": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp New revision, left inactive
using RestSharp;

var client = new RestClient("https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"instructions\": \"Approve refunds requested within 30 days. Escalate older requests to finance.\",\n  \"annotation\": \"Clarified the escalation path.\",\n  \"activate\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift New revision, left inactive
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "instructions": "Approve refunds requested within 30 days. Escalate older requests to finance.",
  "annotation": "Clarified the escalation path.",
  "activate": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.rightbrain.ai/api/v1/org/org_id/project/project_id/skill/skill_id/revision")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```