# Kibana canvas create using api error

**URL:** <https://discuss.elastic.co/t/kibana-canvas-create-using-api-error/253350>\
**Category:** Kibana\
**Created:** [October 26, 2020, 4:43pm UTC](https://discuss.elastic.co/t/kibana-canvas-create-using-api-error/253350 "2020-10-26T16:43:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Fernando\_Palm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_fernando_palm/32/77804_2.png) [@Carlos\_Fernando\_Palm](https://discuss.elastic.co/u/Carlos_Fernando_Palm)\
**Post date:** [October 26, 2020, 4:43pm UTC](https://discuss.elastic.co/t/kibana-canvas-create-using-api-error/253350/1 "2020-10-26T16:43:13Z")

</div>

Hello. I am trying to create a canvas using this API endpoint:

> **[Create saved objects API | Kibana Guide \[7.9\] | Elastic](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-create.html)**

For this I am using the following curl:  
curl -X POST curl -X POST localhost:5601/api/saved\_objects/canvas -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "@canvas.json"

Now the canvas.json file is the file I get when exporting from kibana:

![image](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b7abd77b945ad53ca231591934067dcb3f2e3faf.png)

I am always getting the following error:

{"statusCode":400,"error":"Bad Request","message":"[request body.attributes]: expected value of type [object] but got [undefined]"}  
e"}

Even after creating the attributes tag I still get

{"statusCode":400,"error":"Bad Request","message":"Unsupported saved object type: 'canvas': Bad Request"}

Is there a way to use curl to use the API to create a canvas from an endpoint?

---

<div class="post-metadata">

**Author:** ![poff](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/poff/32/81795_2.png) [@poff](https://discuss.elastic.co/u/poff)\
**Post date:** [October 29, 2020, 9:02pm UTC](https://discuss.elastic.co/t/kibana-canvas-create-using-api-error/253350/2 "2020-10-29T21:02:35Z")

</div>

Hey there! I think instead of using `canvas` as your saved object type, you'll want to use `canvas-workpad` so try posting to ` localhost:5601/api/saved_objects/canvas-workpad` instead and see if that works for ya

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 26, 2020, 9:02pm UTC](https://discuss.elastic.co/t/kibana-canvas-create-using-api-error/253350/3 "2020-11-26T21:02:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
