
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"description": "Сard Description",
"asap": false,
"due_date": "2022-05-04T00:00:00Z",
"owner_id": 1,
"members": [1, 2],
"tags":["bug"],
"links": [
{
"url": "https://example.com",
"description": "Link description"
}
]
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});| Name | Type | Constraints | Description |
|---|---|---|---|
title required | string | minLength: 1 maxLength: 1024 | Title |
asap | boolean | ASAP marker | |
due_date | string | Deadline. ISO 8601 format | |
description | string | maxLength: 32768 | Description for card |
owner_id | integer | Owner ID | |
links | array of objects | Array of links to be added to the card as external links | |
members | array | Array of user id. Users with the specified IDs will become members in the card | |
tags | array | Array of tags. If the tag does not exist it will be created | |
properties | object | Add custom properties to card. format: 'id_{custom_property_id}: value', value can be a null, number, string, array or object |
How to add custom property type:
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_1": "test"
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"properties": {
"title": "Card title",
"id_2": "https://www.google.com/"
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_3": 12
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_4": "email@gmail.com"
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_5": "+7 (785) 421-47-89"
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Format: 'id_{custom_property_id}: value'
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_6": [
12
]
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'. Value array must contain select option id
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_6": [
12,
13
]
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'. Value array must contain select option ids
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_6": {
"date": "2022-09-30",
"time": "19:00:36",
"tzOffset": 180
}
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_7": "3"
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'. Value must contain catalog value id
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_8": "my_score"
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'. Value must be text or a number, depending on the type collective value
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_9": 1
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'
const axios = require("axios");
const options = {
method: "POST",
url: 'your webhook url',
headers: {
Accept: "application/json",
},
data: {
"title": "Card title",
"properties": {
"id_10": [
{
"emoji": "🙂",
"count": 1
}
]
}
}
}
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});Properties format: 'id_{custom_property_id}: value'