Skip to content

Send a video to YouTube

POST
/api/v1/youtube/videos
curl --request POST \
--url https://digize.com/api/v1/youtube/videos \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "assetId": "example" }'

Sends a creative library video up to the workspace’s YouTube channel, unlisted, in the background, so Google’s video ads (Demand Gen, Performance Max) can show it. A video goes up once: one already there or on its way is returned as it is. When the day’s uploads for the platform are used, it waits for the next day.

Needs the ads:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
assetId
required
string
>= 1 characters <= 100 characters

Example generated

{
"assetId": "example"
}

Done

Media typeapplication/json
object
assetId
required

The creative library video’s id.

string
name
required
string
state
required

Queued waits for the day’s uploads; uploading and processing are on their way; ready can run in Google’s video ads.

string
Allowed values: queued uploading processing ready failed
videoId
required

YouTube’s id, once it has the file.

string | null
privacy
required
Any of:
string
Allowed values: public unlisted private
locked
required

YouTube kept it private though Digize asked for unlisted, until Google audits Digize’s YouTube access. Ads can’t use it.

boolean
channelTitle
required
string | null
bytes
required
number
bytesSent
required
number
queuedUntil
required
Any of:
string format: date-time
error
required
string | null
running
required
boolean
requestedBy
required
string
requestedAt
required
string format: date-time
uploadedAt
required
Any of:
string format: date-time
readyAt
required
Any of:
string format: date-time

Example

{
"state": "queued",
"privacy": "public"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}