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

# GetWidgetUrl

Provides endpoint by which partners are able to get URL to Donation Form where donor will finalize payment/donation.

# 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/organization/{id}/widget-url": {
      "post": {
        "summary": "GetWidgetUrl",
        "description": "Provides endpoint by which partners are able to get URL to Donation Form where donor will finalize payment/donation.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false,
                      "example": {
                        "url": "https://public-api.tgbwidget.com/?organizationId=1&version=2&donationDataId=ad4c8d54-3264-45b6-9388-2ff72376e45a"
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "example": "a08d2dc2-abe3-4f8a-aea4-ec09c4a338ea"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string",
                      "example": [
                        "Organization not found"
                      ]
                    },
                    "errorType": {
                      "type": "string",
                      "example": [
                        "err.validation"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "example": "c09a233c-6cea-4368-83c9-6812e574d2e5"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          }
        },
        "tags": [
          "Organizations"
        ],
        "security": [
          {
            "PublicApiAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uiVersion": {
                    "type": "number",
                    "format": "float",
                    "description": "Please ensure you are using the latest UI version. 2 - is the latest UI version and used by default",
                    "default": 2
                  },
                  "externalId": {
                    "type": "string",
                    "description": "Allows passing a specific ID for this transaction (for example, your own system Transaction ID)"
                  },
                  "defaultCryptocurrency": {
                    "type": "string",
                    "description": "Allows setting the cryptocurrency you would like to display by default"
                  },
                  "defaultCryptoAmount": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0,
                    "description": "Allows setting the cryptocurrency amount you would like to display by default"
                  },
                  "defaultDafAmount": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Allows setting the donor-advised-fund amount you would like to display by default"
                  },
                  "defaultAmount": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0,
                    "description": "[Deprecated] Please use one of the above parameters"
                  },
                  "cryptoReturnUrl": {
                    "type": "string",
                    "description": "After a crypto donation is complete, the donor will be navigated to the specified URL"
                  },
                  "cardReturnUrl": {
                    "type": "string",
                    "description": "After a card donation is complete, the donor will be navigated to the specified URL"
                  },
                  "stockReturnUrl": {
                    "type": "string",
                    "description": "After a stock donation is complete, the donor will be navigated to the specified URL"
                  },
                  "dafReturnUrl": {
                    "type": "string",
                    "description": "After a DAF donation is complete, the donor will be navigated to the specified URL"
                  },
                  "achReturnUrl": {
                    "type": "string",
                    "description": "After an ACH donation is complete, the donor will be navigated to the specified URL"
                  },
                  "returnUrl": {
                    "type": "string",
                    "description": "[Deprecated] Please use one of the above parameters"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "number",
              "format": "float",
              "minimum": 1
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ]
      }
    }
  },
  "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
      }
    }
  }
}
```