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

# personal_sign

> Sign a message using the personal_sign method.

### SDK methods

Learn more about signing messages using our SDKs [here](https://docs.privy.io/wallets/using-wallets/ethereum/sign-a-message.md).

***

> [!WARNING]
>
> **Idempotency on errors:** On 4xx or 5xx, Privy caches the response and replays it for the same
> key. Generate a new key to retry after a server error. Policy violations are an exception and
> allow same-key retries.

```sh cURL theme={"system"}
curl --request POST \
  --url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '{
  "method": "personal_sign",
  "params": {
    "message": "Hello from Privy!",
    "encoding": "utf-8"
  }
}'
```

```json 200 theme={"system"}
{
  "method": "personal_sign",
  "data": {
    "signature": "0x0db9c7bd881045cbba28c347de6cc32a653e15d7f6f2f1cec21d645f402a64196e877eb45d3041f8d2ab1a76f57f408b63894cfc6f339d8f584bd26efceae3081c",
    "encoding": "hex"
  }
}
```

### Headers

**privy-app-id** `string` *required*

ID of your Privy app.

**privy-authorization-signature** `string`

Request authorization signature. If multiple signatures are required, they should be comma
separated.

**privy-request-expiry** `string`

Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the
request must be processed.

### Path Parameters

**wallet\_id** `string` *required*

ID of the wallet to get.

### Body

**method** `string` *required*

Available options: `personal_sign`

**params** `object` *required*

**child properties**

**message** `string`

**encoding** `string`

Available options: `utf-8`, `hex`

**caip2** `string`

A CAIP-2 chain ID specifying which chain to sign on (e.g. `eip155:1`). Required when using
`signature_options`.

**signature\_options** `object`

Options controlling signature production. Required for ERC-1271 signing with EIP-7702 delegated
(gas-sponsored) wallets. Learn more in the [ERC-1271 signatures guide](https://docs.privy.io/recipes/evm/erc-1271-signatures.md).

**child properties**

**type** `enum\<string\>` *required*

The type of cryptographic signature to produce. Use `erc1271` for ERC-1271 compliant
signatures for smart account wallets, or `ecdsa` for standard ECDSA signatures.

Available options: `ecdsa`, `erc1271`

### Response

**method** `enum\<string\>` *required*

Available options: `personal_sign`

**data** `object` *required*

**child properties**

**signature** `string` *required*

**encoding** `enum\<string\>`

Available options: `utf-8`, `hex`
