Skip to main content

Create a component

Log in to add to favourites

Returns

Example

JAVASCRIPT
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
let newComponent = { "id": "address", "projectId": "movieDb", "name": { "en-GB": "Address" }, "description": { "en-GB": "An address component" }, "fields": [ { "id": "firstLine", "name": { "en-GB": "First line" }, "dataType": "string", "editor": { "id": "text", "instructions": { "en-GB": "The first line of address" }, "properties": { "placeholderText": { "en-GB": "Enter the first line of address" } } } }, { "id": "postCode", "name": { "en-GB": "Post code" }, "dataType": "string", } ] }; client.components.create(newComponent) .then(result => { console.log('API call result: ', result); }) .catch(error => { console.log('API call fetch error: ', error); });

Validations

Still need help?

New support request