---
updatedAt: 2026-04-23T08:59:08.000Z
agentTools:
  projectIndex: https://docs.thegivingblock.com/llms.txt
---

# SignStockDonation

Submit a signature to authenticate all donor-specified data for a stock donation pledge

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "The Giving Block REST API service",
    "description": "Public API for integration with TGB",
    "version": "0.100.0"
  },
  "paths": {
    "/v1/stocks/sign": {
      "post": {
        "summary": "SignStockDonation",
        "description": "Submit a signature to authenticate all donor-specified data for a stock donation pledge",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "isSuccess": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false,
                      "description": "Sign stock pledge response",
                      "example": {
                        "isSuccess": true
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "example": "272fa57f-600b-41c9-86cb-e8b42293820c"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string",
                      "example": [
                        "Incorrect signature format",
                        "Organization not found",
                        "Donations are disabled for the organization",
                        "Anonymous donations are not allowed",
                        "Donation not found",
                        "Stock donation not allowed for this organization",
                        "Wrong pledge status: can submit only unsigned donations",
                        "Failure while sending signature"
                      ]
                    },
                    "errorType": {
                      "type": "string",
                      "example": [
                        "err.validation",
                        "err.generic",
                        "err.generic",
                        "err.generic",
                        "err.entityDoesNotExist",
                        "err.entityDoesNotExist",
                        "err.entityAlreadyExists",
                        "err.generic"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "example": "1ea0286b-7ae9-49d0-a2c5-6550fc5e5564"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "tags": [
          "Stocks"
        ],
        "security": [
          {
            "PublicApiAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "donationUuid": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the donation entity"
                  },
                  "signature": {
                    "type": "string",
                    "description": "Signature of the donor. Used format: \"data:image/png;base64,...\", where \"...\" is the base64 encoded image"
                  },
                  "date": {
                    "type": "string",
                    "description": "Date, time and timezone of the signature. Used format: JavaScript Date toString() format, example: \"Wed Dec 09 2020 15:00:00 GMT+0000 (Coordinated Universal Time)\""
                  }
                },
                "required": [
                  "donationUuid",
                  "signature",
                  "date"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://public-api.tgbwidget.com",
      "description": "Production Public API server"
    },
    {
      "url": "https://public-api.sandbox.thegivingblock.com",
      "description": "Sandbox Public API server"
    }
  ],
  "components": {
    "securitySchemes": {
      "PublicApiAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "UnauthorizedError": {
        "type": "object",
        "properties": {
          "errorMessage": {
            "type": "string"
          },
          "errorType": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "requestId": {
            "type": "string",
            "example": "42dafda7-f1c3-47f3-8595-45864b7f207f"
          }
        },
        "additionalProperties": false
      },
      "ValidationError": {
        "type": "object",
        "properties": {
          "errorMessage": {
            "type": "string"
          },
          "errorType": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "properties": {
              "errorCode": {
                "type": "string"
              },
              "validationErrorMessage": {
                "type": "string"
              },
              "failedAttributes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "attributeName": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "path": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "requestId": {
            "type": "string",
            "example": "28d6ca3b-4ea1-4252-a610-80d16f94cedc"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
```