> 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.

# Update an action definition

PATCH /api/actions/{id}
Content-Type: application/json

Patches a non-archived custom action definition. The `slug` is immutable; fields are validated against the definition's kind (a mismatch is rejected, never silently dropped).

Reference: https://docs.cloudraker.com/api/raker-one-api/actions/patch-actions-by-id

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: RakerOne API
  version: 1.0.0
paths:
  /actions/{id}:
    patch:
      operationId: patch-actions-by-id
      summary: Update an action definition
      description: >-
        Patches a non-archived custom action definition. The `slug` is
        immutable; fields are validated against the definition's kind (a
        mismatch is rejected, never silently dropped).
      tags:
        - subpackage_actions
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            WorkOS session JWT or an organization API key, sent as
            `Authorization: Bearer <token>`.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The updated definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionDefinitionResource'
        '400':
          description: Bad request — the body or parameters failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized — missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                icon:
                  type:
                    - string
                    - 'null'
                output:
                  $ref: >-
                    #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput
                execution:
                  $ref: >-
                    #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecution
                generation:
                  $ref: >-
                    #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGeneration
                fill:
                  $ref: >-
                    #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFill
servers:
  - url: /api
    description: Current origin
  - url: https://app.raker.one/api
    description: Production
components:
  schemas:
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput0:
      type: object
      properties:
        kind:
          type: string
          enum:
            - record-type
        objectDefinitionId:
          type: string
      required:
        - kind
        - objectDefinitionId
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput0
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsType:
      type: string
      enum:
        - text
        - long_text
        - number
        - currency
        - boolean
        - date
        - datetime
        - select
        - multi_select
        - email
        - phone
        - url
        - address
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsType
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsOptionsItemsColor:
      type: string
      enum:
        - gray
        - green
        - turquoise
        - sky
        - blue
        - purple
        - pink
        - red
        - orange
        - yellow
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsOptionsItemsColor
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsOptionsItems:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
        color:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsOptionsItemsColor
        position:
          type: number
          format: double
      required:
        - value
        - label
        - color
        - position
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsOptionsItems
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItems:
      type: object
      properties:
        key:
          type: string
        label:
          type: string
        type:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsType
        description:
          type: string
          default: ''
        icon:
          type:
            - string
            - 'null'
        groupId:
          type:
            - string
            - 'null'
        position:
          type: number
          format: double
          default: 0
        required:
          type: boolean
          default: false
        unique:
          type: boolean
          default: false
        options:
          type: array
          items:
            $ref: >-
              #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItemsOptionsItems
        settings:
          type: object
          additionalProperties:
            description: Any type
        defaultValue:
          description: Any type
        archived:
          type: boolean
          default: false
      required:
        - key
        - label
        - type
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItems
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput1:
      type: object
      properties:
        kind:
          type: string
          enum:
            - inline
        fields:
          type: array
          items:
            $ref: >-
              #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutputOneOf1FieldsItems
        labelFieldKey:
          type: string
      required:
        - kind
        - fields
        - labelFieldKey
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput1
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput:
      oneOf:
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput0
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput1
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaOutput
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModeOneOf0Cardinality:
      type: string
      enum:
        - one-per-input
        - one-total
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModeOneOf0Cardinality
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode0:
      type: object
      properties:
        type:
          type: string
          enum:
            - extract-schema
        cardinality:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModeOneOf0Cardinality
      required:
        - type
        - cardinality
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode0
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode1:
      type: object
      properties:
        type:
          type: string
          enum:
            - extract-table-documents
      required:
        - type
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode1
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode:
      oneOf:
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode0
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode1
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModelProvider:
      type: string
      enum:
        - workers-ai
        - anthropic
        - aws-bedrock
        - azure-openai
        - google-vertex-ai
        - huggingface
        - openai
        - perplexity-ai
        - replicate
        - groq
        - cohere
        - google-ai-studio
        - mistral
        - grok
        - openrouter
        - deepseek
        - cerebras
        - cartesia
        - elevenlabs
        - adobe-firefly
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModelProvider
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModel:
      type: object
      properties:
        provider:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModelProvider
        model:
          type: string
      required:
        - provider
        - model
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModel
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecution:
      type: object
      properties:
        mode:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionMode
        model:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecutionModel
          default:
            provider: anthropic
            model: claude-sonnet-4-6
        instructions:
          type: string
      required:
        - mode
        - instructions
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaExecution
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate0:
      type: object
      properties:
        source:
          type: string
          enum:
            - library
        templateId:
          type: string
      required:
        - source
        - templateId
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate0
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate1:
      type: object
      properties:
        source:
          type: string
          enum:
            - action
        templateId:
          type: string
      required:
        - source
        - templateId
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate1
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate:
      oneOf:
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate0
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate1
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationCardinality:
      type: string
      enum:
        - one-per-record
        - all-records
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationCardinality
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutputFormat:
      type: string
      enum:
        - pdf
        - docx
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutputFormat
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutputWatermark:
      type: object
      properties:
        text:
          type: string
        color:
          type: string
      required:
        - text
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutputWatermark
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutput:
      type: object
      properties:
        format:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutputFormat
        filenameTemplate:
          type: string
        tags:
          type: array
          items:
            type: string
          default: []
        watermark:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutputWatermark
      required:
        - format
        - filenameTemplate
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutput
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaGeneration:
      type: object
      properties:
        template:
          oneOf:
            - $ref: >-
                #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationTemplate
            - type: 'null'
        cardinality:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationCardinality
        output:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaGenerationOutput
      required:
        - template
        - cardinality
        - output
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaGeneration
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm0:
      type: object
      properties:
        source:
          type: string
          enum:
            - library
        templateId:
          type: string
      required:
        - source
        - templateId
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm0
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm1:
      type: object
      properties:
        source:
          type: string
          enum:
            - action
        templateId:
          type: string
      required:
        - source
        - templateId
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm1
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm:
      oneOf:
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm0
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm1
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding0:
      type: object
      properties:
        kind:
          type: string
          enum:
            - record-type
        objectDefinitionId:
          type: string
      required:
        - kind
        - objectDefinitionId
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding0
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding1:
      type: object
      properties:
        kind:
          type: string
          enum:
            - free-form
      required:
        - kind
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding1
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding:
      oneOf:
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding0
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding1
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue0:
      type: object
      properties:
        kind:
          type: string
          enum:
            - path
        path:
          type: string
      required:
        - kind
        - path
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue0
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue1:
      type: object
      properties:
        kind:
          type: string
          enum:
            - template
        template:
          type: string
      required:
        - kind
        - template
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue1
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue:
      oneOf:
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue0
        - $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue1
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsControl:
      type: string
      enum:
        - text
        - checkbox
        - date
        - number
        - currency
        - multiline
      title: >-
        ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsControl
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItems:
      type: object
      properties:
        key:
          type: string
        value:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsValue
        description:
          type: string
          default: ''
        control:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItemsControl
        format:
          type: string
      required:
        - key
        - value
        - control
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItems
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillCardinality:
      type: string
      enum:
        - one-per-record
        - all-records-merged
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillCardinality
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillOutputFormat:
      type: string
      enum:
        - auto
        - pdf
        - png
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillOutputFormat
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillOutput:
      type: object
      properties:
        format:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillOutputFormat
        filenameTemplate:
          type: string
        tags:
          type: array
          items:
            type: string
          default: []
      required:
        - format
        - filenameTemplate
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillOutput
    ActionsIdPatchRequestBodyContentApplicationJsonSchemaFill:
      type: object
      properties:
        form:
          oneOf:
            - $ref: >-
                #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillForm
            - type: 'null'
        binding:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillBinding
        mappings:
          type: array
          items:
            $ref: >-
              #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillMappingsItems
          default: []
        confidenceThreshold:
          type:
            - number
            - 'null'
          format: double
        cardinality:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillCardinality
        output:
          $ref: >-
            #/components/schemas/ActionsIdPatchRequestBodyContentApplicationJsonSchemaFillOutput
      required:
        - form
        - binding
        - cardinality
        - output
      title: ActionsIdPatchRequestBodyContentApplicationJsonSchemaFill
    JsonObject:
      type: object
      additionalProperties:
        description: Any type
      description: An arbitrary JSON object.
      title: JsonObject
    ActionDefinitionResource:
      type: object
      properties:
        definition:
          $ref: '#/components/schemas/JsonObject'
      required:
        - definition
      description: A custom action definition.
      title: ActionDefinitionResource
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error code (e.g. `invalid_body`, `not_found`).
        issues:
          type: array
          items:
            description: Any type
          description: Schema-validation issues, present when `error` is `invalid_body`.
      required:
        - error
      description: Standard API error response.
      title: ErrorResponse
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        WorkOS session JWT or an organization API key, sent as `Authorization:
        Bearer <token>`.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "definition": {}
}
```

**SDK Code**

```python
import requests

url = "https://api/actions/id"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api/actions/id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go
package main

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

func main() {

	url := "https://api/actions/id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", 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/actions/id")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.patch("https://api/actions/id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api/actions/id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api/actions/id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api/actions/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```