Knit API Documentation
Create Signing Request
{{baseUrl}}/api/v1/managed-signing/requestsThis endpoint creates a new signing request. Supports EVM transactions, EIP-712 typed data signing, and EIP-191 message signing.
Signing Request Types
| Type | Description |
|---|---|
evm_tx | EVM transaction signing (e.g., ERC20 approvals, raw transactions) |
eip712 | EIP-712 typed data signing (structured data with domain separator) |
eip191 | EIP-191 message signing (personal sign messages) |
Supported Networks
Production
ETHEREUM_MAINNETMATIC_MAINNETBSC_MAINNETBASE_MAINNET
Testnet (Sandbox/Dev only)
MATIC_AMOY- Polygon Amoy testnet
Headers
X-API-KEY: Your API key for authentication.Accept: Set toapplication/jsonto receive responses in JSON format.Content-Type: Set toapplication/json.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
walletId | string | Yes | Local wallet ID |
network | string | Yes | Target network |
type | string | Yes | Request type (evm_tx, eip712, or eip191) |
kind | string | Conditional | Transaction kind (required for evm_tx, e.g., erc20_approve) |
payload | object | Yes | Request payload |
broadcast | boolean | No | Whether to broadcast the transaction |
idempotencyKey | string | No | Idempotency key for request deduplication |
EVM Transaction (ERC20 Approve)
{
"walletId": "<local-wallet-id>",
"network": "MATIC_MAINNET",
"type": "evm_tx",
"kind": "erc20_approve",
"payload": {
"token": "0xToken",
"spender": "0xSpender",
"amount": "10"
},
"broadcast": false,
"idempotencyKey": "optional-idem-key"
}Payload Fields for ERC20 Approve
| Field | Type | Description |
|---|---|---|
token | string | Token contract address |
spender | string | Spender address |
amount | string | Approval amount |
EIP-712 Typed Data
{
"walletId": "<local-wallet-id>",
"network": "ETHEREUM_MAINNET",
"type": "eip712",
"payload": {
"typedData": {
"primaryType": "Permit",
"domain": {
"name": "USD Coin",
"version": "2",
"chainId": 1,
"verifyingContract": "0xToken"
},
"types": {
"Permit": [
{ "name": "owner", "type": "address" }
]
},
"message": {
"owner": "0xOwner",
"spender": "0xSpender"
}
}
}
}Important: typedData.types and typedData.message keys must match the EIP-712 schema exactly and should not be camelCased.
Payload Fields for EIP-712
| Field | Type | Description |
|---|---|---|
typedData | object | EIP-712 typed data structure |
typedData.primaryType | string | Primary type name |
typedData.domain | object | Domain separator fields |
typedData.types | object | Type definitions |
typedData.message | object | Message to sign |
EIP-191 Message Signing
{
"walletId": "<local-wallet-id>",
"network": "ETHEREUM_MAINNET",
"type": "eip191",
"payload": {
"message": "Sign this message to verify ownership"
}
}Payload Fields for EIP-191
| Field | Type | Description |
|---|---|---|
message | string | The message to sign |
EIP-191 is commonly used for:
- Wallet ownership verification
- Off-chain authentication
- Simple message signing without structured data
Sample Request (EVM TX)
curl --location -g '{{baseUrl}}/api/v1/managed-signing/requests' \
--header 'X-API-KEY: {{apiKey}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"walletId": "<local-wallet-id>",
"network": "MATIC_MAINNET",
"type": "evm_tx",
"kind": "erc20_approve",
"payload": {
"token": "0xToken",
"spender": "0xSpender",
"amount": "10"
},
"broadcast": false
}'Sample Response
Sample Response
{
"statusCode": 201,
"message": "Signing request created",
"data": {
"id": "<local-request-id>",
"businessId": "<business-id>",
"walletId": "<local-wallet-id>",
"network": "MATIC_MAINNET",
"type": "evm_tx",
"kind": "erc20_approve",
"status": "AWAITING_APPROVAL",
"payload": {
"token": "0xToken",
"spender": "0xSpender",
"amount": "10"
},
"broadcast": false,
"createdAt": "2026-01-20T18:30:40.912Z",
"updatedAt": "2026-01-20T18:30:40.912Z"
},
"success": true
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Local request ID (use this in subsequent requests) |
businessId | string | Your business ID |
walletId | string | Local wallet ID |
network | string | Target network |
type | string | Request type |
kind | string | Transaction kind |
status | string | Request status |
payload | object | Request payload |
broadcast | boolean | Broadcast flag |
signature | string | The cryptographic signature (when signed) |
rawSignedTx | string | Full signed transaction (if broadcast: false) |
txHash | string | Transaction hash (if broadcast: true) |
decisionTrace | object | Policy evaluation details |
errorMessage | string | Error details (if status is FAILED or POLICY_DENIED) |
createdAt | string | Creation timestamp |
updatedAt | string | Last update timestamp |
Request Statuses
| Status | Description |
|---|---|
AWAITING_APPROVAL | Request is pending manual approval (exceeds policy threshold) |
SIGNED | Request was signed successfully |
POLICY_DENIED | Request was denied by policy rules |
FAILED | Request failed (see errorMessage for details) |