# Actions
These are a collection of endpoints that allow you to mint new, interact with, and view your existing Canarytokens.
# List Kinds of Canarytokens
TIP
The values returned by this Canarytokens API correspond to the kind
parameter used to create
Canarytokens. As an example, if you wanted to create a Cloned Web Canarytoken, you would check the
response to this Canarytokens API and use cloned-web
to define the Canarytoken type you wish to create.
GET /api/v1/canarytokens/list
Lists the available Canarytokens on your Canary Console.
Required Parameters
Response
A JSON structure with result indicator and Canarytokens information.
Example
{
"canarytokens": {
"active-directory-login": "Active Directory Login",
"autoreg-google-docs": "Google Doc",
"autoreg-google-sheets": "Google Sheet",
"aws-id": "AWS API Key",
"aws-s3": "AWS S3 Bucket",
"cloned-web": "Cloned Website",
"dns": "DNS",
"doc-msexcel": "MS Excel Document",
"doc-msword": "MS Word Document",
"fast-redirect": "Fast Redirect",
"gmail": "Gmail",
"google-docs": "Google Doc",
"google-sheets": "Google Sheet",
"googledocs_factorydoc": "Document Factory",
"googlesheets_factorydoc": "Document Factory",
"http": "Web Bug",
"msexcel-macro": "MS Excel Macro Document",
"msword-macro": "MS Word Macro Document",
"office365mail": "Office 365 Mail Bug",
"pdf-acrobat-reader": "Acrobat PDF",
"qr-code": "QR Code",
"sensitive-cmd": "Sensitive Command",
"signed-exe": "Custom Exe/Binary",
"slack-api": "Slack API Key",
"slow-redirect": "Slow Redirect",
"web-image": "Custom Web Image",
"windows-dir": "Windows Folder",
"wireguard": "WireGuard VPN"
},
"result": "success"
}
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
# Paginate Canarytokens
GET /api/v1/canarytokens/paginate
Fetch a page of all your Canarytokens with a specified limit per page, as well as cursors that allow you to iterate through the remaining pages.
Required Parameters
Optional Parameters
Response
A JSON structure with the current page of Canarytokens and cursors pointing to your next and previous pages.
Example
{
"canarytokens": [
{
"access_key_id": "<aws_access_key_id>",
"canarytoken": "<token_code>",
"created": "1586249510.069870",
"created_printable": "2020-04-07 08:51:50 (UTC)",
"enabled": true,
"factory_auth": "<factory_auth_token>",
"flock_id": "flock:default",
"hostname": "<token_hostname>",
"key": "<token_key>",
"kind": "aws-id",
"memo": "Example Memo",
"node_id": "<node_id>",
"renders": {
"aws-id": "\n [default]\n aws_access_key_id = <aws_access_key_id>\n aws_secret_access_key = <aws_secret_access_key>"
},
"secret_access_key": "<aws_secret_access_key>",
"triggered_count": 0,
"updated_id": 17,
"url": "<token_url>",
"username": "<user_name>"
},
{
"access_key_id": "<aws_access_key_id>",
"canarytoken": "<token_code>",
"created": "1586246956.323499",
"created_printable": "2020-04-07 08:09:16 (UTC)",
"enabled": true,
"factory_auth": "<factory_auth_token>",
"flock_id": "flock:default",
"hostname": "<token_hostname>",
"key": "<token_key>",
"kind": "aws-id",
"memo": "Example Memo",
"node_id": "<node_id>",
"renders": {
"aws-id": "\n [default]\n aws_access_key_id = <aws_access_key_id>\n aws_secret_access_key = <aws_secret_access_key>"
},
"secret_access_key": "<aws_secret_access_key>",
"triggered_count": 4,
"updated_id": 14,
"url": "<token_url>",
"username": "<user_name>"
},
{
"canarytoken": "<token_code>",
"cloned_web": "<cloned_domain>",
"created": "1586183526.183108",
"created_printable": "2020-04-06 14:32:06 (UTC)",
"enabled": true,
"flock_id": "flock:default",
"hostname": "<token_hostname>",
"key": "<token_key>",
"kind": "cloned-web",
"memo": "Cloned website detector on <cloned_domain>",
"node_id": "<node_id>",
"renders": {
"cloned-web": "<script>\n if (document.domain != \"<cloned_domain>\" && document.domain != \"<cloned_domain>\") {\n var l = location.href;\n var r = document.referrer;\n var m = new Image();\n m.src = \"<token_url>\" + encodeURI(l) + \"&r=\" + encodeURI(r);\n }\n</script>"
},
"triggered_count": 0,
"updated_id": 12,
"url": "<token_url>"
}
],
"cursor": {
"next": "MToxMjozOjQ6Mjo0",
"next_link": "https://EXAMPLE.canary.tools/api/v1/canarytokens/paginate?cursor=MToxMjozOjQ6Mjo0&auth_token=EXAMPLE_AUTH_TOKEN",
"prev": null,
"prev_link": null
},
"page_num": 1,
"page_total": 4,
"result": "success"
}
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
# Create Canarytoken
POST /api/v1/canarytoken/create
Create a new Canarytoken.
Required Parameters
Optional Parameters
-F 'doc=@upload-me.docx; type=application/vnd.openxmlformats-officedocument.wordprocessingml.document'
-F pdf=@upload-me.pdf; type=application/pdf
-F 'web_image=@upload-me.png; type=image/png'
for png files -F 'web_image=@upload-me.jpg; type=image/jpeg'
for jpeg filesResponse
A JSON structure with the created Canarytoken information.
Example
{
"canarytoken": {
"browser_scanner_enabled": true,
"canarytoken": "<token_code>",
"created": "1586161315.087693",
"created_printable": "2020-04-06 08:21:55 (UTC)",
"enabled": true,
"flock_id": "flock:default",
"hostname": "<token_hostname>",
"key": "<token_key>",
"kind": "http",
"memo": "Example Memo",
"triggered_count": 0,
"updated_id": 7,
"url": "<token_url>"
},
"result": "success"
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Delete Apeeper Canarytoken Factory
POST /api/v1/apeeperfactory/delete
Delete an Apeeper Canarytoken factory.
Required Parameters
Response
A JSON structure with result indicator.
# Delete Canarytoken
POST /api/v1/canarytoken/delete
Delete a Canarytoken. You'll need to delete all incidents on a token before you can delete the token itself. If there are still incidents attached to the token, you can specify `clear_incidents=true` to delete them all.
Required Parameters
Optional Parameters
Response
A JSON structure with result indicator.
Example
{
"result": "success"
}
2
3
# Bulk Delete Canarytokens
POST /api/v1/canarytokens/delete
Bulk delete Canarytokens that match the specified criterion. You'll need to delete all incidents on the matching tokens before you can delete the tokens, otherwise no tokens will be deleted and an error returned.
Required Parameters
Response
A JSON structure with result indicator.
Example
{
"result": "success",
"deleted_count": 1
}
2
3
4
# Disable Canarytoken
POST /api/v1/canarytoken/disable
Disable a Canarytoken.
Required Parameters
Response
A JSON structure with result indicator.
Example
{
"result": "success"
}
2
3
# Download Canarytoken
GET /api/v1/canarytoken/download
Download the generated file (if one exists) for the supplied Canarytoken.
Required Parameters
Response
A file if the Canarytoken supports file generation, otherwise an error.
Example
$ ls -l
-rw-r--r-- 1 user thinkst 5095 Apr 7 12:29 <filename>
2
# Enable Canarytoken
POST /api/v1/canarytoken/enable
Enable a disabled Canarytoken.
Required Parameters
Response
A JSON structure with result indicator.
Example
{
"result": "success"
}
2
3
# Fetch a Canarytoken
GET /api/v1/canarytoken/fetch
Fetch information about a specific Canarytoken.
Required Parameters
Response
A JSON structure with the Canarytoken.
Example
{
"result": "success",
"token": {
"canarytoken": "<token_code>",
"created": "1585947523.255526",
"created_printable": "2020-04-03 20:58:43 (UTC)",
"enabled": true,
"flock_id": "flock:default",
"hostname": "<token_hostname>",
"key": "<token_key>",
"kind": "dns",
"memo": "Example Memo",
"triggered_count": 0,
"updated_id": 4,
"url": "<token_url>"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Remove AWS S3 Canarytoken
POST /api/v1/canarytoken/remove/s3
Remove an AWS S3 Canarytoken from your Amazon console.
Required Parameters
Optional Parameters
Response
A JSON structure with result indicator.
Example
{
"result": "success"
}
2
3
# Update Canarytoken Memo
POST /api/v1/canarytoken/update
Update the memo of a Canarytoken.
Required Parameters
Response
A JSON structure with result indicator.
Example
{
"result": "success",
"token": {
"canarytoken": "<token_code>",
"created": "1585947523.255526",
"created_printable": "2020-04-03 20:58:43 (UTC)",
"enabled": true,
"flock_id": "flock:default",
"hostname": "<token_hostname>",
"key": "<token_key>",
"kind": "dns",
"memo": "Updated Example Memo",
"triggered_count": 0,
"updated_id": 4,
"url": "<token_url>"
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Update Canarytoken Redirect URL
POST /api/v1/canarytoken/update/redirect_url
Update the redirect URL of a Canarytoken that supports redirects.
Required Parameters
Response
A JSON structure with result indicator.
Example
{
"result": "success",
}
2
3