> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update action

> Update an action, including its input and output schema.

Updates one [`Action`](/en/api-reference/actions-and-attributes#action-or-attribute-object). This is where you set the `inputSchema` and `outputSchema`.

<Warning>
  An action returns nothing to a rule unless it declares an `outputSchema`. Set it here and map each output field to a Data Step response path.
</Warning>

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `write` scope.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  Action ID to update.
</ParamField>

## Body parameters

All fields are optional. Send only what you want to change.

<ParamField body="name" type="string">
  Updated display name.
</ParamField>

<ParamField body="description" type="string">
  Updated description.
</ParamField>

<ParamField body="alwaysGet" type="boolean">
  Send `true` to convert the action into an attribute.
</ParamField>

<ParamField body="inputSchema" type="InputSchemaField[]">
  Typed inputs. See [InputSchemaField](/en/api-reference/actions-and-attributes#inputschemafield-object).
</ParamField>

<ParamField body="outputSchema" type="OutputSchemaField[]">
  Typed outputs. See [OutputSchemaField](/en/api-reference/actions-and-attributes#outputschemafield-object).
</ParamField>

## Response

Returns the updated [`Action / Attribute`](/en/api-reference/actions-and-attributes#action-or-attribute-object).

## Errors

<AccordionGroup>
  <Accordion title="400 Bad Request" icon="circle-exclamation">
    The body is malformed.
  </Accordion>

  <Accordion title="401 Unauthorized" icon="lock">
    The API key is missing, malformed, revoked, or invalid.
  </Accordion>

  <Accordion title="403 Forbidden" icon="shield-halved">
    The API key does not include the `write` scope required for this route.
  </Accordion>

  <Accordion title="404 Not Found" icon="ghost">
    No action with that ID exists in your workspace.
  </Accordion>

  <Accordion title="500 Internal Server Error" icon="triangle-exclamation">
    Fini failed while updating the record in storage.
  </Accordion>
</AccordionGroup>
