POST/v2/images/{image_id}/account_transfer

Initiate an image account transfer

Creates an account transfer for a snapshot image to a DigitalOcean account or team. Supply either recipient_email or recipient_uuid to identify the recipient; the transfer must have exactly one recipient. A transfer_id of 0 indicates that the transfer was accepted, while any other value indicates that it is pending recipient acceptance.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
image_idintegerrequired
The unique numeric identifier of the image to transfer.

Specify the transfer recipient using exactly one of the available recipient fields.

recipient_emailstringrequired
The email address of the user account that the image will be transferred to.

7 status codes
201Returns a `transfer_id` identifying the initiated transfer. A value of 0 indicates that the transfer was accepted; any other value indicates that the transfer is pending recipient acceptance.
transfer_idintegeroptional
A unique number that used to identify and reference an image account transfer.
400Returned when there is an error parsing the request body.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
401Returned when authentication fails because the credentials are invalid.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404Returned when the image resource is not found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429Returned when the API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500Returned when a server error occurs.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 400 is returned when the request body cannot be parsed; provide either recipient_email or recipient_uuid as the recipient. A 401 indicates invalid authentication credentials, and a 404 indicates that the image was not found. A 429 indicates that the API rate limit has been exceeded, and a 500 indicates a server error. The image_id path parameter must identify an image that can be transferred; only snapshot images are supported.