requestBidFileUpload
Requires permission biddesk:bid:update.
Starts attaching a file to an open or submitted bid: records it as UPLOADING and returns a presigned link to PUT its bytes to, then call confirmBidFileUpload. Refused with BID_CLOSED on a closed bid, BID_FILE_TYPE_NOT_ALLOWED for an unsupported extension or a content type that does not match it, BID_FILE_TOO_LARGE over 50 MB and BID_FILE_NAME_INVALID for an empty or overlong name. Requires Bid Desk and permission to update bids.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RequestBidFileUpload($input: RequestBidFileUploadInput!) {
requestBidFileUpload(input: $input) {
uploadUrl
file {
id
fileName
status
createdAt
bidId
contentType
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RequestBidFileUpload($input: RequestBidFileUploadInput!) {\n requestBidFileUpload(input: $input) {\n uploadUrl\n file {\n id\n fileName\n status\n createdAt\n bidId\n contentType\n }\n }\n}",
"variables": {
"input": {
"bidId": "id",
"contentType": "string",
"declaredSize": 0,
"fileName": "string"
}
}
}
EOF
Variables:
{
"input": {
"bidId": "id",
"contentType": "string",
"declaredSize": 0,
"fileName": "string"
}
}
Response:
{
"data": {
"requestBidFileUpload": {
"uploadUrl": "string",
"file": {
"id": "id",
"fileName": "string",
"status": "READY",
"createdAt": "2025-01-15T00:00:00Z",
"bidId": "id",
"contentType": "string"
}
}
}
}
requestBidFileUpload(
input: RequestBidFileUploadInput!
): BidFileUpload!
Arguments
requestBidFileUpload.input ● RequestBidFileUploadInput! non-null input
The bid and the file to attach.
Type
BidFileUpload object
A new bid file and the link its bytes are uploaded to.