-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspec.yml
4471 lines (4309 loc) · 150 KB
/
spec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
contact:
name: Canva Developer Community
url: https://community.canva.dev/
description: API for building integrations with Canva via a REST api
license:
name: ©2023 All Rights Reserved
termsOfService: https://www.canva.com/trust/legal/
title: Canva Connect API
version: latest
servers:
- description: Canva Connect API
url: https://api.canva.com/rest
tags:
- name: app
- name: asset
- name: autofill
- name: brand_template
- name: comment
- name: connect
- name: design
- name: design_import
- name: export
- name: folder
- name: oauth
- name: user
paths:
/v1/apps/{appId}/jwks:
get:
description: |-
Returns the Json Web Key Set (public keys) of an app. These keys are used to
verify JWTs sent to app backends.
operationId: getAppJwks
parameters:
- description: The app id
explode: false
in: path
name: appId
required: true
schema:
pattern: "[a-zA-Z0-9_-]{1,30}"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetAppJwksResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
tags:
- app
/v1/assets/{assetId}:
delete:
description: |-
You can delete an asset by specifying its `assetId`. This operation mirrors the behavior
in the Canva UI. Deleting an item moves it to the trash.
Deleting an asset doesn't remove it from designs that already use it.
operationId: deleteAsset
parameters:
- description: The ID of the asset.
explode: false
in: path
name: assetId
required: true
schema:
pattern: "M[a-zA-Z0-9_-]{10}"
type: string
style: simple
responses:
"204":
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- asset:write
tags:
- asset
get:
description: You can retrieve the metadata of an asset by specifying its `assetId`.
operationId: getAsset
parameters:
- description: The ID of the asset.
explode: false
in: path
name: assetId
required: true
schema:
pattern: "M[a-zA-Z0-9_-]{10}"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetAssetResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- asset:read
tags:
- asset
patch:
description: |-
You can update the name and tags of an asset by specifying its `assetId`. Updating the tags
replaces all existing tags of the asset.
NOTE: This `PATCH` method of updating an asset replaces the deprecated `POST` method. For the old deprecated method, see [Update asset (deprecated)](https://www.canva.dev/docs/connect/api-reference/assets/update-asset-deprecated/).
operationId: updateAsset
parameters:
- description: The ID of the asset.
explode: false
in: path
name: assetId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAssetRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAssetResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- asset:write
tags:
- asset
post:
description: |-
WARNING: This `POST` method of updating an asset is deprecated and will soon be removed. It's been replaced with an equivalent `PATCH` method: see [Update asset](https://www.canva.dev/docs/connect/api-reference/assets/update-asset/).
You can update the name and tags of an asset by specifying its `assetId`. Updating the tags
replaces all existing tags of the asset.
operationId: updateAssetDeprecated
parameters:
- description: The ID of the asset.
explode: false
in: path
name: assetId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAssetDeprecatedRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAssetResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- asset:write
tags:
- asset
/v1/assets/upload:
post:
deprecated: true
description: |-
WARNING: This endpoint for uploading an asset is deprecated. You should instead use the asynchronous [Create asset upload job API](https://www.canva.dev/docs/connect/api-reference/assets/create-asset-upload-job/) instead.
You can upload media assets to a user’s content library using the `assets/upload` endpoint.
When specifying an asset that already exists, it renames the asset.
The request format for this endpoint is an `application/octet-stream` body of bytes. Attach
information about the upload using an `Upload-Metadata` header.
operationId: uploadAsset
parameters:
- content:
application/json:
schema:
$ref: '#/components/schemas/UploadMetadata'
in: header
name: Upload-Metadata
required: true
requestBody:
content:
application/octet-stream:
schema:
format: binary
type: string
description: Binary of the asset to upload.
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/UploadAssetResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- asset:write
tags:
- asset
/v1/asset-uploads:
post:
description: |-
Starts a new job to upload an asset to a user's content library.
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.
You can check the status and get the results of asset upload jobs created with this API using the [Get asset upload job API](https://www.canva.dev/docs/connect/api-reference/assets/get-asset-upload-job/).
operationId: CreateAssetUploadJob
parameters:
- content:
application/json:
schema:
$ref: '#/components/schemas/AssetUploadMetadata'
in: header
name: Asset-Upload-Metadata
required: true
requestBody:
content:
application/octet-stream:
schema:
format: binary
type: string
description: Binary of the asset to upload.
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAssetUploadJobResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- asset:write
tags:
- asset
/v1/asset-uploads/{jobId}:
get:
description: |-
Get the result of an asset upload job that was created using the [Create asset upload job API](https://www.canva.dev/docs/connect/api-reference/assets/create-asset-upload-job/).
You might need to make multiple requests to this endpoint until you get a `success` or `failed` status.
operationId: GetAssetUploadJob
parameters:
- description: The asset upload job ID.
explode: false
in: path
name: jobId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetAssetUploadJobResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- asset:read
tags:
- asset
/v1/autofills:
post:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
<Note>
To use this API, your integration must act on behalf of a user that's a member of a [Canva Enterprise](https://www.canva.com/enterprise/) organization.
</Note>
Starts a new job to autofill a Canva design using a brand template and input data.
To get a list of input data fields, use the [Get brand template dataset
API](https://www.canva.dev/docs/connect/api-reference/brand-templates/get-brand-template-dataset/).
Brand templates contain references to image media. You can reference image media by providing the value of `type` with `image` within the `data` object. The number of
references to image media within a brand template cannot currently exceed 300 references.
operationId: createDesignAutofillJob
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDesignAutofillJobRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDesignAutofillJobResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- design:content:write
tags:
- autofill
/v1/autofills/{jobId}:
get:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
<Note>
To use this API, your integration must act on behalf of a user that's a member of a [Canva Enterprise](https://www.canva.com/enterprise/) organization.
</Note>
Get the result of a design autofill job that was created using the [Create a design autofill job
API](https://www.canva.dev/docs/connect/api-reference/autofills/create-design-autofill-job/).
You might need to make multiple requests to this endpoint until you get a `success` or
`failed` status.
operationId: getDesignAutofillJob
parameters:
- description: The design autofill job ID.
explode: false
in: path
name: jobId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetDesignAutofillJobResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- design:meta:read
tags:
- autofill
/v1/brand-templates:
get:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
<Note>
To use this API, your integration must act on behalf of a user that's a member of a [Canva Enterprise](https://www.canva.com/enterprise/) organization.
</Note>
Get a list of the [brand templates](https://www.canva.com/help/publish-team-template/) the user has access to.
operationId: listBrandTemplates
parameters:
- description: Lets you search the brand templates available to the user using
a search term or terms.
explode: true
in: query
name: query
required: false
schema:
type: string
style: form
- description: |-
If the success response contains a continuation token, the user has access to more
brand templates you can list. You can use this token as a query parameter and retrieve
more templates from the list, for example
`/v1/brand-templates?continuation={continuation}`.
To retrieve all the brand templates available to the user, you might need to make
multiple requests.
explode: true
in: query
name: continuation
required: false
schema:
type: string
style: form
- description: |-
Filter the brand templates to only show templates created by a particular user.
Provide a Canva user ID and it will filter the list to only show brand templates
created by that user. The 'owner' of a template is the user who created the design,
and the owner can't be changed.
explode: true
in: query
name: ownership
required: false
schema:
type: string
style: form
- description: |-
Sort the list of brand templates. This can be one of the following:
- `RELEVANCE`: (Default) Sort results using a relevance algorithm.
- `MODIFIED_DESCENDING`: Sort results by the date last modified in descending order.
- `MODIFIED_ASCENDING`: Sort results by the date last modified in ascending order.
- `TITLE_DESCENDING`: Sort results by title in descending order.
- `TITLE_ASCENDING`: Sort results by title in ascending order.
explode: true
in: query
name: sort_by
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ListBrandTemplatesResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- brandtemplate:meta:read
tags:
- brand_template
/v1/brand-templates/{brandTemplateId}:
get:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
<Note>
To use this API, your integration must act on behalf of a user that's a member of a [Canva Enterprise](https://www.canva.com/enterprise/) organization.
</Note>
Retrieves the metadata for a brand template.
operationId: getBrandTemplate
parameters:
- description: The brand template ID.
explode: false
in: path
name: brandTemplateId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetBrandTemplateResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- brandtemplate:meta:read
tags:
- brand_template
/v1/brand-templates/{brandTemplateId}/dataset:
get:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
<Note>
To use this API, your integration must act on behalf of a user that's a member of a [Canva Enterprise](https://www.canva.com/enterprise/) organization.
</Note>
Gets the dataset definition of a brand template. If the brand
template contains autofill data fields, this API returns an object with the data field
names and the type of data they accept.
You can autofill a brand template using the [Create a design autofill job
API](https://www.canva.dev/docs/connect/api-reference/autofills/create-design-autofill-job/).
operationId: getBrandTemplateDataset
parameters:
- description: The brand template ID.
explode: false
in: path
name: brandTemplateId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetBrandTemplateDatasetResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- brandtemplate:content:read
tags:
- brand_template
/v1/comments:
post:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
Create a new top-level comment on a design.
For information on comments and how they're used in the Canva UI, see the
[Canva Help Center](https://www.canva.com/help/comments/). A design can have a maximum
of 1000 comments.
operationId: createComment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCommentRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCommentResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- comment:write
tags:
- comment
/v1/comments/{commentId}/replies:
post:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
Creates a reply to a comment in a design.
To reply to an existing thread of comments, you can use either the `id` of the parent
(original) comment, or the `thread_id` of a comment in the thread. Each comment can
have a maximum of 100 replies created for it.
For information on comments and how they're used in the Canva UI, see the
[Canva Help Center](https://www.canva.com/help/comments/).
operationId: createReply
parameters:
- description: The `id` of the comment.
example: KeAZEAjijEb
explode: false
in: path
name: commentId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateReplyRequest'
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/CreateReplyResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- comment:write
tags:
- comment
/v1/designs/{designId}/comments/{commentId}:
get:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
Gets a comment.
For information on comments and how they're used in the Canva UI, see the
[Canva Help Center](https://www.canva.com/help/comments/).
operationId: getComment
parameters:
- description: The design ID.
explode: false
in: path
name: designId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
- description: The `id` of the comment.
example: KeAZEAjijEb
explode: false
in: path
name: commentId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetCommentResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- comment:read
tags:
- comment
/v1/connect/keys:
get:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
The Keys API (`connect/keys`) is a security measure you can use to verify the authenticity
of webhooks you receive from Canva Connect. The Keys API returns a
[JSON Web Key (JWK)](https://www.rfc-editor.org/rfc/rfc7517#section-2), which you can use to
decrypt the webhook signature and verify it came from Canva and not a potentially malicious
actor. This helps to protect your systems from
[Replay attacks](https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/).
The keys returned by the Keys API can rotate. We recommend you cache the keys you receive
from this API where possible, and only access this API when you receive a webhook signed
with an unrecognized key. This allows you to verify webhooks quicker than accessing this API
every time you receive a webhook.
operationId: getSigningPublicKeys
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetSigningPublicKeysResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
tags:
- connect
/v1/designs:
get:
description: |-
Lists metadata for all the designs in a Canva user's
[projects](https://www.canva.com/help/find-designs-and-folders/). You can also:
- Use search terms to filter the listed designs.
- Show designs either created by, or shared with the user.
- Sort the results.
operationId: listDesigns
parameters:
- description: "Lets you search the user's designs, and designs shared with\
\ the user, using a search term or terms."
example: party invites
explode: true
in: query
name: query
required: false
schema:
type: string
style: form
- description: |-
If the success response contains a continuation token, the list contains more designs
you can list. You can use this token as a query parameter and retrieve more
designs from the list, for example
`/v1/designs?continuation={continuation}`.
To retrieve all of a user's designs, you might need to make multiple requests.
example: RkFGMgXlsVTDbMd:MR3L0QjiaUzycIAjx0yMyuNiV0OildoiOwL0x32G4NjNu4FwtAQNxowUQNMMYN
explode: true
in: query
name: continuation
required: false
schema:
type: string
style: form
- description: |-
Filter the list of designs based on the user's ownership of the designs.
This can be one of the following:
- `owned`: Designs owned by the user.
- `shared`: Designs shared with the user.
- `any`: Designs owned by and shared with the user.
example: any
explode: true
in: query
name: ownership
required: false
schema:
type: string
style: form
- description: |-
Sort the list of designs.
This can be one of the following:
- `relevance`: (Default) Sort results using a relevance algorithm.
- `modified_descending`: Sort results by the date last modified in descending order.
- `modified_ascending`: Sort results by the date last modified in ascending order.
- `title_descending`: Sort results by title in descending order.
- `title_ascending`: Sort results by title in ascending order.
example: relevance
explode: true
in: query
name: sort_by
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetListDesignResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- design:meta:read
tags:
- design
post:
description: |-
Creates a new Canva design. To create a new design, you can either:
- Use a preset design type.
- Set height and width dimensions for a custom design.
Additionally, you can also provide the `asset_id` of an asset in the user's [projects](https://www.canva.com/help/find-designs-and-folders/) to add to the new design. To list the assets in a folder in the user's projects, use the [List folder items API](https://www.canva.dev/docs/connect/api-reference/folders/list-folder-items/).
operationId: createDesign
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDesignRequest'
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDesignResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- design:content:write
tags:
- design
/v1/designs/{designId}:
get:
description: "Gets the metadata for a design. This includes owner information,\
\ URLs for editing and viewing, and thumbnail information."
operationId: getDesign
parameters:
- description: The design ID.
explode: false
in: path
name: designId
required: true
schema:
pattern: "[a-zA-Z0-9_-]+"
type: string
style: simple
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/GetDesignResponse'
description: OK
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error Response
security:
- oauthAuthCode:
- design:meta:read
tags:
- design
/v1/imports:
post:
description: |-
<Warning>
This API is currently provided as a preview. Be aware of the following:
- There might be unannounced breaking changes.
- Any breaking changes to preview APIs won't produce a new [API version](https://www.canva.dev/docs/connect/versions/).
- Public integrations that use preview APIs will not pass the review process, and can't be made available to all Canva users.
</Warning>
Starts a new job to import an external file as a new design in Canva.
The request format for this endpoint has an `application/octet-stream` body of bytes,
and the information about the import is attached using an `Import-Metadata` header.
Supported formats: PDFs(`.pdf`), Adobe Illustrator(`.ai`), Adobe Photoshop(`.psd`),
Microsoft Word(`.docx`), Microsoft Powerpoint(`.pptx`), Microsoft Excel(`.xls`, `.xlsx`),
OpenOffice Draw(`.odg`), OpenOffice Presentation(`.odp`), OpenOffice Sheets(`.ods`),
OpenOffice Text(`.odt`).
You can check the status and get the results of import jobs created with this API using the [Get design import job API](https://www.canva.dev/docs/connect/api-reference/design-imports/get-design-import-job/).
For upload formats and requirements, see
[Canva Help — Upload formats and requirements](https://www.canva.com/help/upload-formats-requirements/).
operationId: createDesignImportJob
parameters:
- content:
application/json:
schema:
$ref: '#/components/schemas/DesignImportMetadata'
in: header
name: Import-Metadata
required: true
requestBody:
content:
application/octet-stream:
schema:
format: binary