---
title: "Raw sign"
method: POST
path: "/v1/wallets/{wallet_id}/raw_sign"
tags: ["Wallets"]
---

# Raw sign

`POST /v1/wallets/{wallet_id}/raw_sign`

Sign a message with a wallet by wallet ID.

## Path parameters

- `wallet_id` string, required — ID of the wallet.

## 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.
- `privy-idempotency-key` string — Idempotency keys ensure API requests are executed only once within a 24-hour window.

## Request body

- RawSignInput — Provide either `hash` (to sign a pre-computed hash) OR `bytes`, `encoding`, and `hash_function` (to hash and then sign). These options are mutually exclusive.
  - `params` union, required — Parameters for the `raw_sign` RPC.
    - object — Parameters for signing a pre-computed hash with the `raw_sign` RPC.
      - `hash` string, required — The hash to sign.
    - object — Parameters for hashing and signing bytes with the `raw_sign` RPC.
      - `bytes` string, required — The bytes to hash and sign.
      - `encoding` 'utf-8' | 'hex' | 'base64', required — Encoding scheme for the bytes.
      - `hash_function` 'keccak256' | 'sha256' | 'blake2b256', required — Hash function to use for the bytes.

## Response `200`

Signature and encoding.

- RawSignResponse — Response to the `raw_sign` RPC.
  - `data` RawSignResponseData, required — Data returned by the `raw_sign` RPC.
    - `encoding` 'hex', required
    - `signature` string, required — A hex-encoded string prefixed with '0x', capped at 100002 characters (50,000 bytes).
  - `method` 'raw_sign', required

---

[API](https://skmtc.net/privy-io/apis/privy-api.md) · [All operations](https://skmtc.net/privy-io/apis/privy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/privy-io/privy-api/revisions/bb2eb34156cc/schema)
