---
updatedAt: 2026-05-27T01:07:39.000Z
agentTools:
  projectIndex: https://docs.d-id.com/llms.txt
---

# Upload video for consent

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Resources Endpoints",
    "version": "0.1"
  },
  "servers": [
    {
      "url": "https://api.d-id.com/"
    }
  ],
  "paths": {
    "/consents/{id}": {
      "post": {
        "operationId": "UploadVideo",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadVideoResponseDto"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "id": "52907745-7672-470e-a803-a2f8feb52944"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "ConsentTextSimilarityError",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonError"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "kind": "BadRequestError",
                      "description": "Video buffer size exceeds 50MB"
                    }
                  },
                  "Example 2": {
                    "value": {
                      "kind": "ConsentTextSimilarityError",
                      "description": "Consent audio is not correspond to the consent"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "AuthorizationError",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonError"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "kind": "AuthorizationError",
                      "description": "user unauthenticated"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "NotFoundError",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonError"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "kind": "NotFoundError",
                      "description": "consent not found"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Upload video for consent",
        "tags": [
          "Consents"
        ],
        "security": [
          {
            "basic": []
          },
          {
            "bearer": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadConsentRequestBodyDto"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonError": {
        "properties": {
          "kind": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "details": {},
          "internal": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "description"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UploadVideoResponseDto": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UploadConsentRequestBodyDto": {
        "properties": {
          "source_url": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "webhook": {
            "type": "string"
          }
        },
        "required": [
          "source_url",
          "name"
        ],
        "type": "object",
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "basic": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "curl"
    ]
  }
}
```