Download OpenAPI specification:Download
This is Cloud BOT RESTful API Reference.
You need to set a public ID and issue your access tokens for using API.
Cloud BOT dashboard > Please set them from the For Developers page.
https://console.c-bot.pro/development
All the multi-byte characters contained in the request payload and the response will be treated as UTF-8 format.
The request will be rejected if the request payload page has a capacity of more than 4 MB.
Refers to the contract list for which API function is enabled.
The access token you use must have 'Refer' permissions granted.
properties | string Example: properties=plan,owner An additional array of property name |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] The contract list has been responded.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] Content-type is incorrect.
[Unprocessable Entity] A request is unable to be processed.
{- "code": 200,
- "contracts": [
- {
- "public_id": "example1",
- "public_path": "/example1/",
- "plan": "free",
- "owner": "example1@example.com",
- "timezone": "Asia/Tokyo",
- "location": "Japan",
- "name": null,
- "organization": null,
- "postcode": null,
- "address": null,
- "phone": null,
- "department": null,
- "username": null
}, - {
- "public_id": "example2",
- "public_path": "/example2/",
- "plan": "Single Office",
- "owner": "example2@example.com",
- "timezone": "Asia/Tokyo",
- "location": "Japan",
- "name": "Head Office",
- "organization": "Cloud BOT,Inc.",
- "postcode": "000-0000",
- "address": "1560 Broadway Suite 1001 New York, NY",
- "phone": "000-0000-0000",
- "department": "General Affairs Department",
- "username": "John Smith"
}
]
}
Refer to the API publishing BOT list
The access token you use must have 'Refer' permissions granted.
public_id required | string Public ID of API |
properties | string Example: properties=icon,created,last_modified,creator An additional array of property name |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] The Bot list has been responded.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200,
- "bots": [
- {
- "id": "get_items",
- "name": "GETTING ITEMS BOT",
- "description": "A BOT for getting items.",
- "icon": "data:image/png;base64,0000000000",
- "created": "2020-04-06T14:32:23Z",
- "last_modified": "2020-04-07T15:10:02Z",
- "creator": "example@example.com"
}, - {
- "id": "add_item",
- "name": "Adding Additional ITEMS BOT",
- "description": "A BOT for adding items.",
- "icon": "data:image/png;base64,0000000000",
- "created": "2020-04-07T06:29:41Z",
- "last_modified": "2020-04-07T09:41:44Z",
- "creator": "example@example.com"
}
]
}
Refer to the BOT details.
The access token you use must have 'Refer' permissions granted.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
properties | string Example: properties=icon,created,last_modified,creator,input,output An additional array of property name |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] The BOT details has been responded.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Not Found] BOT does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200,
- "id": "add_item",
- "name": "Adding Additional ITEMS BOT",
- "description": "A BOT for adding items.",
- "icon": "data:image/png;base64,0000000000",
- "created": "2020-04-07T06:29:41Z",
- "last_modified": "2020-04-07T09:41:44Z",
- "creator": "example@example.com",
- "input": {
- "data": {
- "Login ID": {
- "type": "string"
}, - "Password": {
- "type": "string"
}, - "Items": {
- "type": "group",
- "data": {
- "Item Name": {
- "type": "string"
}, - "Price": {
- "type": "string"
}, - "Image": {
- "type": "files"
}, - "Tags": {
- "type": "string[]"
}
}
}
}
}, - "output": {
- "data": {
- "Items": {
- "type": "group",
- "data": {
- "Item ID": {
- "type": "string"
}
}
}
}
}
}
Delete the BOT.
The access token you use must have 'Modify' permissions granted.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] BOT has been deleted.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to modify to BOT.
[Not Found] BOT does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200
}
Execute an any BOT.
The access token you use must have 'Execute' permissions granted.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
timeout | integer [ 0 .. 25000 ] The number of milliseconds waiting for the completion of BOT execution.(unspecified sets 0) |
callback_endpoint | string <uri> The execution result will be posted to the endpoint.(Unspecified sets no callback) |
callback_tries | integer [ 0 .. 5 ] Number of Attempts for callback posting. When the callback_endpoint get status code other than 200 series or an incorrect access token was set at the response header, Attempts number of times you specified. No callback if you set 0 times. |
input | object (datalist_input) An object that represents an input value.(The BOT default value will be used if it is not specified.) |
[Created] BOT execution is completed.
[Accepted] The BOT is executing.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to execute BOT.
[Not Found] BOT does not exist.
[Gone] BOT execution is suspended.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] Content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
[Locked] The BOT execution is locked. The execution time or the storage capacity has been exceeded.
[Too Many Requests] The maximum concurrent access has been exceeded.
{- "timeout": 20000,
- "input": {
- "Keyword": "Cloud BOT"
}
}
{- "code": 201,
- "job_id": "00000000-0000-0000-0000-000000000000",
- "bot_id": "get_items",
- "bot_name": "GETTING ITEMS BOT",
- "status": 0,
- "start_time": "2019-12-02T05:30:13Z",
- "elapsed_time": 6,
- "output": {
- "Number": "2",
- "Items": [
- {
- "Item name": "Cheese Cake",
- "Price": "500",
- "Image": {
- "type": "files",
- "files": [
- {
- "ref": "jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000000",
- "meta": {
- "name": "0001.jpg",
- "size": 603956,
- "timestamp": 1513657350000
}
}
]
}, - "Tags": [
- "Cake",
- "Cheese"
]
}, - {
- "Item name": "Gateau Chocolat",
- "Price": "600",
- "Image": {
- "type": "files",
- "files": [
- {
- "ref": "jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000001",
- "meta": {
- "name": "0002.jpg",
- "size": 694475,
- "timestamp": 1651024763990
}
}
]
}, - "Tags": [
- "Cake",
- "Chocolate"
]
}
]
}
}
Refer to BOT job list.
The access token you use must have 'Execute' or 'Refer' permissions granted.
400 error response will be returned if the response size exceeds 4MB.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
properties | string Example: properties=output An additional array of property name |
limit | integer >= 0 Example: limit=10 The maximum number of items |
datetime_from | string <date-time> Example: datetime_from=2019-01-01T00:00:00Z Indicate jobs created after a specified time(ISO 8601) |
datetime_to | string <date-time> Example: datetime_to=2019-01-01T00:00:00Z Indicate jobs created before a specified time(ISO 8601) |
id_from | string Example: id_from=00000000-0000-0000-0000-000000000000 Indicate jobs whose ID are greater than specified ID |
id_to | string Example: id_to=00000000-0000-0000-0000-000000000000 Indicate jobs whose ID are smaller than specified ID |
statuses | integer Example: statuses=1 Indicates jobs with the specified status |
sort_order | string Default: "desc" Enum: "asc" "desc" Example: sort_order=asc By sort |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] The job list has been responded.
[Bad Request] The response size exceeds the maximum limit.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Not Found] BOT does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] Content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200,
- "jobs": [
- {
- "job_id": "00000000-0000-0000-0000-000000000001",
- "bot_id": "get_items",
- "bot_name": "GETTING ITEMS BOTT",
- "status": 2,
- "start_time": "2019-12-02T06:10:56Z",
}, - {
- "job_id": "00000000-0000-0000-0000-000000000000",
- "bot_id": "get_items",
- "bot_name": "GETTING ITEMS BOT",
- "status": 0,
- "start_time": "2019-12-02T06:04:21Z",
- "elapsed_time": 6,
- "output": {
- "Number": "2",
- "Items": [
- {
- "Item name": "Cheese Cake",
- "Price": "500",
- "Image": {
- "type": "files",
- "files": [
- {
- "ref": "jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000000",
- "meta": {
- "name": "0001.jpg",
- "size": 603956,
- "timestamp": 1513657350000
}
}
]
}, - "Tags": [
- "Cake",
- "Cheese"
]
}, - {
- "Item name": "Gateau Chocolat",
- "Price": "600",
- "Image": {
- "type": "files",
- "files": [
- {
- "ref": "jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000001",
- "meta": {
- "name": "0002.jpg",
- "size": 694475,
- "timestamp": 1651024763990
}
}
]
}, - "Tags": [
- "Cake",
- "Chocolate"
]
}
]
}
}
]
}
Export the BOT definition.
The access token you use must have 'Refer' permissions granted.
BOT containing hidden data will be denied export.(403)
In this case, you can enable export by including the 'x-cbot-force' header.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
x-cbot-description | string This is a description to be included in the export data. |
x-cbot-force | boolean Value: "true" Forces the export. |
x-cbot-public | string Value: "true" Enables import to another contract. |
[OK] BOT definition has been exported.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT. Or your reference has been declined due to data protection.
[Not Found] BOT does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200,
- "jws": "header.payload.signature"
}
Import the BOT definition.
The access token you use must have 'Modify' permissions granted.
public_id required | string Public ID of API |
bot_id? | string BOT ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
x-cbot-dry-run | string Value: "true" It only verifies the JWS and does not import. |
jws required | string BOT definition JWS |
bot_name | string BOT name |
[OK] BOT definition has been imported.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to modfy to BOT.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect. Or the import destination is not allowed.
{- "jws": "header.payload.signature",
- "bot_name": "GETTING ITEMS BOT"
}
{- "code": 200,
- "bot_id": "get_items"
}
Refer to an any job result.
The access token you use must have 'Execute' or 'Refer' permissions granted.
public_id required | string Public ID of API |
job_id required | string JOB ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] The Job has been responded.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Not Found] Job does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200,
- "job_id": "00000000-0000-0000-0000-000000000000",
- "bot_id": "get_items",
- "bot_name": "GETTING ITEMS BOT",
- "status": 0,
- "start_time": "2019-12-02T06:04:21Z",
- "elapsed_time": 6,
- "output": {
- "Number": "2",
- "Items": [
- {
- "Item name": "Cheese Cake",
- "Price": "500",
- "Image": {
- "type": "files",
- "files": [
- {
- "ref": "jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000000",
- "meta": {
- "name": "0001.jpg",
- "size": 603956,
- "timestamp": 1513657350000
}
}
]
}, - "Tags": [
- "Cake",
- "Cheese"
]
}, - {
- "Item name": "Gateau Chocolat",
- "Price": "600",
- "Image": {
- "type": "files",
- "files": [
- {
- "ref": "jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000001",
- "meta": {
- "name": "0002.jpg",
- "size": 694475,
- "timestamp": 1651024763990
}
}
]
}, - "Tags": [
- "Cake",
- "Chocolate"
]
}
]
}
}
Suspend an any executing JOB.
The access token you use must have 'Suspend' permissions granted.
public_id required | string Public ID of API |
job_id required | string JOB ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] The Job was suspended.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to suspend the job.
[Not Found] Job does not exist.
[Gone] Job has been already done.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200,
- "job_id": "00000000-0000-0000-0000-000000000000",
- "bot_id": "get_items",
- "bot_name": "GETTING ITEMS BOT",
- "status": 1,
- "start_time": "2019-12-02T06:15:33Z",
- "elapsed_time": 3
}
Refer to BOT subscription list.
The access token you use must have 'Refer' permissions granted.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] The subscription list has been responded.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Not Found] BOT does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "code": 200,
- "subscriptions": [
- {
- "subscribe_id": 1000000,
- "language": "ja",
- "event": "onended",
- "callback_type": "webhook",
- "disabled": false,
}, - {
- "subscribe_id": 1000001,
- "language": "en",
- "event": "onsucceeded",
- "callback_type": "mailhook",
- "callback_emails": {
- "member_emails": [
- "sample1@example.com",
- "sample2@example.com"
], - "guest_emails": [
- "sample3@example.com",
- "sample4@example.com"
]
}, - "disabled": false,
}
]
}
The subscription has started.
When subscription started, Webhook and Mailhook will be available that linked with BOT operation.
The access token you use must have 'Refer' permissions granted.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
event required | string Enum: "onended" "onsucceeded" "onfailed" "oncannotexecute" Subscription Event |
callback_type | string Default: "webhook" Enum: "webhook" "mailhook" Callback type |
callback_endpoint | string <uri> Specify when callback_type is 'webhook'. |
callback_emails | object Specify when callback_type is 'mailhook'. |
[OK] The subscription has started.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Not Found] BOT does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
[Too Many Subscriptions] The maximum number of subscriptions has been exceeded.
{- "event": "onended",
- "callback_type": "webhook",
}
{- "code": 200,
- "subscribe_id": 1000000,
}
Unsubscribe BOT
The access token you use must have 'Refer' permissions granted.
public_id required | string Public ID of API |
bot_id required | string BOT ID |
subscribe_id required | string Subscription ID |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
[OK] Unsubscribed.
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Not Found] BOT or subscription ID does not exist.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
[Locked] The subscription has been locked.
{- "code": 200
}
Download files.
The WS token is required.
key required | string Example: jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000000 Ref value of the file to download. |
ws_token required | string Example: ws_token=00000000-0000-0000-0000-000000000000 WS token |
[OK] The file has been responded.
[Not Found] File does not exist.
File Data
Upload files.
The WS token is required.
Uploaded files will be stored in the temporary area of the contract and will be added to the storage usage.
The files will be automatically deleted after 6 hours and will be deducted from your storage usage.
ws_token required | string Example: ws_token=00000000-0000-0000-0000-000000000000 WS token |
content-type required | string Enum: "text/plain" "multipart/form-data; boundary=Boundary" |
x-cbot-encoding | string Default: plain Enum: "plain" "base64" Encoding type of file data |
x-cbot-filename | string <= 64 characters Name of the file (including the extension) |
x-cbot-timestamp | string Last modification time of the file.(Unix timestamp with milliseconds.) |
File data string
The text will be base64 encoded string if the x-cbot-encoding request header is base64.
[OK] The file has been uploaded.
[Unauthorized] The WS token is incorrect.
[Forbidden] This WS token is not authorized to upload.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] Content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
[Locked] The storage capacity has been exceeded.
SGVsbG8sIHdvcmxkLg==
{- "code": 200,
- "ref": "temp/00000000-0000-0000-0000-000000000000"
}
Issue WS token.
This token is required for using a file upload/download API.
The access token you use must have 'Refer' permissions granted.
public_id required | string Public ID of API |
content-type required | string Value: "application/json" |
content-language required | string Enum: "ja" "en" |
access-token | string Access token |
secret-key | string Secret key |
authorization | string Value: "Bearer {Token}" OAuth access token |
scopes required | Array of strings Items Enum: "upload" "download" Specify the operation name allowed by this token in an array. |
keys required | Array of strings When downloding a file, specify a ref value of the file to be downloaded as an array. |
expire | integer [ 0 .. 86400 ] Default: 60 Specify the token expiration time (seconds). |
tries | integer [ 0 .. 1000 ] Default: 1 Specify the number of times each resource specified in keys can be accessed. |
[OK] WS token issued
[Unauthorized] The access token or secret key is incorrect.
[Forbidden] This access token is not authorized to refer to BOT.
[Payload Too Large] Payload is too large.
[Unsupported Media Type] Content-type is incorrect.
[Unprocessable Entity] Request is incorrect.
{- "scopes": [
- "download"
], - "keys": [
- "jobs/00000000-0000-0000-0000-000000000000/files/00000000-0000-0000-0000-000000000000",
- "temp/00000000-0000-0000-0000-000000000000"
], - "expire": 60,
- "tries": 1
}
{- "code": 200,
- "ws_token": "00000000-0000-0000-0000-000000000000"
}