asset

Starts a new asynchronous job to upload an asset to the user's content library. Supported file types for assets are listed in the Assets API overview.

The request format for this endpoint is an application/octet-stream body of bytes. Attach information about the upload using an Asset-Upload-Metadata header.

<Note>

For more information on the workflow for using asynchronous jobs, see API requests and responses. You can check the status and get the results of asset upload jobs created with this API using the Get asset upload job API.

</Note>
post/v1/asset-uploads

Request

  • Base URL: https://api.canva.com/rest
  • URL: https://api.canva.com/rest/v1/asset-uploads
  • Auth: OAuth 2 (authorization code, authorization URL https://www.canva.com/api/oauth/authorize, token URL https://api.canva.com/rest/v1/oauth/token, scopes: asset:write)

Headers

Request body application/octet-stream

string binary required

Response

OK

Example response

{
  "job": {
    "id": "e08861ae-3b29-45db-8dc1-1fe0bf7f1cc8",
    "status": "success",
    "asset": {
      "id": "Msd59349ff",
      "type": "image",
      "name": "My Awesome Upload",
      "tags": [
        "image",
        "holiday",
        "best day ever"
      ],
      "owner": {
        "user_id": "oU123456AbCdE",
        "team_id": "oB123456AbCdE"
      },
      "created_at": 1377396000,
      "updated_at": 1692928800,
      "thumbnail": {
        "width": 595,
        "height": 335,
        "url": "https://document-export.canva.com/Vczz9/zF9vzVtdADc/2/thumbnail/0001.png?<query-string>"
      }
    }
  }
}

Changes

    • warning

      added the new user_linked_to_another_idp enum value to the response property for the response status

    • warning

      added the new asset_not_ready enum value to the response property for the response status