Skip to content

Update Opportunity By Id

POST
/ad/v1/opportunity/{opportunity_id}

Update the opportunity with the given id. This will generate a new ad api token that is returned in the response header.

Authorizations

Parameters

Path Parameters

opportunity_id
required
string
>= 1 characters

Header Parameters

x-hz-ad-api-token

Optional header to make calling the endpoint faster by not requiring a new token to be generated.

string

Optional header to make calling the endpoint faster by not requiring a new token to be generated.

Request Body required

object
state
required

State of the opportunity

string
Allowed values: start complete abort
abort_reason

Reason for aborting the opportunity

string
Allowed values: cancel other
abort_seconds

Number of seconds into the video when the abort happened

integer

Responses

200

Successful Response

Headers

x-hz-ad-api-token
string

Provide this token to future requests for the same user to make their requests faster (as a new token doesn't need to be generated)

403

Forbidden

object
auth_success
boolean
default: true
error_code
required
string
desc
required
string

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string

500

Internal Server Error

Headers

x-hz-ad-api-token
string

Provide this token to future requests for the same user to make their requests faster (as a new token doesn't need to be generated)