HFA Docs

OpenAPI JSON: /openapi.json

Agent skill: /skill.md

Skill manifest: /skill/manifest.json

LLM discovery: /.well-known/llms.txt

MethodPathSummary
GET/api/pairing-infoGet pairing info for an agent and execution mode
POST/api/devicesRegister a device for push approvals
GET/api/devicesList devices
DELETE/api/devices/:idDelete a registered device
GET/api/notificationsList notifications
GET/api/notifications/:idGet one notification with structured approval context
POST/api/draftsCreate a transaction draft with ERC-7730 clear-signing and Safe transaction payload
POST/api/requestsSubmit a signed agent request for human approval
GET/api/requestsList agent requests
GET/api/requests/:idGet one agent request
POST/api/responsesRecord a human approval response
POST/api/turnkey/hfa/setup-sessionsCreate an HFA Turnkey wallet setup session
GET/api/turnkey/hfa/setup-sessions/:idRead an HFA Turnkey setup session
POST/api/turnkey/draftsCreate a Turnkey transaction draft with ERC-7730 clear-signing
POST/api/turnkey/requestsSubmit a Turnkey CONSENSUS_NEEDED activity for human approval
GET/api/turnkey/requests/:idGet one Turnkey HFA request

Route Contracts

GET /api/pairing-info

Get pairing info for an agent and execution mode

Query Params

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "agent"
  ],
  "properties": {
    "agent": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "mode": {
      "anyOf": [
        {
          "const": "relay",
          "type": "string"
        },
        {
          "const": "safe",
          "type": "string"
        }
      ]
    }
  }
}

Response 200

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "agentAddress",
    "executionMode",
    "safeAddress"
  ],
  "properties": {
    "agentAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "executionMode": {
      "anyOf": [
        {
          "const": "relay",
          "type": "string"
        },
        {
          "const": "safe",
          "type": "string"
        }
      ]
    },
    "safeAddress": {
      "anyOf": [
        {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

POST /api/devices

Register a device for push approvals

Request Body

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "subscription"
  ],
  "properties": {
    "subscription": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "endpoint",
        "keys"
      ],
      "properties": {
        "endpoint": {
          "minLength": 1,
          "type": "string"
        },
        "expirationTime": {
          "anyOf": [
            {
              "minimum": 0,
              "description": "Unix timestamp in milliseconds",
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "keys": {
          "additionalProperties": false,
          "type": "object",
          "required": [
            "p256dh",
            "auth"
          ],
          "properties": {
            "p256dh": {
              "minLength": 1,
              "type": "string"
            },
            "auth": {
              "minLength": 1,
              "type": "string"
            }
          }
        }
      }
    },
    "agentAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "executionMode": {
      "anyOf": [
        {
          "const": "relay",
          "type": "string"
        },
        {
          "const": "safe",
          "type": "string"
        }
      ]
    },
    "safeAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "capabilities": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
        "maxActions": {
          "minimum": 0,
          "type": "integer"
        },
        "supportsNotificationActions": {
          "type": "boolean"
        },
        "supportsRequireInteraction": {
          "type": "boolean"
        }
      }
    }
  }
}

Response 201

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id",
    "endpoint",
    "p256dh",
    "auth",
    "agentAddress",
    "executionMode",
    "safeAddress",
    "maxActions",
    "supportsNotificationActions",
    "supportsRequireInteraction",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "endpoint": {
      "type": "string"
    },
    "p256dh": {
      "type": "string"
    },
    "auth": {
      "type": "string"
    },
    "agentAddress": {
      "anyOf": [
        {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "executionMode": {
      "anyOf": [
        {
          "const": "relay",
          "type": "string"
        },
        {
          "const": "safe",
          "type": "string"
        }
      ]
    },
    "safeAddress": {
      "anyOf": [
        {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "maxActions": {
      "anyOf": [
        {
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "supportsNotificationActions": {
      "type": "boolean"
    },
    "supportsRequireInteraction": {
      "type": "boolean"
    },
    "createdAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 409

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

GET /api/devices

List devices

Response 200

{
  "type": "array",
  "items": {
    "additionalProperties": false,
    "type": "object",
    "required": [
      "id",
      "endpoint",
      "p256dh",
      "auth",
      "agentAddress",
      "executionMode",
      "safeAddress",
      "maxActions",
      "supportsNotificationActions",
      "supportsRequireInteraction",
      "createdAt"
    ],
    "properties": {
      "id": {
        "type": "string"
      },
      "endpoint": {
        "type": "string"
      },
      "p256dh": {
        "type": "string"
      },
      "auth": {
        "type": "string"
      },
      "agentAddress": {
        "anyOf": [
          {
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "description": "0x-prefixed EVM address",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "executionMode": {
        "anyOf": [
          {
            "const": "relay",
            "type": "string"
          },
          {
            "const": "safe",
            "type": "string"
          }
        ]
      },
      "safeAddress": {
        "anyOf": [
          {
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "description": "0x-prefixed EVM address",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "maxActions": {
        "anyOf": [
          {
            "minimum": 0,
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "supportsNotificationActions": {
        "type": "boolean"
      },
      "supportsRequireInteraction": {
        "type": "boolean"
      },
      "createdAt": {
        "minimum": 0,
        "description": "Unix timestamp in milliseconds",
        "type": "integer"
      }
    }
  }
}

DELETE /api/devices/:id

Delete a registered device

Path Params

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "minLength": 1,
      "type": "string"
    }
  }
}

Response 204

{
  "type": "null"
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

GET /api/notifications

List notifications

Query Params

{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "deviceId": {
      "minLength": 1,
      "type": "string"
    }
  }
}

Response 200

{
  "type": "array",
  "items": {
    "additionalProperties": false,
    "type": "object",
    "required": [
      "id",
      "deviceId",
      "requestId",
      "message",
      "response",
      "responseSource",
      "responseRawAction",
      "responseInterpretedAction",
      "responseUserAgent",
      "createdAt",
      "respondedAt"
    ],
    "properties": {
      "id": {
        "type": "string"
      },
      "deviceId": {
        "type": "string"
      },
      "requestId": {
        "anyOf": [
          {
            "minLength": 1,
            "description": "Provider request identifier",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "message": {
        "type": "string"
      },
      "response": {
        "anyOf": [
          {
            "const": "accepted",
            "type": "string"
          },
          {
            "const": "rejected",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "responseSource": {
        "anyOf": [
          {
            "const": "sw_action",
            "type": "string"
          },
          {
            "const": "app_ui",
            "type": "string"
          },
          {
            "const": "unknown",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "responseRawAction": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "responseInterpretedAction": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "responseUserAgent": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "createdAt": {
        "minimum": 0,
        "description": "Unix timestamp in milliseconds",
        "type": "integer"
      },
      "respondedAt": {
        "anyOf": [
          {
            "minimum": 0,
            "description": "Unix timestamp in milliseconds",
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}

GET /api/notifications/:id

Get one notification with structured approval context

Returns the notification plus linked `approval` data (`intent.actions`, `clearSigning.actionResults`, and Safe `safeTransaction` when applicable) for in-app inspection before accept/reject.

Path Params

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "minLength": 1,
      "type": "string"
    }
  }
}

Response 200

{
  "type": "object",
  "allOf": [
    {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "id",
        "deviceId",
        "requestId",
        "message",
        "response",
        "responseSource",
        "responseRawAction",
        "responseInterpretedAction",
        "responseUserAgent",
        "createdAt",
        "respondedAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "deviceId": {
          "type": "string"
        },
        "requestId": {
          "anyOf": [
            {
              "minLength": 1,
              "description": "Provider request identifier",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "message": {
          "type": "string"
        },
        "response": {
          "anyOf": [
            {
              "const": "accepted",
              "type": "string"
            },
            {
              "const": "rejected",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "responseSource": {
          "anyOf": [
            {
              "const": "sw_action",
              "type": "string"
            },
            {
              "const": "app_ui",
              "type": "string"
            },
            {
              "const": "unknown",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "responseRawAction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "responseInterpretedAction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "responseUserAgent": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "minimum": 0,
          "description": "Unix timestamp in milliseconds",
          "type": "integer"
        },
        "respondedAt": {
          "anyOf": [
            {
              "minimum": 0,
              "description": "Unix timestamp in milliseconds",
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "approval",
        "turnkeyExecution"
      ],
      "properties": {
        "approval": {
          "anyOf": [
            {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "kind",
                "intent",
                "clearSigning"
              ],
              "properties": {
                "kind": {
                  "anyOf": [
                    {
                      "const": "safe",
                      "type": "string"
                    },
                    {
                      "const": "turnkey",
                      "type": "string"
                    }
                  ]
                },
                "intent": {
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "actions"
                  ],
                  "properties": {
                    "actions": {
                      "minItems": 1,
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "additionalProperties": false,
                        "type": "object",
                        "required": [
                          "chainId",
                          "to",
                          "data",
                          "value"
                        ],
                        "properties": {
                          "chainId": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "to": {
                            "pattern": "^0x[a-fA-F0-9]{40}$",
                            "description": "0x-prefixed EVM address",
                            "type": "string"
                          },
                          "data": {
                            "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                            "description": "0x-prefixed hex string",
                            "type": "string"
                          },
                          "value": {
                            "minLength": 1,
                            "description": "Wei amount as decimal string",
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "clearSigning": {
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "actionResults",
                    "aggregatedDescription"
                  ],
                  "properties": {
                    "actionResults": {
                      "minItems": 1,
                      "maxItems": 10,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "additionalProperties": false,
                            "type": "object",
                            "required": [
                              "resolved",
                              "descriptorId",
                              "description",
                              "protocolTag",
                              "bindingKind",
                              "source"
                            ],
                            "properties": {
                              "resolved": {
                                "const": true,
                                "type": "boolean"
                              },
                              "descriptorId": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "protocolTag": {
                                "type": "string"
                              },
                              "bindingKind": {
                                "anyOf": [
                                  {
                                    "const": "calldata",
                                    "type": "string"
                                  },
                                  {
                                    "const": "eip712",
                                    "type": "string"
                                  }
                                ]
                              },
                              "source": {
                                "anyOf": [
                                  {
                                    "const": "vendor",
                                    "type": "string"
                                  },
                                  {
                                    "const": "overlay",
                                    "type": "string"
                                  }
                                ]
                              }
                            }
                          },
                          {
                            "additionalProperties": false,
                            "type": "object",
                            "required": [
                              "resolved",
                              "reason"
                            ],
                            "properties": {
                              "resolved": {
                                "const": false,
                                "type": "boolean"
                              },
                              "reason": {
                                "type": "string"
                              }
                            }
                          }
                        ]
                      }
                    },
                    "aggregatedDescription": {
                      "type": "string"
                    }
                  }
                },
                "safeTransaction": {
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "to",
                    "value",
                    "data",
                    "nonce",
                    "operation",
                    "safeTxGas",
                    "baseGas",
                    "gasPrice",
                    "gasToken",
                    "refundReceiver",
                    "safeTxHash"
                  ],
                  "properties": {
                    "to": {
                      "pattern": "^0x[a-fA-F0-9]{40}$",
                      "description": "0x-prefixed EVM address",
                      "type": "string"
                    },
                    "value": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "data": {
                      "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                      "description": "0x-prefixed hex string",
                      "type": "string"
                    },
                    "nonce": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "operation": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "safeTxGas": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "baseGas": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "gasPrice": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "gasToken": {
                      "pattern": "^0x[a-fA-F0-9]{40}$",
                      "description": "0x-prefixed EVM address",
                      "type": "string"
                    },
                    "refundReceiver": {
                      "anyOf": [
                        {
                          "pattern": "^0x[a-fA-F0-9]{40}$",
                          "description": "0x-prefixed EVM address",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "safeTxHash": {
                      "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                      "description": "0x-prefixed hex string",
                      "type": "string"
                    }
                  }
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "turnkeyExecution": {
          "anyOf": [
            {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "status",
                "txHash",
                "error",
                "chainId",
                "explorerTxUrl"
              ],
              "properties": {
                "status": {
                  "type": "string"
                },
                "txHash": {
                  "anyOf": [
                    {
                      "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                      "description": "0x-prefixed hex string",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "error": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "chainId": {
                  "anyOf": [
                    {
                      "minimum": 1,
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "explorerTxUrl": {
                  "anyOf": [
                    {
                      "format": "uri",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  ]
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

POST /api/drafts

Create a transaction draft with ERC-7730 clear-signing and Safe transaction payload

The agent supplies `intent.actions` (1–10 contract calls on one chain). The provider resolves ERC-7730 text per action, aggregates a single notification line, batches calls via Safe MultiSend when needed, and returns one `safeTxHash` to sign before `POST /requests`.

Request Body

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "signer",
    "intent"
  ],
  "properties": {
    "signer": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "intent": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actions"
      ],
      "properties": {
        "actions": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "additionalProperties": false,
            "type": "object",
            "required": [
              "chainId",
              "to",
              "data",
              "value"
            ],
            "properties": {
              "chainId": {
                "minimum": 1,
                "type": "integer"
              },
              "to": {
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "description": "0x-prefixed EVM address",
                "type": "string"
              },
              "data": {
                "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                "description": "0x-prefixed hex string",
                "type": "string"
              },
              "value": {
                "minLength": 1,
                "description": "Wei amount as decimal string",
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}

Response 200

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "draftId",
    "agentAddress",
    "safeAddress",
    "intent",
    "clearSigning",
    "safe",
    "safeTransaction",
    "createdAt",
    "expiresAt"
  ],
  "properties": {
    "draftId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "agentAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "safeAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "intent": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actions"
      ],
      "properties": {
        "actions": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "additionalProperties": false,
            "type": "object",
            "required": [
              "chainId",
              "to",
              "data",
              "value"
            ],
            "properties": {
              "chainId": {
                "minimum": 1,
                "type": "integer"
              },
              "to": {
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "description": "0x-prefixed EVM address",
                "type": "string"
              },
              "data": {
                "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                "description": "0x-prefixed hex string",
                "type": "string"
              },
              "value": {
                "minLength": 1,
                "description": "Wei amount as decimal string",
                "type": "string"
              }
            }
          }
        }
      }
    },
    "clearSigning": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actionResults",
        "aggregatedDescription"
      ],
      "properties": {
        "actionResults": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "resolved",
                  "descriptorId",
                  "description",
                  "protocolTag",
                  "bindingKind",
                  "source"
                ],
                "properties": {
                  "resolved": {
                    "const": true,
                    "type": "boolean"
                  },
                  "descriptorId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "protocolTag": {
                    "type": "string"
                  },
                  "bindingKind": {
                    "anyOf": [
                      {
                        "const": "calldata",
                        "type": "string"
                      },
                      {
                        "const": "eip712",
                        "type": "string"
                      }
                    ]
                  },
                  "source": {
                    "anyOf": [
                      {
                        "const": "vendor",
                        "type": "string"
                      },
                      {
                        "const": "overlay",
                        "type": "string"
                      }
                    ]
                  }
                }
              },
              {
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "resolved",
                  "reason"
                ],
                "properties": {
                  "resolved": {
                    "const": false,
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        },
        "aggregatedDescription": {
          "type": "string"
        }
      }
    },
    "safe": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "chainId",
        "safeAddress",
        "version",
        "threshold",
        "owners"
      ],
      "properties": {
        "chainId": {
          "minimum": 1,
          "type": "integer"
        },
        "safeAddress": {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "threshold": {
          "minimum": 1,
          "type": "integer"
        },
        "owners": {
          "type": "array",
          "items": {
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "description": "0x-prefixed EVM address",
            "type": "string"
          }
        }
      }
    },
    "safeTransaction": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "to",
        "value",
        "data",
        "nonce",
        "operation",
        "safeTxGas",
        "baseGas",
        "gasPrice",
        "gasToken",
        "refundReceiver",
        "safeTxHash"
      ],
      "properties": {
        "to": {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        "value": {
          "minLength": 1,
          "type": "string"
        },
        "data": {
          "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
          "description": "0x-prefixed hex string",
          "type": "string"
        },
        "nonce": {
          "minLength": 1,
          "type": "string"
        },
        "operation": {
          "minimum": 0,
          "type": "integer"
        },
        "safeTxGas": {
          "minLength": 1,
          "type": "string"
        },
        "baseGas": {
          "minLength": 1,
          "type": "string"
        },
        "gasPrice": {
          "minLength": 1,
          "type": "string"
        },
        "gasToken": {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        "refundReceiver": {
          "anyOf": [
            {
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "description": "0x-prefixed EVM address",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "safeTxHash": {
          "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
          "description": "0x-prefixed hex string",
          "type": "string"
        }
      }
    },
    "createdAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    },
    "expiresAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 409

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 422

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

POST /api/requests

Submit a signed agent request for human approval

Request Body

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "draftId",
    "signer",
    "signature"
  ],
  "properties": {
    "draftId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "signer": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "signature": {
      "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
      "description": "0x-prefixed hex string",
      "type": "string"
    }
  }
}

Response 202

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "requestId",
    "status",
    "description",
    "createdAt"
  ],
  "properties": {
    "requestId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "status": {
      "const": "pending_human",
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "createdAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 409

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 410

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 500

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 503

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

GET /api/requests

List agent requests

Query Params

{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "agent": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    }
  }
}

Response 200

{
  "type": "array",
  "items": {
    "additionalProperties": false,
    "type": "object",
    "required": [
      "requestId",
      "status",
      "agentAddress",
      "safeAddress",
      "intent",
      "clearSigning",
      "safe",
      "safeTransaction",
      "agentSignature",
      "providerConfirmation",
      "txHash",
      "error",
      "createdAt",
      "respondedAt",
      "executedAt"
    ],
    "properties": {
      "requestId": {
        "minLength": 1,
        "description": "Provider request identifier",
        "type": "string"
      },
      "status": {
        "anyOf": [
          {
            "const": "pending_human",
            "type": "string"
          },
          {
            "const": "rejected_by_human",
            "type": "string"
          },
          {
            "const": "proposing",
            "type": "string"
          },
          {
            "const": "proposed",
            "type": "string"
          },
          {
            "const": "executing",
            "type": "string"
          },
          {
            "const": "executed",
            "type": "string"
          },
          {
            "const": "proposal_failed",
            "type": "string"
          },
          {
            "const": "execution_failed",
            "type": "string"
          }
        ]
      },
      "agentAddress": {
        "pattern": "^0x[a-fA-F0-9]{40}$",
        "description": "0x-prefixed EVM address",
        "type": "string"
      },
      "safeAddress": {
        "pattern": "^0x[a-fA-F0-9]{40}$",
        "description": "0x-prefixed EVM address",
        "type": "string"
      },
      "intent": {
        "additionalProperties": false,
        "type": "object",
        "required": [
          "actions"
        ],
        "properties": {
          "actions": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "chainId",
                "to",
                "data",
                "value"
              ],
              "properties": {
                "chainId": {
                  "minimum": 1,
                  "type": "integer"
                },
                "to": {
                  "pattern": "^0x[a-fA-F0-9]{40}$",
                  "description": "0x-prefixed EVM address",
                  "type": "string"
                },
                "data": {
                  "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                  "description": "0x-prefixed hex string",
                  "type": "string"
                },
                "value": {
                  "minLength": 1,
                  "description": "Wei amount as decimal string",
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "clearSigning": {
        "additionalProperties": false,
        "type": "object",
        "required": [
          "actionResults",
          "aggregatedDescription"
        ],
        "properties": {
          "actionResults": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "resolved",
                    "descriptorId",
                    "description",
                    "protocolTag",
                    "bindingKind",
                    "source"
                  ],
                  "properties": {
                    "resolved": {
                      "const": true,
                      "type": "boolean"
                    },
                    "descriptorId": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "protocolTag": {
                      "type": "string"
                    },
                    "bindingKind": {
                      "anyOf": [
                        {
                          "const": "calldata",
                          "type": "string"
                        },
                        {
                          "const": "eip712",
                          "type": "string"
                        }
                      ]
                    },
                    "source": {
                      "anyOf": [
                        {
                          "const": "vendor",
                          "type": "string"
                        },
                        {
                          "const": "overlay",
                          "type": "string"
                        }
                      ]
                    }
                  }
                },
                {
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "resolved",
                    "reason"
                  ],
                  "properties": {
                    "resolved": {
                      "const": false,
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              ]
            }
          },
          "aggregatedDescription": {
            "type": "string"
          }
        }
      },
      "safe": {
        "additionalProperties": false,
        "type": "object",
        "required": [
          "chainId",
          "safeAddress",
          "version",
          "threshold",
          "owners"
        ],
        "properties": {
          "chainId": {
            "minimum": 1,
            "type": "integer"
          },
          "safeAddress": {
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "description": "0x-prefixed EVM address",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "threshold": {
            "minimum": 1,
            "type": "integer"
          },
          "owners": {
            "type": "array",
            "items": {
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "description": "0x-prefixed EVM address",
              "type": "string"
            }
          }
        }
      },
      "safeTransaction": {
        "additionalProperties": false,
        "type": "object",
        "required": [
          "to",
          "value",
          "data",
          "nonce",
          "operation",
          "safeTxGas",
          "baseGas",
          "gasPrice",
          "gasToken",
          "refundReceiver",
          "safeTxHash"
        ],
        "properties": {
          "to": {
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "description": "0x-prefixed EVM address",
            "type": "string"
          },
          "value": {
            "minLength": 1,
            "type": "string"
          },
          "data": {
            "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
            "description": "0x-prefixed hex string",
            "type": "string"
          },
          "nonce": {
            "minLength": 1,
            "type": "string"
          },
          "operation": {
            "minimum": 0,
            "type": "integer"
          },
          "safeTxGas": {
            "minLength": 1,
            "type": "string"
          },
          "baseGas": {
            "minLength": 1,
            "type": "string"
          },
          "gasPrice": {
            "minLength": 1,
            "type": "string"
          },
          "gasToken": {
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "description": "0x-prefixed EVM address",
            "type": "string"
          },
          "refundReceiver": {
            "anyOf": [
              {
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "description": "0x-prefixed EVM address",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "safeTxHash": {
            "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
            "description": "0x-prefixed hex string",
            "type": "string"
          }
        }
      },
      "agentSignature": {
        "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
        "description": "0x-prefixed hex string",
        "type": "string"
      },
      "providerConfirmation": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "required": [
              "sender",
              "signature"
            ],
            "properties": {
              "sender": {
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "description": "0x-prefixed EVM address",
                "type": "string"
              },
              "signature": {
                "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                "description": "0x-prefixed hex string",
                "type": "string"
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "txHash": {
        "anyOf": [
          {
            "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
            "description": "0x-prefixed hex string",
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "error": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "createdAt": {
        "minimum": 0,
        "description": "Unix timestamp in milliseconds",
        "type": "integer"
      },
      "respondedAt": {
        "anyOf": [
          {
            "minimum": 0,
            "description": "Unix timestamp in milliseconds",
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "executedAt": {
        "anyOf": [
          {
            "minimum": 0,
            "description": "Unix timestamp in milliseconds",
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}

GET /api/requests/:id

Get one agent request

Path Params

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    }
  }
}

Response 200

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "requestId",
    "status",
    "agentAddress",
    "safeAddress",
    "intent",
    "clearSigning",
    "safe",
    "safeTransaction",
    "agentSignature",
    "providerConfirmation",
    "txHash",
    "error",
    "createdAt",
    "respondedAt",
    "executedAt"
  ],
  "properties": {
    "requestId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "status": {
      "anyOf": [
        {
          "const": "pending_human",
          "type": "string"
        },
        {
          "const": "rejected_by_human",
          "type": "string"
        },
        {
          "const": "proposing",
          "type": "string"
        },
        {
          "const": "proposed",
          "type": "string"
        },
        {
          "const": "executing",
          "type": "string"
        },
        {
          "const": "executed",
          "type": "string"
        },
        {
          "const": "proposal_failed",
          "type": "string"
        },
        {
          "const": "execution_failed",
          "type": "string"
        }
      ]
    },
    "agentAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "safeAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "intent": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actions"
      ],
      "properties": {
        "actions": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "additionalProperties": false,
            "type": "object",
            "required": [
              "chainId",
              "to",
              "data",
              "value"
            ],
            "properties": {
              "chainId": {
                "minimum": 1,
                "type": "integer"
              },
              "to": {
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "description": "0x-prefixed EVM address",
                "type": "string"
              },
              "data": {
                "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                "description": "0x-prefixed hex string",
                "type": "string"
              },
              "value": {
                "minLength": 1,
                "description": "Wei amount as decimal string",
                "type": "string"
              }
            }
          }
        }
      }
    },
    "clearSigning": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actionResults",
        "aggregatedDescription"
      ],
      "properties": {
        "actionResults": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "resolved",
                  "descriptorId",
                  "description",
                  "protocolTag",
                  "bindingKind",
                  "source"
                ],
                "properties": {
                  "resolved": {
                    "const": true,
                    "type": "boolean"
                  },
                  "descriptorId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "protocolTag": {
                    "type": "string"
                  },
                  "bindingKind": {
                    "anyOf": [
                      {
                        "const": "calldata",
                        "type": "string"
                      },
                      {
                        "const": "eip712",
                        "type": "string"
                      }
                    ]
                  },
                  "source": {
                    "anyOf": [
                      {
                        "const": "vendor",
                        "type": "string"
                      },
                      {
                        "const": "overlay",
                        "type": "string"
                      }
                    ]
                  }
                }
              },
              {
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "resolved",
                  "reason"
                ],
                "properties": {
                  "resolved": {
                    "const": false,
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        },
        "aggregatedDescription": {
          "type": "string"
        }
      }
    },
    "safe": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "chainId",
        "safeAddress",
        "version",
        "threshold",
        "owners"
      ],
      "properties": {
        "chainId": {
          "minimum": 1,
          "type": "integer"
        },
        "safeAddress": {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "threshold": {
          "minimum": 1,
          "type": "integer"
        },
        "owners": {
          "type": "array",
          "items": {
            "pattern": "^0x[a-fA-F0-9]{40}$",
            "description": "0x-prefixed EVM address",
            "type": "string"
          }
        }
      }
    },
    "safeTransaction": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "to",
        "value",
        "data",
        "nonce",
        "operation",
        "safeTxGas",
        "baseGas",
        "gasPrice",
        "gasToken",
        "refundReceiver",
        "safeTxHash"
      ],
      "properties": {
        "to": {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        "value": {
          "minLength": 1,
          "type": "string"
        },
        "data": {
          "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
          "description": "0x-prefixed hex string",
          "type": "string"
        },
        "nonce": {
          "minLength": 1,
          "type": "string"
        },
        "operation": {
          "minimum": 0,
          "type": "integer"
        },
        "safeTxGas": {
          "minLength": 1,
          "type": "string"
        },
        "baseGas": {
          "minLength": 1,
          "type": "string"
        },
        "gasPrice": {
          "minLength": 1,
          "type": "string"
        },
        "gasToken": {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        "refundReceiver": {
          "anyOf": [
            {
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "description": "0x-prefixed EVM address",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "safeTxHash": {
          "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
          "description": "0x-prefixed hex string",
          "type": "string"
        }
      }
    },
    "agentSignature": {
      "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
      "description": "0x-prefixed hex string",
      "type": "string"
    },
    "providerConfirmation": {
      "anyOf": [
        {
          "additionalProperties": false,
          "type": "object",
          "required": [
            "sender",
            "signature"
          ],
          "properties": {
            "sender": {
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "description": "0x-prefixed EVM address",
              "type": "string"
            },
            "signature": {
              "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
              "description": "0x-prefixed hex string",
              "type": "string"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "txHash": {
      "anyOf": [
        {
          "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
          "description": "0x-prefixed hex string",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    },
    "respondedAt": {
      "anyOf": [
        {
          "minimum": 0,
          "description": "Unix timestamp in milliseconds",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "executedAt": {
      "anyOf": [
        {
          "minimum": 0,
          "description": "Unix timestamp in milliseconds",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

POST /api/responses

Record a human approval response

If response is rejected, the linked request becomes rejected_by_human. If accepted, the provider proposes the pre-built Safe transaction, submits the stored agent confirmation, and executes when threshold is met.

Request Body

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "notificationId",
    "response"
  ],
  "properties": {
    "notificationId": {
      "minLength": 1,
      "type": "string"
    },
    "response": {
      "anyOf": [
        {
          "const": "accepted",
          "type": "string"
        },
        {
          "const": "rejected",
          "type": "string"
        }
      ]
    },
    "messageLength": {
      "minimum": 0,
      "type": "integer"
    },
    "source": {
      "anyOf": [
        {
          "const": "sw_action",
          "type": "string"
        },
        {
          "const": "app_ui",
          "type": "string"
        },
        {
          "const": "unknown",
          "type": "string"
        }
      ]
    },
    "rawAction": {
      "type": "string"
    },
    "interpretedAction": {
      "type": "string"
    }
  }
}

Response 200

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id",
    "response",
    "respondedAt",
    "request"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "response": {
      "anyOf": [
        {
          "const": "accepted",
          "type": "string"
        },
        {
          "const": "rejected",
          "type": "string"
        }
      ]
    },
    "respondedAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    },
    "request": {
      "anyOf": [
        {
          "additionalProperties": false,
          "type": "object",
          "required": [
            "requestId",
            "status",
            "agentAddress",
            "safeAddress",
            "intent",
            "clearSigning",
            "safe",
            "safeTransaction",
            "agentSignature",
            "providerConfirmation",
            "txHash",
            "error",
            "createdAt",
            "respondedAt",
            "executedAt"
          ],
          "properties": {
            "requestId": {
              "minLength": 1,
              "description": "Provider request identifier",
              "type": "string"
            },
            "status": {
              "anyOf": [
                {
                  "const": "pending_human",
                  "type": "string"
                },
                {
                  "const": "rejected_by_human",
                  "type": "string"
                },
                {
                  "const": "proposing",
                  "type": "string"
                },
                {
                  "const": "proposed",
                  "type": "string"
                },
                {
                  "const": "executing",
                  "type": "string"
                },
                {
                  "const": "executed",
                  "type": "string"
                },
                {
                  "const": "proposal_failed",
                  "type": "string"
                },
                {
                  "const": "execution_failed",
                  "type": "string"
                }
              ]
            },
            "agentAddress": {
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "description": "0x-prefixed EVM address",
              "type": "string"
            },
            "safeAddress": {
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "description": "0x-prefixed EVM address",
              "type": "string"
            },
            "intent": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "actions"
              ],
              "properties": {
                "actions": {
                  "minItems": 1,
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "additionalProperties": false,
                    "type": "object",
                    "required": [
                      "chainId",
                      "to",
                      "data",
                      "value"
                    ],
                    "properties": {
                      "chainId": {
                        "minimum": 1,
                        "type": "integer"
                      },
                      "to": {
                        "pattern": "^0x[a-fA-F0-9]{40}$",
                        "description": "0x-prefixed EVM address",
                        "type": "string"
                      },
                      "data": {
                        "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                        "description": "0x-prefixed hex string",
                        "type": "string"
                      },
                      "value": {
                        "minLength": 1,
                        "description": "Wei amount as decimal string",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "clearSigning": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "actionResults",
                "aggregatedDescription"
              ],
              "properties": {
                "actionResults": {
                  "minItems": 1,
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "type": "object",
                        "required": [
                          "resolved",
                          "descriptorId",
                          "description",
                          "protocolTag",
                          "bindingKind",
                          "source"
                        ],
                        "properties": {
                          "resolved": {
                            "const": true,
                            "type": "boolean"
                          },
                          "descriptorId": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "protocolTag": {
                            "type": "string"
                          },
                          "bindingKind": {
                            "anyOf": [
                              {
                                "const": "calldata",
                                "type": "string"
                              },
                              {
                                "const": "eip712",
                                "type": "string"
                              }
                            ]
                          },
                          "source": {
                            "anyOf": [
                              {
                                "const": "vendor",
                                "type": "string"
                              },
                              {
                                "const": "overlay",
                                "type": "string"
                              }
                            ]
                          }
                        }
                      },
                      {
                        "additionalProperties": false,
                        "type": "object",
                        "required": [
                          "resolved",
                          "reason"
                        ],
                        "properties": {
                          "resolved": {
                            "const": false,
                            "type": "boolean"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                },
                "aggregatedDescription": {
                  "type": "string"
                }
              }
            },
            "safe": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "chainId",
                "safeAddress",
                "version",
                "threshold",
                "owners"
              ],
              "properties": {
                "chainId": {
                  "minimum": 1,
                  "type": "integer"
                },
                "safeAddress": {
                  "pattern": "^0x[a-fA-F0-9]{40}$",
                  "description": "0x-prefixed EVM address",
                  "type": "string"
                },
                "version": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "threshold": {
                  "minimum": 1,
                  "type": "integer"
                },
                "owners": {
                  "type": "array",
                  "items": {
                    "pattern": "^0x[a-fA-F0-9]{40}$",
                    "description": "0x-prefixed EVM address",
                    "type": "string"
                  }
                }
              }
            },
            "safeTransaction": {
              "additionalProperties": false,
              "type": "object",
              "required": [
                "to",
                "value",
                "data",
                "nonce",
                "operation",
                "safeTxGas",
                "baseGas",
                "gasPrice",
                "gasToken",
                "refundReceiver",
                "safeTxHash"
              ],
              "properties": {
                "to": {
                  "pattern": "^0x[a-fA-F0-9]{40}$",
                  "description": "0x-prefixed EVM address",
                  "type": "string"
                },
                "value": {
                  "minLength": 1,
                  "type": "string"
                },
                "data": {
                  "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                  "description": "0x-prefixed hex string",
                  "type": "string"
                },
                "nonce": {
                  "minLength": 1,
                  "type": "string"
                },
                "operation": {
                  "minimum": 0,
                  "type": "integer"
                },
                "safeTxGas": {
                  "minLength": 1,
                  "type": "string"
                },
                "baseGas": {
                  "minLength": 1,
                  "type": "string"
                },
                "gasPrice": {
                  "minLength": 1,
                  "type": "string"
                },
                "gasToken": {
                  "pattern": "^0x[a-fA-F0-9]{40}$",
                  "description": "0x-prefixed EVM address",
                  "type": "string"
                },
                "refundReceiver": {
                  "anyOf": [
                    {
                      "pattern": "^0x[a-fA-F0-9]{40}$",
                      "description": "0x-prefixed EVM address",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "safeTxHash": {
                  "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                  "description": "0x-prefixed hex string",
                  "type": "string"
                }
              }
            },
            "agentSignature": {
              "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
              "description": "0x-prefixed hex string",
              "type": "string"
            },
            "providerConfirmation": {
              "anyOf": [
                {
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "sender",
                    "signature"
                  ],
                  "properties": {
                    "sender": {
                      "pattern": "^0x[a-fA-F0-9]{40}$",
                      "description": "0x-prefixed EVM address",
                      "type": "string"
                    },
                    "signature": {
                      "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                      "description": "0x-prefixed hex string",
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "null"
                }
              ]
            },
            "txHash": {
              "anyOf": [
                {
                  "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                  "description": "0x-prefixed hex string",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "error": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "minimum": 0,
              "description": "Unix timestamp in milliseconds",
              "type": "integer"
            },
            "respondedAt": {
              "anyOf": [
                {
                  "minimum": 0,
                  "description": "Unix timestamp in milliseconds",
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "executedAt": {
              "anyOf": [
                {
                  "minimum": 0,
                  "description": "Unix timestamp in milliseconds",
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

POST /api/turnkey/hfa/setup-sessions

Create an HFA Turnkey wallet setup session

Request Body

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "agentPublicKey"
  ],
  "properties": {
    "agentPublicKey": {
      "minLength": 1,
      "type": "string"
    },
    "agentLabel": {
      "type": "string"
    }
  }
}

Response 200

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "setupSessionId",
    "status",
    "agentPublicKey",
    "agentLabel",
    "providerPublicKey",
    "expiresAt"
  ],
  "properties": {
    "setupSessionId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "status": {
      "anyOf": [
        {
          "const": "pending",
          "type": "string"
        },
        {
          "const": "completed",
          "type": "string"
        },
        {
          "const": "expired",
          "type": "string"
        }
      ]
    },
    "agentPublicKey": {
      "type": "string"
    },
    "agentLabel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "providerPublicKey": {
      "type": "string"
    },
    "expiresAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    },
    "setupUrl": {
      "type": "string"
    },
    "subOrganizationId": {
      "type": "string"
    },
    "walletAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "agentUserId": {
      "type": "string"
    },
    "providerUserId": {
      "type": "string"
    },
    "policyIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "completedAt": {
      "anyOf": [
        {
          "minimum": 0,
          "description": "Unix timestamp in milliseconds",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 503

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

GET /api/turnkey/hfa/setup-sessions/:id

Read an HFA Turnkey setup session

Path Params

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    }
  }
}

Response 200

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "setupSessionId",
    "status",
    "agentPublicKey",
    "agentLabel",
    "providerPublicKey",
    "expiresAt"
  ],
  "properties": {
    "setupSessionId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "status": {
      "anyOf": [
        {
          "const": "pending",
          "type": "string"
        },
        {
          "const": "completed",
          "type": "string"
        },
        {
          "const": "expired",
          "type": "string"
        }
      ]
    },
    "agentPublicKey": {
      "type": "string"
    },
    "agentLabel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "providerPublicKey": {
      "type": "string"
    },
    "expiresAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    },
    "setupUrl": {
      "type": "string"
    },
    "subOrganizationId": {
      "type": "string"
    },
    "walletAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "agentUserId": {
      "type": "string"
    },
    "providerUserId": {
      "type": "string"
    },
    "policyIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "completedAt": {
      "anyOf": [
        {
          "minimum": 0,
          "description": "Unix timestamp in milliseconds",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

POST /api/turnkey/drafts

Create a Turnkey transaction draft with ERC-7730 clear-signing

The agent supplies one concrete EVM action. HFA builds an unsigned transaction for the paired Turnkey wallet and returns `turnkeyTransaction.unsignedTransaction` for the agent to sign via Turnkey API.

Request Body

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "intent"
  ],
  "properties": {
    "agent": {
      "type": "string"
    },
    "agentPublicKey": {
      "minLength": 1,
      "description": "Compressed P-256 public key hex (66 chars, prefix 02 or 03)",
      "type": "string"
    },
    "subOrganizationId": {
      "type": "string"
    },
    "walletAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "intent": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actions"
      ],
      "properties": {
        "actions": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "additionalProperties": false,
            "type": "object",
            "required": [
              "chainId",
              "to",
              "data",
              "value"
            ],
            "properties": {
              "chainId": {
                "minimum": 1,
                "type": "integer"
              },
              "to": {
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "description": "0x-prefixed EVM address",
                "type": "string"
              },
              "data": {
                "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                "description": "0x-prefixed hex string",
                "type": "string"
              },
              "value": {
                "minLength": 1,
                "description": "Wei amount as decimal string",
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}

Response 200

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "draftId",
    "agent",
    "subOrganizationId",
    "walletAddress",
    "intent",
    "clearSigning",
    "turnkeyTransaction",
    "createdAt",
    "expiresAt"
  ],
  "properties": {
    "draftId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "agent": {
      "type": "string"
    },
    "subOrganizationId": {
      "type": "string"
    },
    "walletAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "intent": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actions"
      ],
      "properties": {
        "actions": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "additionalProperties": false,
            "type": "object",
            "required": [
              "chainId",
              "to",
              "data",
              "value"
            ],
            "properties": {
              "chainId": {
                "minimum": 1,
                "type": "integer"
              },
              "to": {
                "pattern": "^0x[a-fA-F0-9]{40}$",
                "description": "0x-prefixed EVM address",
                "type": "string"
              },
              "data": {
                "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                "description": "0x-prefixed hex string",
                "type": "string"
              },
              "value": {
                "minLength": 1,
                "description": "Wei amount as decimal string",
                "type": "string"
              }
            }
          }
        }
      }
    },
    "clearSigning": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "actionResults",
        "aggregatedDescription"
      ],
      "properties": {
        "actionResults": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "resolved",
                  "descriptorId",
                  "description",
                  "protocolTag",
                  "bindingKind",
                  "source"
                ],
                "properties": {
                  "resolved": {
                    "const": true,
                    "type": "boolean"
                  },
                  "descriptorId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "protocolTag": {
                    "type": "string"
                  },
                  "bindingKind": {
                    "anyOf": [
                      {
                        "const": "calldata",
                        "type": "string"
                      },
                      {
                        "const": "eip712",
                        "type": "string"
                      }
                    ]
                  },
                  "source": {
                    "anyOf": [
                      {
                        "const": "vendor",
                        "type": "string"
                      },
                      {
                        "const": "overlay",
                        "type": "string"
                      }
                    ]
                  }
                }
              },
              {
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "resolved",
                  "reason"
                ],
                "properties": {
                  "resolved": {
                    "const": false,
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        },
        "aggregatedDescription": {
          "type": "string"
        }
      }
    },
    "turnkeyTransaction": {
      "additionalProperties": false,
      "type": "object",
      "required": [
        "type",
        "signWith",
        "unsignedTransaction"
      ],
      "properties": {
        "type": {
          "const": "TRANSACTION_TYPE_ETHEREUM",
          "type": "string"
        },
        "signWith": {
          "pattern": "^0x[a-fA-F0-9]{40}$",
          "description": "0x-prefixed EVM address",
          "type": "string"
        },
        "unsignedTransaction": {
          "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
          "description": "0x-prefixed hex string",
          "type": "string"
        }
      }
    },
    "createdAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    },
    "expiresAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

POST /api/turnkey/requests

Submit a Turnkey CONSENSUS_NEEDED activity for human approval

Request Body

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "draftId",
    "activityId",
    "fingerprint"
  ],
  "properties": {
    "draftId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "activityId": {
      "minLength": 1,
      "type": "string"
    },
    "fingerprint": {
      "minLength": 1,
      "type": "string"
    }
  }
}

Response 202

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "requestId",
    "status",
    "description",
    "createdAt"
  ],
  "properties": {
    "requestId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "status": {
      "const": "pending_human",
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "createdAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    }
  }
}

Response 400

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 409

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 410

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

Response 503

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}

GET /api/turnkey/requests/:id

Get one Turnkey HFA request

Path Params

{
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    }
  }
}

Response 200

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "requestId",
    "draftId",
    "status",
    "subOrganizationId",
    "walletAddress",
    "activityId",
    "fingerprint",
    "intent",
    "clearSigning",
    "txHash",
    "error",
    "createdAt",
    "respondedAt",
    "executedAt"
  ],
  "properties": {
    "requestId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "draftId": {
      "minLength": 1,
      "description": "Provider request identifier",
      "type": "string"
    },
    "status": {
      "anyOf": [
        {
          "const": "pending_human",
          "type": "string"
        },
        {
          "const": "rejected_by_human",
          "type": "string"
        },
        {
          "const": "approving",
          "type": "string"
        },
        {
          "const": "approval_failed",
          "type": "string"
        },
        {
          "const": "signing_failed",
          "type": "string"
        },
        {
          "const": "broadcast_failed",
          "type": "string"
        },
        {
          "const": "executed",
          "type": "string"
        }
      ]
    },
    "subOrganizationId": {
      "type": "string"
    },
    "walletAddress": {
      "pattern": "^0x[a-fA-F0-9]{40}$",
      "description": "0x-prefixed EVM address",
      "type": "string"
    },
    "activityId": {
      "type": "string"
    },
    "fingerprint": {
      "type": "string"
    },
    "intent": {
      "anyOf": [
        {
          "additionalProperties": false,
          "type": "object",
          "required": [
            "actions"
          ],
          "properties": {
            "actions": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "additionalProperties": false,
                "type": "object",
                "required": [
                  "chainId",
                  "to",
                  "data",
                  "value"
                ],
                "properties": {
                  "chainId": {
                    "minimum": 1,
                    "type": "integer"
                  },
                  "to": {
                    "pattern": "^0x[a-fA-F0-9]{40}$",
                    "description": "0x-prefixed EVM address",
                    "type": "string"
                  },
                  "data": {
                    "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
                    "description": "0x-prefixed hex string",
                    "type": "string"
                  },
                  "value": {
                    "minLength": 1,
                    "description": "Wei amount as decimal string",
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "clearSigning": {
      "anyOf": [
        {
          "additionalProperties": false,
          "type": "object",
          "required": [
            "actionResults",
            "aggregatedDescription"
          ],
          "properties": {
            "actionResults": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "type": "object",
                    "required": [
                      "resolved",
                      "descriptorId",
                      "description",
                      "protocolTag",
                      "bindingKind",
                      "source"
                    ],
                    "properties": {
                      "resolved": {
                        "const": true,
                        "type": "boolean"
                      },
                      "descriptorId": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "protocolTag": {
                        "type": "string"
                      },
                      "bindingKind": {
                        "anyOf": [
                          {
                            "const": "calldata",
                            "type": "string"
                          },
                          {
                            "const": "eip712",
                            "type": "string"
                          }
                        ]
                      },
                      "source": {
                        "anyOf": [
                          {
                            "const": "vendor",
                            "type": "string"
                          },
                          {
                            "const": "overlay",
                            "type": "string"
                          }
                        ]
                      }
                    }
                  },
                  {
                    "additionalProperties": false,
                    "type": "object",
                    "required": [
                      "resolved",
                      "reason"
                    ],
                    "properties": {
                      "resolved": {
                        "const": false,
                        "type": "boolean"
                      },
                      "reason": {
                        "type": "string"
                      }
                    }
                  }
                ]
              }
            },
            "aggregatedDescription": {
              "type": "string"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "txHash": {
      "anyOf": [
        {
          "pattern": "^0x(?:[a-fA-F0-9]{2})*$",
          "description": "0x-prefixed hex string",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "minimum": 0,
      "description": "Unix timestamp in milliseconds",
      "type": "integer"
    },
    "respondedAt": {
      "anyOf": [
        {
          "minimum": 0,
          "description": "Unix timestamp in milliseconds",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "executedAt": {
      "anyOf": [
        {
          "minimum": 0,
          "description": "Unix timestamp in milliseconds",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Response 404

{
  "additionalProperties": true,
  "type": "object",
  "required": [
    "error"
  ],
  "properties": {
    "error": {
      "type": "string"
    }
  }
}