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

# publishFarcasterAction

User actions across apps

> **Group:** Action APIs

Use this when you need: **User actions across apps**.

## Usage

```ts theme={"system"}
import { NeynarAPIClient, Configuration } from "@neynar/nodejs-sdk";

const client = new NeynarAPIClient(
  new Configuration({ apiKey: "YOUR_NEYNAR_API_KEY" })
);

const res = await client.publishFarcasterAction({
  farcasterActionReqBody: {
    signer_uuid: "19d0c5fd-9b33-4a48-a0e2-bc7b0555baec", // required
    base_url: "https://example.com", // required
    action: {
      type: "action_type", // required
      payload: { // optional
        // action-specific payload data
      }
    }
  }
});
console.log(res);
```

## Parameters

| Parameter                               | Type                           | Required | Description                                                                                                   |
| --------------------------------------- | ------------------------------ | :------: | ------------------------------------------------------------------------------------------------------------- |
| `farcasterActionReqBody`                | `FarcasterActionReqBody`       |     ✅    | -                                                                                                             |
| `farcasterActionReqBody.signer_uuid`    | `string`                       |     ✅    | The signer\_uuid of the user on behalf of whom the action is being performed. Must be paired with the API key |
| `farcasterActionReqBody.base_url`       | `string`                       |     ✅    | The base URL of the app on which the action is being performed                                                |
| `farcasterActionReqBody.action`         | `FarcasterActionReqBodyAction` |     ✅    | The action object containing type and optional payload                                                        |
| `farcasterActionReqBody.action.type`    | `string`                       |     ✅    | The type of action being performed                                                                            |
| `farcasterActionReqBody.action.payload` | `object`                       |     ❌    | The payload of the action being performed (optional, action-specific data)                                    |

## Response

Returns a `RequestArgs` object.

## Error Handling

```ts theme={"system"}
try {
  const res = await client.publishFarcasterAction({
    farcasterActionReqBody: {
      signer_uuid: "19d0c5fd-9b33-4a48-a0e2-bc7b0555baec",
      base_url: "https://example.com",
      action: {
        type: "action_type",
        payload: {
          // action-specific payload data
        }
      }
    }
  });
  // use res
} catch (err) {
  // Axios/HTTP errors, invalid params, auth issues, etc.
  console.error(err);
}
```

## Related API Reference

📖 **API Reference:** [publishFarcasterAction](/reference/publish-farcaster-action)

For detailed information about the HTTP endpoint, request/response schemas, and additional examples, see the complete API documentation.

## Tips

* Provide a **viewerFid** when supported to respect mutes/blocks and include `viewer_context`.
* Keep requests scoped (e.g., use `limit`) to improve latency.
* Cache results where sensible.
