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

# Save an action

POST https://api.cloudraker.com/v1/actions
Content-Type: application/json

Saves a reusable, named configuration for a capability so calls stop repeating themselves.

Pass a saved action to any run as `action: "<id or slug>"`. Inline config on the call is deep-merged over the saved config, and inline wins — so one saved action can be nudged per call without being redefined.

```json
{
  "capability": "extract",
  "name": "W-9 basics",
  "config": {
    "schema": {
      "type": "object",
      "properties": {
        "business_name": { "type": ["string", "null"] },
        "tax_classification": { "type": ["string", "null"] }
      }
    }
  }
}
```

Saved actions are also what governance, record-type binding and stable configuration under [keep](https://docs.cloudraker.com/api/cloud-raker-api/runs/keep-run) hang off. Check [the catalog](https://docs.cloudraker.com/api/cloud-raker-api/actions/list-capabilities) for the config schema of the capability you are saving.

**Learn more:** [Pipeline guide](https://docs.cloudraker.com/capabilities/pipeline)

Reference: https://docs.cloudraker.com/api/cloud-raker-api/actions/create-action

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: CloudRaker API
  version: 1.0.0
paths:
  /v1/actions:
    post:
      operationId: create-action
      summary: Save an action
      description: >-
        Saves a reusable, named configuration for a capability so calls stop
        repeating themselves.


        Pass a saved action to any run as `action: "<id or slug>"`. Inline
        config on the call is deep-merged over the saved config, and inline wins
        — so one saved action can be nudged per call without being redefined.


        ```json

        {
          "capability": "extract",
          "name": "W-9 basics",
          "config": {
            "schema": {
              "type": "object",
              "properties": {
                "business_name": { "type": ["string", "null"] },
                "tax_classification": { "type": ["string", "null"] }
              }
            }
          }
        }

        ```


        Saved actions are also what governance, record-type binding and stable
        configuration under
        [keep](https://docs.cloudraker.com/api/cloud-raker-api/runs/keep-run)
        hang off. Check [the
        catalog](https://docs.cloudraker.com/api/cloud-raker-api/actions/list-capabilities)
        for the config schema of the capability you are saving.


        **Learn more:** [Pipeline
        guide](https://docs.cloudraker.com/capabilities/pipeline)
      tags:
        - actions
      parameters:
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '201':
          description: The saved action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1Action'
        '400':
          description: >-
            Ambiguous redaction target (`ambiguous_capability`), or a
            `config.schema` outside the extraction schema dialect
            (`invalid_schema`).
          content:
            application/json:
              schema:
                description: Any type
        '429':
          description: >-
            Rate limited. The `/v1` API allows at least **67 requests per minute
            per organization** (about 1,000 requests per 15 minutes) — a
            guaranteed floor, enforced per edge location, so a geographically
            spread caller may get more. Wait for the `Retry-After` interval and
            retry — the error is `retryable`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateActionRequestTooManyRequestsError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1CreateActionBody'
servers:
  - url: https://api.cloudraker.com
    description: Production
  - url: https://api.staging.raker.one
    description: Staging
  - url: https://api.dev.raker.one
    description: Development
components:
  schemas:
    V1CreateActionBodyCapability:
      type: string
      enum:
        - extract
        - redact
        - fill
        - sign
      title: V1CreateActionBodyCapability
    V1CreateActionBody:
      type: object
      properties:
        capability:
          $ref: '#/components/schemas/V1CreateActionBodyCapability'
        name:
          type: string
        config:
          type: object
          additionalProperties:
            description: Any type
        mimeType:
          type: string
      required:
        - capability
        - name
      title: V1CreateActionBody
    V1ActionCapability:
      type: string
      enum:
        - extract
        - redact
        - fill
        - sign
      title: V1ActionCapability
    V1Action:
      type: object
      properties:
        object:
          type: string
          enum:
            - action
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        capability:
          $ref: '#/components/schemas/V1ActionCapability'
        config:
          type: object
          additionalProperties:
            description: Any type
      required:
        - object
        - id
        - slug
        - name
        - capability
        - config
      title: V1Action
    V1ActionsPostResponsesContentApplicationJsonSchemaCode:
      type: string
      enum:
        - rate_limited
      title: V1ActionsPostResponsesContentApplicationJsonSchemaCode
    CreateActionRequestTooManyRequestsError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1ActionsPostResponsesContentApplicationJsonSchemaCode
        message:
          type: string
        retryable:
          type: boolean
        requestId:
          type: string
        docUrl:
          type: string
      required:
        - code
        - message
        - retryable
        - requestId
      title: CreateActionRequestTooManyRequestsError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Request**

```json
{
  "capability": "extract",
  "name": "Medical intake"
}
```

**Response**

```json
{
  "object": "action",
  "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
  "slug": "medical-intake",
  "name": "Medical intake",
  "capability": "extract",
  "config": {}
}
```

**SDK Code**

```typescript
import { CloudRakerClient } from "@cloudraker/api";

async function main() {
    const client = new CloudRakerClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.actions.createAction({
        capability: "extract",
        name: "Medical intake",
    });
}
main();

```

```python
from cloudraker import CloudRaker

client = CloudRaker(
    token="YOUR_TOKEN_HERE",
)

client.actions.create_action(
    capability="extract",
    name="Medical intake",
)

```

```go
package main

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

func main() {

	url := "https://api.cloudraker.com/v1/actions"

	payload := strings.NewReader("{\n  \"capability\": \"extract\",\n  \"name\": \"Medical intake\"\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
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/v1/actions")

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  \"capability\": \"extract\",\n  \"name\": \"Medical intake\"\n}"

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.cloudraker.com/v1/actions")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"capability\": \"extract\",\n  \"name\": \"Medical intake\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.cloudraker.com/v1/actions', [
  'body' => '{
  "capability": "extract",
  "name": "Medical intake"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/v1/actions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"capability\": \"extract\",\n  \"name\": \"Medical intake\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "capability": "extract",
  "name": "Medical intake"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/v1/actions")! 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()
```