> This page is for Plattform, version V4 Experimental.
> For other versions, use one of these documentation indexes:
> - V4 (default): https://next.developer.frame.io/platform/v4/llms.txt
> - V4 Experimental: https://next.developer.frame.io/platform/v4-experimental/llms.txt
> - Vorgängerversion: https://next.developer.frame.io/platform/v2/llms.txt

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

# Benutzerdefinierte Aktion erstellen

POST https://api.frame.io/v4/accounts/{account_id}/workspaces/{workspace_id}/actions
Content-Type: application/json

Create a custom action in a workspace.
This endpoint has been added to `Current Version` of the API.
Please see [https://next.developer.frame.io/platform/v4/api-reference/custom-actions/actions-create](https://next.developer.frame.io/platform/v4/api-reference/custom-actions/actions-create).
Rate Limits: 10 calls per 1.00 minute(s) per account\_user

Reference: https://next.developer.frame.io/platform/api-reference/custom-actions/actions-create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `account_id` (string, required)
- `workspace_id` (string, required)

### Headers

- `api-version` (enum, required)
  - Allowed values: `experimental`

### Body (application/json)

This endpoint expects an ActionCreateParams.

- `data` (ActionCreateParamsData, required)

## Response

### 201

Created

- `data` (ActionCreateResponseData, required)

## Errors

### 400 Bad Request Error

Bad request

- `errors` (list of BadRequestErrorsItems, required)

### 401 Unauthorized Error

Unauthorized

- `errors` (list of UnauthorizedErrorsItems, required)

### 403 Forbidden Error

Forbidden

- `errors` (list of ForbiddenErrorsItems, required)

### 404 Not Found Error

Not found

- `errors` (list of NotFoundErrorsItems, required)

### 409 Conflict Error

Conflict

- `errors` (list of ConflictErrorsItems, required)

### 422 Unprocessable Entity Error

Unprocessable content

- `errors` (list of UnprocessableContentErrorsItems, required)

### 429 Too Many Requests Error

Too many requests

- `errors` (list of TooManyRequestsErrorsItems, required)

## Types

### ActionCreateParamsData

- `description` (string, required) — Action description
- `event` (string, required) — Event name sent to `url`
- `name` (string, required) — Action name
- `url` (string, required) — URL where `event` is sent
- `multi_asset` (boolean, optional, default: true) — Manages action trigger on multiple assets
- `timeout` (integer, optional) — Timeout for the action requests in seconds

### ActionCreateResponseData

- `active` (boolean, required) — Active Status
- `created_at` (string, required)
- `creator_id` (string, required) — Creator ID
- `deleted_at` (string, required, nullable)
- `description` (string, required) — Action Description
- `event` (string, required) — Event Name
- `id` (string, required) — Action ID
- `name` (string, required) — Action Name
- `updated_at` (string, required)
- `url` (string, required) — Action URL
- `workspace_id` (string, required) — Workspace ID
- `secret` (string, required) — Secret used to validate underlying webhook requests. Make sure to store your secret. You won’t be able to see it again!
- `multi_asset` (boolean, optional) — Manages action trigger on multiple assets
- `timeout` (integer, optional) — Timeout for the action requests in seconds

### BadRequestErrorsItems

- `detail` (string, required)
- `source` (BadRequestErrorsItemsSource, optional)
- `title` (string, optional)

### UnauthorizedErrorsItems

- `detail` (string, required)
- `source` (UnauthorizedErrorsItemsSource, optional)
- `title` (string, optional)

### ForbiddenErrorsItems

- `detail` (string, required)
- `source` (ForbiddenErrorsItemsSource, optional)
- `title` (string, optional)

### NotFoundErrorsItems

- `detail` (string, required)
- `source` (NotFoundErrorsItemsSource, optional)
- `title` (string, optional)

### ConflictErrorsItems

- `detail` (string, required)
- `source` (ConflictErrorsItemsSource, optional)
- `title` (string, optional)

### UnprocessableContentErrorsItems

- `detail` (string, required)
- `source` (UnprocessableContentErrorsItemsSource, optional)
- `title` (string, optional)

### TooManyRequestsErrorsItems

- `detail` (string, required)
- `source` (TooManyRequestsErrorsItemsSource, optional)
- `title` (string, optional)

### BadRequestErrorsItemsSource

- `pointer` (string, optional)

### UnauthorizedErrorsItemsSource

- `pointer` (string, optional)

### ForbiddenErrorsItemsSource

- `pointer` (string, optional)

### NotFoundErrorsItemsSource

- `pointer` (string, optional)

### ConflictErrorsItemsSource

- `pointer` (string, optional)

### UnprocessableContentErrorsItemsSource

- `pointer` (string, optional)

### TooManyRequestsErrorsItemsSource

- `pointer` (string, optional)

## Examples

**Request**

```json
{
  "data": {
    "description": "customizing our workflow",
    "event": "my.event",
    "name": "First Custom Action",
    "url": "https://example.com/custom-action",
    "timeout": 7
  }
}
```

**Response**

```json
{
  "data": {
    "active": true,
    "created_at": "2024-08-23T14:39:29.125812Z",
    "creator_id": "aa1bd871-96d0-44cd-b3e1-3e66518f3355",
    "deleted_at": null,
    "description": "customizing our workflow",
    "event": "my.event",
    "id": "77311a83-d884-4fa3-877d-847f282870da",
    "name": "First Custom Action",
    "updated_at": "2024-08-23T14:39:29.125812Z",
    "url": "https://example.com/custom-action",
    "workspace_id": "a13c7b26-5629-4a27-928e-36d70c5fe950",
    "secret": "<secret>",
    "multi_asset": true,
    "timeout": 7
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/actions"

payload = { "data": {
        "description": "customizing our workflow",
        "event": "my.event",
        "name": "First Custom Action",
        "url": "https://example.com/custom-action",
        "timeout": 7
    } }
headers = {
    "api-version": "experimental",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/actions';
const options = {
  method: 'POST',
  headers: {
    'api-version': 'experimental',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"data":{"description":"customizing our workflow","event":"my.event","name":"First Custom Action","url":"https://example.com/custom-action","timeout":7}}'
};

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.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/actions"

	payload := strings.NewReader("{\n  \"data\": {\n    \"description\": \"customizing our workflow\",\n    \"event\": \"my.event\",\n    \"name\": \"First Custom Action\",\n    \"url\": \"https://example.com/custom-action\",\n    \"timeout\": 7\n  }\n}")

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

	req.Header.Add("api-version", "experimental")
	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.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/actions")

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

request = Net::HTTP::Post.new(url)
request["api-version"] = 'experimental'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"description\": \"customizing our workflow\",\n    \"event\": \"my.event\",\n    \"name\": \"First Custom Action\",\n    \"url\": \"https://example.com/custom-action\",\n    \"timeout\": 7\n  }\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.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/actions")
  .header("api-version", "experimental")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"description\": \"customizing our workflow\",\n    \"event\": \"my.event\",\n    \"name\": \"First Custom Action\",\n    \"url\": \"https://example.com/custom-action\",\n    \"timeout\": 7\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/actions', [
  'body' => '{
  "data": {
    "description": "customizing our workflow",
    "event": "my.event",
    "name": "First Custom Action",
    "url": "https://example.com/custom-action",
    "timeout": 7
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'api-version' => 'experimental',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/actions");
var request = new RestRequest(Method.POST);
request.AddHeader("api-version", "experimental");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": {\n    \"description\": \"customizing our workflow\",\n    \"event\": \"my.event\",\n    \"name\": \"First Custom Action\",\n    \"url\": \"https://example.com/custom-action\",\n    \"timeout\": 7\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "api-version": "experimental",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    "description": "customizing our workflow",
    "event": "my.event",
    "name": "First Custom Action",
    "url": "https://example.com/custom-action",
    "timeout": 7
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v4/accounts/98dab221-252b-43dc-bb78-24d582cd5466/workspaces/39742525-7d27-47bb-835c-204cea1d18fc/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()
```