One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.
Checks API calling code.
Name | Data Type | Description |
---|---|---|
error
|
string |
Error response to return |
foo
|
string |
example property to return |
Name | Data Type | Description |
---|---|---|
api.test error schema
|
object |
Schema for error response api.test method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string |
application/json
[
{
"ok": false,
"args": {
"error": "my_error"
},
"error": "my_error"
}
]
Name | Data Type | Description |
---|---|---|
api.test success schema
|
object |
Schema for successful response api.test method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Returns list of permissions this app has on a team.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
Default error template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
Default success template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"info": {
"im": {
"scopes": [],
"resources": {
"ids": []
}
},
"mpim": {
"scopes": [],
"resources": {
"ids": []
}
},
"team": {
"scopes": [],
"resources": {
"ids": []
}
},
"group": {
"scopes": [],
"resources": {
"ids": []
}
},
"channel": {
"scopes": [
"channels:read"
],
"resources": {
"ids": [
"C061FA5PB"
],
"wildcard": false,
"excluded_ids": []
}
},
"app_home": {
"scopes": [
"chat:write",
"im:history",
"im:read"
],
"resources": {
"ids": [
"D0C0NU1Q8",
"D0BH95DLH"
]
}
}
}
}
]
Allows an app to request additional scopes
Name | Data Type | Description |
---|---|---|
trigger_id
|
string |
Token used to trigger the permissions API |
token
|
string |
Authentication token. Requires scope: |
scopes
|
string |
A comma separated list of scopes to request for |
Name | Data Type | Description |
---|---|---|
apps.permissions.request error schema
|
object |
Schema for error response from apps.permissions.request method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - invalid_trigger - trigger_exchanged - invalid_scope - invalid_user - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_trigger_id"
}
]
Name | Data Type | Description |
---|---|---|
apps.permissions.request schema
|
object |
Schema for successful response from apps.permissions.request method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Returns list of resource grants this app has on a team.
Name | Data Type | Description |
---|---|---|
limit
|
integer |
The maximum number of items to return. |
token
|
string |
Authentication token. Requires scope: |
cursor
|
string |
Paginate through collections of data by setting the |
Name | Data Type | Description |
---|---|---|
apps.permissions.resources.list error schema
|
object |
Schema for error response from apps.permissions.resources.list method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - invalid_cursor - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_cursor"
}
]
Name | Data Type | Description |
---|---|---|
apps.permissions.resources.list success schema
|
object |
Schema for successful response apps.permissions.resources.list method |
response_metadata
|
||||||
resources
|
array [object] | |||||
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"resources": [
{
"id": "T0DES3UAN",
"type": "team"
},
{
"id": "D024BFF1M",
"type": "app_home"
},
{
"id": "C024BE91L",
"type": "channel"
}
],
"response_metadata": {
"next_cursor": "dGVhbTpDMUg5UkVTR0w="
}
}
]
Returns list of scopes this app has on a team.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
apps.permissions.scopes.list error schema
|
object |
Schema for error response from apps.permissions.scopes.list method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
api.permissions.scopes.list success schema
|
object |
Schema for successful response api.permissions.scopes.list method |
scopes
|
||||||
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"scopes": {
"im": [
"chat:write"
],
"mpim": [
"chat:write"
],
"team": [
"users:read"
],
"user": [],
"group": [
"chat:write"
],
"channel": [
"channels:history",
"chat:write"
],
"app_home": [
"chat:write",
"im:history",
"im:read"
]
}
}
]
Returns list of permissions this app has on a team.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
Default error template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
Default success template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"info": {
"im": {
"scopes": [],
"resources": {
"ids": []
}
},
"mpim": {
"scopes": [],
"resources": {
"ids": []
}
},
"team": {
"scopes": [],
"resources": {
"ids": []
}
},
"group": {
"scopes": [],
"resources": {
"ids": []
}
},
"channel": {
"scopes": [
"channels:read"
],
"resources": {
"ids": [
"C061FA5PB"
],
"wildcard": false,
"excluded_ids": []
}
},
"app_home": {
"scopes": [
"chat:write",
"im:history",
"im:read"
],
"resources": {
"ids": [
"D0C0NU1Q8",
"D0BH95DLH"
]
}
}
}
}
]
Allows an app to request additional scopes
Name | Data Type | Description |
---|---|---|
trigger_id
|
string |
Token used to trigger the permissions API |
token
|
string |
Authentication token. Requires scope: |
scopes
|
string |
A comma separated list of scopes to request for |
Name | Data Type | Description |
---|---|---|
apps.permissions.request error schema
|
object |
Schema for error response from apps.permissions.request method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - invalid_trigger - trigger_exchanged - invalid_scope - invalid_user - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_trigger_id"
}
]
Name | Data Type | Description |
---|---|---|
apps.permissions.request schema
|
object |
Schema for successful response from apps.permissions.request method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Returns list of resource grants this app has on a team.
Name | Data Type | Description |
---|---|---|
limit
|
integer |
The maximum number of items to return. |
token
|
string |
Authentication token. Requires scope: |
cursor
|
string |
Paginate through collections of data by setting the |
Name | Data Type | Description |
---|---|---|
apps.permissions.resources.list error schema
|
object |
Schema for error response from apps.permissions.resources.list method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - invalid_cursor - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_cursor"
}
]
Name | Data Type | Description |
---|---|---|
apps.permissions.resources.list success schema
|
object |
Schema for successful response apps.permissions.resources.list method |
response_metadata
|
||||||
resources
|
array [object] | |||||
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"resources": [
{
"id": "T0DES3UAN",
"type": "team"
},
{
"id": "D024BFF1M",
"type": "app_home"
},
{
"id": "C024BE91L",
"type": "channel"
}
],
"response_metadata": {
"next_cursor": "dGVhbTpDMUg5UkVTR0w="
}
}
]
Returns list of scopes this app has on a team.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
apps.permissions.scopes.list error schema
|
object |
Schema for error response from apps.permissions.scopes.list method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
api.permissions.scopes.list success schema
|
object |
Schema for successful response api.permissions.scopes.list method |
scopes
|
||||||
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"scopes": {
"im": [
"chat:write"
],
"mpim": [
"chat:write"
],
"team": [
"users:read"
],
"user": [],
"group": [
"chat:write"
],
"channel": [
"channels:history",
"chat:write"
],
"app_home": [
"chat:write",
"im:history",
"im:read"
]
}
}
]
Revokes a token.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
test
|
boolean |
Setting this parameter to |
Name | Data Type | Description |
---|---|---|
auth.revoke error schema
|
object |
Schema for error response from auth.revoke method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
auth.revoke schema
|
object |
Schema for successful response from auth.revoke method |
revoked
|
boolean | |||||
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"revoked": true
}
]
Checks authentication & identity.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
auth.test error schema
|
object |
Schema for error response auth.test method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - not_authed - invalid_auth - token_revoked - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
auth.test success schema
|
object |
Schema for successful response auth.test method |
user_id
|
defs_user_id | |||||
|
||||||
user
|
string | |||||
url
|
string | |||||
team_id
|
defs_team | |||||
|
||||||
team
|
string | |||||
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"url": "https:\/\/subarachnoid.slack.com\/",
"team": "Subarachnoid Workspace",
"user": "grace",
"team_id": "T12345678",
"user_id": "W12345678"
}
]
Gets information about a bot user.
Name | Data Type | Description |
---|---|---|
bot
|
string |
Bot user to get info on |
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
bots.info error schema
|
object |
Schema for error response from bots.info method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - bot_not_found - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "bot_not_found"
}
]
Name | Data Type | Description |
---|---|---|
bots.info schema
|
object |
Schema for successful response from bots.info method |
ok
|
defs_ok_true | |||||
|
||||||
bot
|
application/json
[
{
"ok": true,
"bot": {
"id": "B061F7JQ1",
"name": "commandeer",
"icons": {
"image_36": "https:\/\/...",
"image_48": "https:\/\/...",
"image_72": "https:\/\/..."
},
"app_id": "A061BLERW",
"deleted": false,
"updated": 1449272004
}
}
]
Archives a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to archive |
Name | Data Type | Description |
---|---|---|
channels.archive error schema
|
object |
Schema for error response channels.archive method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - already_archived - cant_archive_general - restricted_action - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - user_is_ultra_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
channels.archive success schema
|
object |
Schema for successful response from channels.archive method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Creates a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
name
|
string |
Name of channel to create |
validate
|
boolean |
Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. |
Name | Data Type | Description |
---|---|---|
channels.create error schema
|
object |
Schema for error response channels.create method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - name_taken - restricted_action - no_channel - invalid_name_required - invalid_name_punctuation - invalid_name_maxlength - invalid_name_specials - invalid_name - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - user_is_ultra_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "invalid_name_specials",
"detail": "Value passed for `name` contained unallowed special characters."
}
]
Name | Data Type | Description |
---|---|---|
channels.create error schema
|
object |
Schema for successful response channels.create method |
ok
|
defs_ok_true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel
|
objs_channel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
application/json
[
{
"ok": true,
"channel": {
"id": "C0DEL09A5",
"name": "endeavor",
"topic": {
"value": "",
"creator": "",
"last_set": 0
},
"created": 1502833204,
"creator": "U061F7AUR",
"is_mpim": false,
"members": [
"U061F7AUR"
],
"purpose": {
"value": "",
"creator": "",
"last_set": 0
},
"is_member": true,
"is_shared": false,
"last_read": 0,
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"unread_count": 0,
"is_org_shared": false,
"previous_names": [],
"name_normalized": "endeavor",
"unread_count_display": 0
}
}
]
Fetches history of messages and events from a channel.
Name | Data Type | Description |
---|---|---|
latest
|
double |
End of time range of messages to include in results. |
channel
|
string |
Channel to fetch history for. |
oldest
|
double |
Start of time range of messages to include in results. |
token
|
string |
Authentication token. Requires scope: |
inclusive
|
boolean |
Include messages with latest or oldest timestamp in results. |
unreads
|
boolean |
Include |
count
|
integer |
Number of messages to return, between 1 and 1000. |
Name | Data Type | Description |
---|---|---|
channels.history error schema
|
object |
Schema for error response channels.history method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - invalid_ts_latest - invalid_ts_oldest - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
channels.history success schema
|
object |
Schema for successful response channels.history method |
ok
|
defs_ok_true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
messages
|
array [objs_message] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
has_more
|
boolean |
application/json
[
{
"ok": true,
"latest": "1358547726.000003",
"has_more": false,
"messages": [
{
"ts": "1358546515.000008",
"text": "Hello",
"type": "message",
"user": "U2147483896"
},
{
"ts": "1358546515.000007",
"text": "World",
"type": "message",
"user": "U2147483896",
"reactions": [
{
"name": "space_invader",
"count": 3,
"users": [
"U1",
"U2",
"U3"
]
},
{
"name": "sweet_potato",
"count": 5,
"users": [
"U1",
"U2",
"U3",
"U4",
"U5"
]
}
],
"is_starred": true
},
{
"ts": "1358546515.000007",
"type": "something_else"
},
{
"ts": "1503435956.000247",
"text": "Containment unit is 98% full",
"type": "message",
"bot_id": "B19LU7CSY",
"subtype": "bot_message",
"username": "ecto1138",
"attachments": [
{
"id": 1,
"text": "Don't get too attached",
"fallback": "This is an attachment fallback"
}
]
}
]
}
]
Gets information about a channel.
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to get info on |
include_locale
|
boolean |
Set this to |
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channels.info error schema
|
object |
Schema for error response channels.info method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
channels.info success schema
|
object |
Schema for successful response channels.info method |
ok
|
defs_ok_true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel
|
objs_channel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
application/json
[
{
"ok": true,
"channel": {
"id": "C1H9RESGL",
"name": "busting",
"topic": {
"value": "Spiritual containment strategies",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"latest": {
"ts": "1503435956.000247",
"text": "Containment unit is 98% full",
"type": "message",
"bot_id": "B19LU7CSY",
"subtype": "bot_message",
"username": "ecto1138",
"attachments": [
{
"id": 1,
"text": "Don't get too attached",
"fallback": "This is an attachment fallback"
}
]
},
"created": 1466025154,
"creator": "U0G9QF9C6",
"is_mpim": false,
"members": [
"U0G9QF9C6",
"U1QNSQB9U"
],
"purpose": {
"value": "Discuss busting ghosts",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"is_member": true,
"is_shared": false,
"last_read": "1503435939.000101",
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"unread_count": 1,
"is_org_shared": false,
"previous_names": [
"dusting"
],
"name_normalized": "busting",
"unread_count_display": 1
}
}
]
Invites a user to a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to invite user to. |
user
|
string |
User to invite to channel. |
Name | Data Type | Description |
---|---|---|
channels.invite error schema
|
object |
Schema for error response channels.invite method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - user_not_found - cant_invite_self - not_in_channel - already_in_channel - is_archived - cant_invite - too_many_users - ura_max_channels - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - user_is_ultra_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "cant_invite"
}
]
Name | Data Type | Description |
---|---|---|
channels.invite error schema
|
object |
Schema for successful response channels.invite method |
ok
|
defs_ok_true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel
|
objs_channel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
application/json
[
{
"ok": true,
"channel": {
"id": "C1H9RESGL",
"name": "busting",
"topic": {
"value": "My Topic",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"latest": {
"ts": "1503435963.000307",
"text": "<@U1QNSQB9U|protobot> has left the channel",
"type": "message",
"user": "U1QNSQB9U",
"subtype": "channel_leave"
},
"created": 1466025154,
"creator": "U0G9QF9C6",
"is_mpim": false,
"members": [
"U0G9QF9C6",
"U1QNSQB9U"
],
"purpose": {
"value": "My Purpose",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"is_member": true,
"is_shared": false,
"last_read": "1503435963.000307",
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"unread_count": 0,
"is_org_shared": false,
"previous_names": [],
"name_normalized": "busting",
"unread_count_display": 0
}
}
]
Joins a channel, creating it if needed.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
name
|
string |
Name of channel to join |
validate
|
boolean |
Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. |
Name | Data Type | Description |
---|---|---|
channels.join error schema
|
object |
Schema for error response from channels.join method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - name_taken - restricted_action - no_channel - is_archived - invalid_name_required - invalid_name_punctuation - invalid_name_maxlength - invalid_name_specials - invalid_name - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - user_is_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
channels.join schema
|
object |
Schema for successful response from channels.join method |
ok
|
defs_ok_true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel
|
objs_channel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
already_in_channel
|
boolean |
application/json
[
{
"ok": true,
"channel": {
"id": "C1H9RESGL",
"name": "busting",
"topic": {
"value": "My Topic",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"created": 1466025154,
"creator": "U0G9QF9C6",
"is_mpim": false,
"members": [
"U0G9QF9C6",
"U1QNSQB9U"
],
"purpose": {
"value": "My Purpose",
"creator": "U0G9QF9C6",
"last_set": 1503435128
},
"is_member": true,
"is_shared": false,
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"is_org_shared": false,
"previous_names": [],
"name_normalized": "busting"
},
"already_in_channel": true
}
]
Removes a user from a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to remove user from. |
user
|
string |
User to remove from channel. |
Name | Data Type | Description |
---|---|---|
channels.kick error schema
|
object |
Schema for error response from channels.kick method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - user_not_found - cant_kick_self - not_in_channel - cant_kick_from_general - restricted_action - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - user_is_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "not_in_channel"
}
]
Name | Data Type | Description |
---|---|---|
channels.kick schema
|
object |
Schema for successful response from channels.kick method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Leaves a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to leave |
Name | Data Type | Description |
---|---|---|
Default error template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
Default success template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Lists all channels in a Slack team.
Name | Data Type | Description |
---|---|---|
exclude_archived
|
boolean |
Exclude archived channels from the list |
limit
|
integer |
The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. |
token
|
string |
Authentication token. Requires scope: |
cursor
|
string |
Paginate through collections of data by setting the |
exclude_members
|
boolean |
Exclude the |
Name | Data Type | Description |
---|---|---|
channels.list error schema
|
object |
Schema for error response channels.list method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
channels.list success schema
|
object |
Schema for successful response channels.list method |
ok
|
defs_ok_true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channels
|
array [objs_channel] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
application/json
[
{
"ok": true,
"channels": [
{
"id": "C0G9QF9GW",
"name": "random",
"topic": {
"value": "Other stuff",
"creator": "U0G9QF9C6",
"last_set": 1449709352
},
"created": 1449709280,
"creator": "U0G9QF9C6",
"is_mpim": false,
"members": [
"U0G9QF9C6",
"U0G9WFXNZ"
],
"purpose": {
"value": "A place for non-work-related flimflam, faffing, hodge-podge or jibber-jabber you'd prefer to keep out of more focused work-related channels.",
"creator": "",
"last_set": 0
},
"is_member": true,
"is_shared": false,
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"num_members": 2,
"is_org_shared": false,
"previous_names": [],
"name_normalized": "random"
},
{
"id": "C0G9QKBBL",
"name": "general",
"topic": {
"value": "Talk about anything!",
"creator": "U0G9QF9C6",
"last_set": 1449709364
},
"created": 1449709280,
"creator": "U0G9QF9C6",
"is_mpim": false,
"members": [
"U0G9QF9C6",
"U0G9WFXNZ"
],
"purpose": {
"value": "To talk about anything!",
"creator": "U0G9QF9C6",
"last_set": 1449709334
},
"is_member": true,
"is_shared": false,
"is_channel": true,
"is_general": true,
"is_private": false,
"is_archived": false,
"num_members": 2,
"is_org_shared": false,
"previous_names": [],
"name_normalized": "general"
}
],
"response_metadata": {
"next_cursor": "dGVhbTpDMUg5UkVTR0w="
}
}
]
Sets the read cursor in a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to set reading cursor in. |
ts
|
double |
Timestamp of the most recently seen message. |
Name | Data Type | Description |
---|---|---|
channels.mark error schema
|
object |
Schema for error response channels.mark method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - invalid_timestamp - not_in_channel - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
channels.mark success schema
|
object |
Schema for successful response channels.mark method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Renames a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to rename |
name
|
string |
New name for channel. |
validate
|
boolean |
Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. |
Name | Data Type | Description |
---|---|---|
channels.rename error schema
|
object |
Schema for error response from channels.rename method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - not_in_channel - not_authorized - invalid_name - name_taken - invalid_name_required - invalid_name_punctuation - invalid_name_maxlength - invalid_name_specials - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - user_is_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
channels.rename schema
|
object |
Schema for successful response from channels.rename method |
ok
|
defs_ok_true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel
|
objs_channel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
application/json
[
{
"ok": true,
"channel": {
"id": "C2U875RJN",
"name": "humans-and-bots",
"topic": {
"value": "here be robots",
"creator": "U2U85N1RZ",
"last_set": 1509475775
},
"created": 1477445146,
"creator": "U2U85N1RZ",
"is_mpim": false,
"members": [],
"purpose": {
"value": "the purpose of this channel is to bring people and robots together in harmony",
"creator": "U2U85N1RZ",
"last_set": 1509475801
},
"unlinked": 0,
"is_member": false,
"is_shared": false,
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"is_org_shared": false,
"previous_names": [
"humans"
],
"name_normalized": "humans-and-bots"
}
}
]
Retrieve a thread of messages posted to a channel
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to fetch thread from |
token
|
string |
Authentication token. Requires scope: |
thread_ts
|
double |
Unique identifier of a thread's parent message |
Name | Data Type | Description |
---|---|---|
Default error template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": false,
"error": "thread_not_found"
}
]
Name | Data Type | Description |
---|---|---|
Default success template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"has_more": false,
"messages": [
{
"ts": "1485913694.000025",
"text": "This is a channel message",
"type": "message",
"user": "U2X9P5FEL",
"replies": [
{
"ts": "1509484424.000601",
"user": "U2U85N1RZ"
},
{
"ts": "1509484885.000082",
"user": "U2U85N1RZ"
}
],
"last_read": "1509484885.000082",
"thread_ts": "1485913694.000025",
"subscribed": true,
"reply_count": 2,
"unread_count": 0
},
{
"ts": "1509484424.000601",
"text": "This is a thread reply",
"type": "message",
"user": "U2U85N1RZ",
"thread_ts": "1485913694.000025",
"parent_user_id": "U2X9P5FEL"
},
{
"ts": "1509484885.000082",
"text": "This is another thread reply",
"type": "message",
"user": "U2U85N1RZ",
"thread_ts": "1485913694.000025",
"parent_user_id": "U2X9P5FEL"
}
]
}
]
Sets the purpose for a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to set the purpose of |
purpose
|
string |
The new purpose |
Name | Data Type | Description |
---|---|---|
channels.setPurpose error schema
|
object |
Schema for error response from channels.setPurpose method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - not_in_channel - is_archived - too_long - user_is_restricted - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
channels.setPurpose schema
|
object |
Schema for successful response from channels.setPurpose method |
purpose
|
string | |||||
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"purpose": "My special purpose"
}
]
Sets the topic for a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to set the topic of |
topic
|
string |
The new topic |
Name | Data Type | Description |
---|---|---|
Default error template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
Default success template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"topic": "To picture topicality"
}
]
Unarchives a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to unarchive |
Name | Data Type | Description |
---|---|---|
Default error template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
Default success template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Deletes a message.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel containing the message to be deleted. |
ts
|
double |
Timestamp of the message to be deleted. |
as_user
|
boolean |
Pass true to delete the message as the authed user with |
Name | Data Type | Description |
---|---|---|
chat.delete error schema
|
object |
Schema for error response from chat.delete method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - message_not_found - channel_not_found - cant_delete_message - compliance_exports_prevent_deletion - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "message_not_found"
}
]
Name | Data Type | Description |
---|---|---|
chat.delete success schema
|
object |
Schema for successful response of chat.delete method |
ts
|
defs_ts | |||||
|
||||||
ok
|
defs_ok_true | |||||
|
||||||
channel
|
defs_channel | |||||
|
application/json
[
{
"ok": true,
"ts": "1401383885.000061",
"channel": "C024BE91L"
}
]
Retrieve a permalink URL for a specific extant message
Name | Data Type | Description |
---|---|---|
channel
|
string |
The ID of the conversation or channel containing the message |
message_ts
|
double |
A message's |
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
chat.getPermalink error schema
|
object |
Schema for error response from chat.getPermalink method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - message_not_found - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
chat.getPermalink success schema
|
object |
Schema for successful response chat.getPermalink |
permalink
|
uri | |||||
ok
|
defs_ok_true | |||||
|
||||||
channel
|
defs_channel | |||||
|
application/json
[
{
"ok": true,
"channel": "C1H9RESGA",
"permalink": "https:\/\/ghostbusters.slack.com\/archives\/C1H9RESGA\/p135854651500008"
}
]
Share a me message into a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. |
text
|
string |
Text of the message to send. |
Name | Data Type | Description |
---|---|---|
Default error template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
Default success template
|
object |
Verbose schema not yet ready for this method. |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true,
"ts": "1417671948.000006",
"channel": "C024BE7LR"
}
]
Sends an ephemeral message to a user in a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. |
as_user
|
boolean |
Pass true to post the message as the authed bot. Defaults to false. |
user
|
string |
|
parse
|
string |
Change how messages are treated. Defaults to |
link_names
|
boolean |
Find and link channel names and usernames. |
text
|
string |
Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only |
attachments
|
string |
A JSON-based array of structured attachments, presented as a URL-encoded string. |
Name | Data Type | Description |
---|---|---|
chat.postEphemeral error schema
|
object |
Schema for error response from chat.postEphemeral method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - is_archived - msg_too_long - no_text - restricted_action - too_many_attachments - user_not_in_channel - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "user_not_in_channel"
}
]
Name | Data Type | Description |
---|---|---|
chat.postEphemeral success schema
|
object |
Schema for successful response from chat.postEphemeral method |
ok
|
defs_ok_true | |||||
|
||||||
message_ts
|
defs_ts | |||||
|
application/json
[
{
"ok": true,
"message_ts": "1502210682.580145"
}
]
Sends a message to a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
reply_broadcast
|
boolean |
Used in conjunction with |
channel
|
string |
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. |
icon_url
|
string |
URL to an image to use as the icon for this message. Must be used in conjunction with |
link_names
|
boolean |
Find and link channel names and usernames. |
icon_emoji
|
string |
Emoji to use as the icon for this message. Overrides |
mrkdwn
|
boolean |
Disable Slack markup parsing by setting to |
as_user
|
boolean |
Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. |
parse
|
string |
Change how messages are treated. Defaults to |
unfurl_media
|
boolean |
Pass false to disable unfurling of media content. |
text
|
string |
Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only |
unfurl_links
|
boolean |
Pass true to enable unfurling of primarily text-based content. |
attachments
|
string |
A JSON-based array of structured attachments, presented as a URL-encoded string. |
thread_ts
|
double |
Provide another message's |
username
|
string |
Set your bot's user name. Must be used in conjunction with |
Name | Data Type | Description |
---|---|---|
chat.postMessage error schema
|
object |
Schema for error response chat.postMessage method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - not_in_channel - is_archived - msg_too_long - no_text - too_many_attachments - rate_limited - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type |
application/json
[
{
"ok": false,
"error": "too_many_attachments"
}
]
Name | Data Type | Description |
---|---|---|
chat.postMessage success schema
|
object |
Schema for successful response of chat.postMessage method |
ts
|
defs_ts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ok
|
defs_ok_true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
message
|
objs_message | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
channel
|
defs_channel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
application/json
[
{
"ok": true,
"ts": "1503435956.000247",
"channel": "C1H9RESGL",
"message": {
"ts": "1503435956.000247",
"text": "Here's a message for you",
"type": "message",
"bot_id": "B19LU7CSY",
"subtype": "bot_message",
"username": "ecto1",
"attachments": [
{
"id": 1,
"text": "This is an attachment",
"fallback": "This is an attachment's fallback"
}
]
}
}
]
Provide custom unfurl behavior for user-posted URLs
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel ID of the message |
user_auth_url
|
string |
Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded. |
ts
|
string |
Timestamp of the message to add unfurl behavior to. |
unfurls
|
string |
URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl message attachments. |
user_auth_required
|
boolean |
Set to |
user_auth_message
|
string |
Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior |
Name | Data Type | Description |
---|---|---|
chat.unfurl error schema
|
object |
Schema for error response from chat.unfurl method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - cannot_unfurl_url - cannot_find_service - missing_unfurls - cannot_prompt - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - org_login_required - user_is_bot - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "cannot_unfurl_url"
}
]
Name | Data Type | Description |
---|---|---|
chat.unfurl success schema
|
object |
Schema for successful response from chat.unfurl method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Updates a message.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Channel containing the message to be updated. |
link_names
|
boolean |
Find and link channel names and usernames. Defaults to |
as_user
|
boolean |
Pass true to update the message as the authed user. Bot users in this context are considered authed users. |
parse
|
string |
Change how messages are treated. Defaults to |
ts
|
double |
Timestamp of the message to be updated. |
text
|
string |
New text for the message, using the default formatting rules. It's not required when presenting |
attachments
|
string |
A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting |
Name | Data Type | Description |
---|---|---|
chat.update error schema
|
object |
Schema for error response chat.update method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - message_not_found - cant_update_message - channel_not_found - edit_window_closed - msg_too_long - too_many_attachments - rate_limited - no_text - not_authed - invalid_auth - account_inactive - token_revoked - no_permission - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - request_timeout - invalid_json - json_not_object - upgrade_required - fatal_error |
application/json
[
{
"ok": false,
"error": "cant_update_message"
}
]
Name | Data Type | Description |
---|---|---|
chat.update success schema
|
object |
Schema for successful response of chat.update method |
ts
|
defs_ts | |||||
|
||||||
Updated message text
|
string | |||||
ok
|
defs_ok_true | |||||
|
||||||
channel
|
defs_channel | |||||
|
application/json
[
{
"ok": true,
"ts": "1401383885.000061",
"text": "Updated text you carefully authored",
"channel": "C024BE91L"
}
]
Archives a conversation.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
ID of conversation to archive |
Name | Data Type | Description |
---|---|---|
conversations.archive error schema
|
object |
Schema for error response from conversations.archive method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - method_not_supported_for_channel_type - missing_scope - not_supported - channel_not_found - already_archived - cant_archive_general - restricted_action - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - user_is_ultra_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
conversations.archive success schema
|
object |
Schema for successful response conversations.archive method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Closes a direct message or multi-person direct message.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Conversation to close. |
Name | Data Type | Description |
---|---|---|
conversations.close error schema
|
object |
Schema for error response from conversations.close method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - method_not_supported_for_channel_type - channel_not_found - user_does_not_own_channel - missing_scope - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
conversations.close success schema
|
object |
Schema for successful response conversations.close method |
ok
|
defs_ok_true | |||||
|
||||||
no_op
|
boolean | |||||
already_closed
|
boolean |
application/json
[
{
"ok": true
}
]
Initiates a public or private channel-based conversation
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
is_private
|
boolean |
Create a private channel instead of a public one |
name
|
string |
Name of the public or private channel to create |
Name | Data Type | Description |
---|---|---|
conversations.create error schema
|
object |
Schema for error response from conversations.create method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - method_not_supported_for_channel_type - missing_scope - name_taken - restricted_action - no_channel - invalid_name_required - invalid_name_punctuation - invalid_name_maxlength - invalid_name_specials - invalid_name - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required |
|||||
detail
|
string |
application/json
[
{
"ok": false,
"error": "name_taken"
}
]
Name | Data Type | Description |
---|---|---|
conversations.create success schema
|
object |
Schema for successful response conversations.create method |
ok
|
defs_ok_true | |||||
|
||||||
channel
|
objs_conversation | |||||
|
application/json
[
{
"ok": true,
"channel": {
"id": "C0EAQDV4Z",
"name": "endeavor",
"is_im": false,
"topic": {
"value": "",
"creator": "",
"last_set": 0
},
"created": 1504554479,
"creator": "U0123456",
"is_mpim": false,
"purpose": {
"value": "",
"creator": "",
"last_set": 0
},
"is_group": false,
"priority": 0,
"unlinked": 0,
"is_member": true,
"is_shared": false,
"last_read": 0,
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"unread_count": 0,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"previous_names": [],
"name_normalized": "endeavor",
"unread_count_display": 0,
"is_pending_ext_shared": false
}
}
]
Fetches a conversation's history of messages and events.
Name | Data Type | Description |
---|---|---|
latest
|
double |
End of time range of messages to include in results. |
channel
|
string |
Conversation ID to fetch history for. |
oldest
|
double |
Start of time range of messages to include in results. |
limit
|
integer |
The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. |
token
|
string |
Authentication token. Requires scope: |
cursor
|
string |
Paginate through collections of data by setting the |
inclusive
|
boolean |
Include messages with latest or oldest timestamp in results only when either timestamp is specified. |
Name | Data Type | Description |
---|---|---|
conversations.history error schema
|
object |
Schema for error response from conversations.history method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - missing_scope - channel_not_found - invalid_ts_latest - invalid_ts_oldest - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
conversations.history success schema
|
object |
Schema for successful response from conversations.history method |
pin_count
|
integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ok
|
defs_ok_true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
messages
|
array [objs_message] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
has_more
|
boolean |
application/json
[
{
"ok": true,
"has_more": true,
"messages": [
{
"ts": "1512085950.000216",
"text": "I find you punny and would like to smell your nose letter",
"type": "message",
"user": "U012AB3CDE"
},
{
"ts": "1512104434.000490",
"text": "What, you want to smell my shoes better?",
"type": "message",
"user": "U061F7AUR"
}
],
"pin_count": 0,
"response_metadata": {
"next_cursor": "bmV4dF90czoxNTEyMDg1ODYxMDAwNTQz"
}
}
]
Retrieve information about a conversation.
Name | Data Type | Description |
---|---|---|
include_locale
|
boolean |
Set this to |
channel
|
string |
Conversation ID to learn more about |
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
conversations.info error schema
|
object |
Schema for error response from conversations.info method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - missing_scope - channel_not_found - team_added_to_org - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
conversations.info success schema
|
object |
Schema for successful response conversations.info |
ok
|
defs_ok_true | |||||
|
||||||
channel
|
objs_conversation | |||||
|
application/json
[
{
"ok": true,
"channel": {
"id": "C012AB3CD",
"name": "general",
"is_im": false,
"topic": {
"value": "For public discussion of generalities",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"locale": "en-US",
"created": 1449252889,
"creator": "W012A3BCD",
"is_mpim": false,
"purpose": {
"value": "This part of the workspace is for fun. Make fun here.",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"is_group": false,
"unlinked": 0,
"is_member": true,
"is_shared": false,
"last_read": "1502126650.228446",
"is_channel": true,
"is_general": true,
"is_private": false,
"is_archived": false,
"num_members": 23,
"is_read_only": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"previous_names": [
"specifics",
"abstractions",
"etc"
],
"name_normalized": "general",
"is_pending_ext_shared": false
}
}
]
Invites users to a channel.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
The ID of the public or private channel to invite user(s) to. |
users
|
string |
A comma separated list of user IDs. Up to 30 users may be listed. |
Name | Data Type | Description |
---|---|---|
conversations.invite error schema
|
object |
Schema for error response from conversations.invite method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
errors is returned when an error associates an user
|
array [object] Unique Items: true Minimum: 1 |
|||||
error
|
string Allowed values: - method_not_supported_for_channel_type - missing_scope - channel_not_found - user_not_found - cant_invite_self - not_in_channel - already_in_channel - is_archived - cant_invite - too_many_users - ura_max_channels - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - user_is_ultra_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "method_not_supported_for_channel_type"
}
]
Name | Data Type | Description |
---|---|---|
conversations.invite error schema
|
object |
Schema for successful response from conversations.invite method |
ok
|
defs_ok_true | |||||
|
||||||
channel
|
objs_conversation | |||||
|
application/json
[
{
"ok": true,
"channel": {
"id": "C012AB3CD",
"name": "general",
"is_im": false,
"topic": {
"value": "For public discussion of generalities",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"locale": "en-US",
"created": 1449252889,
"creator": "W012A3BCD",
"is_mpim": false,
"purpose": {
"value": "This part of the workspace is for fun. Make fun here.",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"is_group": false,
"unlinked": 0,
"is_member": true,
"is_shared": false,
"last_read": "1502126650.228446",
"is_channel": true,
"is_general": true,
"is_private": false,
"is_archived": false,
"num_members": 23,
"is_read_only": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"previous_names": [
"specifics",
"abstractions",
"etc"
],
"name_normalized": "general",
"is_pending_ext_shared": false
}
}
]
Joins an existing conversation.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
ID of conversation to join |
Name | Data Type | Description |
---|---|---|
conversations.join error schema
|
object |
Schema for error response from conversations.join method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - method_not_supported_for_channel_type - missing_scope - channel_not_found - is_archived - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - user_is_ultra_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "is_archived"
}
]
Name | Data Type | Description |
---|---|---|
conversations.join success schema
|
object |
Schema for successful response from conversations.join method |
warning
|
string | |||||
response_metadata
|
||||||
ok
|
defs_ok_true | |||||
|
||||||
channel
|
objs_conversation | |||||
|
application/json
[
{
"ok": true,
"channel": {
"id": "C061EG9SL",
"name": "general",
"is_im": false,
"topic": {
"value": "Which widget do you worry about?",
"creator": "",
"last_set": 0
},
"created": 1449252889,
"creator": "U061F7AUR",
"is_mpim": false,
"purpose": {
"value": "For widget discussion",
"creator": "",
"last_set": 0
},
"is_group": false,
"unlinked": 0,
"is_member": true,
"is_shared": false,
"is_channel": true,
"is_general": true,
"is_private": false,
"is_archived": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"previous_names": [],
"name_normalized": "general",
"is_pending_ext_shared": false
},
"warning": "already_in_channel",
"response_metadata": {
"warnings": [
"already_in_channel"
]
}
}
]
Removes a user from a conversation.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
ID of conversation to remove user from. |
user
|
string |
User ID to be removed. |
Name | Data Type | Description |
---|---|---|
conversations.kick error schema
|
object |
Schema for error response conversations.kick method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - method_not_supported_for_channel_type - missing_scope - channel_not_found - user_not_found - cant_kick_self - not_in_channel - cant_kick_from_general - restricted_action - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "cant_kick_self"
}
]
Name | Data Type | Description |
---|---|---|
conversations.kick success schema
|
object |
Schema for successful response conversations.kick method |
ok
|
defs_ok_true | |||||
|
application/json
[
{
"ok": true
}
]
Leaves a conversation.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Conversation to leave |
Name | Data Type | Description |
---|---|---|
conversations.leave error schema
|
object |
Schema for error response from conversations.leave method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - method_not_supported_for_channel_type - last_member - missing_scope - channel_not_found - is_archived - cant_leave_general - not_authed - invalid_auth - account_inactive - user_is_bot - user_is_restricted - user_is_ultra_restricted - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required - team_added_to_org - missing_charset - superfluous_charset |
application/json
[
{
"ok": false,
"error": "cant_leave_general"
}
]
Name | Data Type | Description |
---|---|---|
conversations.leave success schema
|
object |
Schema for successful response from conversations.leave method |
ok
|
defs_ok_true | |||||
|
||||||
not_in_channel
|
boolean Allowed values: - 1 |
application/json
[
{
"ok": true
}
]
Lists all channels in a Slack team.
Name | Data Type | Description |
---|---|---|
types
|
string |
Mix and match channel types by providing a comma-separated list of any combination of |
exclude_archived
|
boolean |
Set to |
limit
|
integer |
The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000. |
token
|
string |
Authentication token. Requires scope: |
cursor
|
string |
Paginate through collections of data by setting the |
Name | Data Type | Description |
---|---|---|
conversations.list error schema
|
object |
Schema for error response from conversations.list method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - missing_scope - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "invalid_auth"
}
]
Name | Data Type | Description |
---|---|---|
conversations.list success schema
|
object |
Schema for successful response from conversations.list method |
response_metadata
|
||||||
ok
|
defs_ok_true | |||||
|
||||||
channels
|
array [objs_conversation] | |||||
|
application/json
[
{
"ok": true,
"channels": [
{
"id": "C012AB3CD",
"name": "general",
"is_im": false,
"topic": {
"value": "Company-wide announcements and work-based matters",
"creator": "",
"last_set": 0
},
"created": 1449252889,
"creator": "U012A3CDE",
"is_mpim": false,
"purpose": {
"value": "This channel is for team-wide communication and announcements. All team members are in this channel.",
"creator": "",
"last_set": 0
},
"is_group": false,
"unlinked": 0,
"is_member": true,
"is_shared": false,
"is_channel": true,
"is_general": true,
"is_private": false,
"is_archived": false,
"num_members": 4,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"previous_names": [],
"name_normalized": "general",
"is_pending_ext_shared": false
},
{
"id": "C061EG9T2",
"name": "random",
"is_im": false,
"topic": {
"value": "Non-work banter and water cooler conversation",
"creator": "",
"last_set": 0
},
"created": 1449252889,
"creator": "U061F7AUR",
"is_mpim": false,
"purpose": {
"value": "A place for non-work-related flimflam, faffing, hodge-podge or jibber-jabber you'd prefer to keep out of more focused work-related channels.",
"creator": "",
"last_set": 0
},
"is_group": false,
"unlinked": 0,
"is_member": true,
"is_shared": false,
"is_channel": true,
"is_general": false,
"is_private": false,
"is_archived": false,
"num_members": 4,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"previous_names": [],
"name_normalized": "random",
"is_pending_ext_shared": false
}
],
"response_metadata": {
"next_cursor": "dGVhbTpDMDYxRkE1UEI="
}
}
]
Retrieve members of a conversation.
Name | Data Type | Description |
---|---|---|
channel
|
string |
ID of the conversation to retrieve members for |
limit
|
integer |
The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. |
token
|
string |
Authentication token. Requires scope: |
cursor
|
string |
Paginate through collections of data by setting the |
Name | Data Type | Description |
---|---|---|
conversations.members error schema
|
object |
Schema for error response conversations.members method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - channel_not_found - invalid_limit - invalid_cursor - fetch_members_failed - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "invalid_cursor"
}
]
Name | Data Type | Description |
---|---|---|
conversations.members success schema
|
object |
Schema for successful response conversations.members method |
response_metadata
|
||||||
ok
|
defs_ok_true | |||||
|
||||||
members
|
array [defs_user_id] Pattern: ^[UW][A-Z0-9]{8}$
|
|||||
|
application/json
[
{
"ok": true,
"members": [
"U023BECGF",
"U061F7AUR",
"W012A3CDE"
],
"response_metadata": {
"next_cursor": "e3VzZXJfaWQ6IFcxMjM0NTY3fQ=="
}
}
]
Opens or resumes a direct message or multi-person direct message.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
Resume a conversation by supplying an |
users
|
string |
Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a |
return_im
|
boolean |
Boolean, indicates you want the full IM channel definition in the response. |
Name | Data Type | Description |
---|---|---|
conversations.open error schema
|
object |
Schema for error response from conversations.open method |
ok
|
defs_ok_false | |||||
|
||||||
error
|
string Allowed values: - method_not_supported_for_channel_type - user_not_found - user_not_visible - user_disabled - users_list_not_supplied - not_enough_users - too_many_users - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required - channel_not_found |
application/json
[
{
"ok": false,
"error": "channel_not_found"
}
]
Name | Data Type | Description |
---|---|---|
conversations.open success schema
|
object |
Schema for successful response from conversations.open method when opening channels, ims, mpims |
ok
|
defs_ok_true | |||||
|
||||||
no_op
|
boolean | |||||
channel
|
objs_conversation | |||||
|
||||||
already_open
|
boolean |
application/json
[
{
"ok": true,
"channel": {
"id": "D069C7QFK"
}
}
]
Renames a conversation.
Name | Data Type | Description |
---|---|---|
token
|
string |
Authentication token. Requires scope: |
Name | Data Type | Description |
---|---|---|
channel
|
string |
ID of conversation to rename |
name
|
string |
New name for conversation. |
Name | Data Type | Description |
---|---|---|
conversations.rename error schema
|
object |
Schema for error response from conversations.rename method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - user_is_restricted - method_not_supported_for_channel_type - missing_scope - channel_not_found - not_in_channel - not_authorized - invalid_name - name_taken - invalid_name_required - invalid_name_punctuation - invalid_name_maxlength - invalid_name_specials - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "not_in_channel"
}
]
Name | Data Type | Description |
---|---|---|
conversations.rename success schema
|
object |
Schema for successful response from conversations.rename method |
ok
|
defs_ok_true | |||||
|
||||||
channel
|
objs_conversation | |||||
|
application/json
[
{
"ok": true,
"channel": {
"id": "C012AB3CD",
"name": "general",
"is_im": false,
"topic": {
"value": "For public discussion of generalities",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"locale": "en-US",
"created": 1449252889,
"creator": "W012A3BCD",
"is_mpim": false,
"purpose": {
"value": "This part of the workspace is for fun. Make fun here.",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"is_group": false,
"unlinked": 0,
"is_member": true,
"is_shared": false,
"last_read": "1502126650.228446",
"is_channel": true,
"is_general": true,
"is_private": false,
"is_archived": false,
"num_members": 23,
"is_read_only": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"previous_names": [
"specifics",
"abstractions",
"etc"
],
"name_normalized": "general",
"is_pending_ext_shared": false
}
}
]
Retrieve a thread of messages posted to a conversation
Name | Data Type | Description |
---|---|---|
latest
|
double |
End of time range of messages to include in results. |
channel
|
string |
Conversation ID to fetch thread from. |
oldest
|
double |
Start of time range of messages to include in results. |
limit
|
integer |
The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. |
token
|
string |
Authentication token. Requires scope: |
cursor
|
string |
Paginate through collections of data by setting the |
ts
|
double |
Unique identifier of a thread's parent message. |
inclusive
|
boolean |
Include messages with latest or oldest timestamp in results only when either timestamp is specified. |
Name | Data Type | Description |
---|---|---|
conversations.replies error schema
|
object |
Schema for error response from conversations.replies method |
provided
|
string | |||||
ok
|
defs_ok_false | |||||
|
||||||
needed
|
string | |||||
error
|
string Allowed values: - missing_scope - channel_not_found - thread_not_found - not_authed - invalid_auth - account_inactive - invalid_arg_name - invalid_array_arg - invalid_charset - invalid_form_data - invalid_post_type - missing_post_type - team_added_to_org - invalid_json - json_not_object - request_timeout - upgrade_required |
application/json
[
{
"ok": false,
"error": "thread_not_found"
}
]
Name | Data Type | Description |
---|---|---|
conversations.replies success schema
|
object |
Schema for successful response from conversations.replies method |
ok
|
defs_ok_true | |||||
|
||||||
messages
|
array [] | |||||
has_more
|
boolean |
application/json
[
{
"ok": true,
"has_more": true,
"messages": [
{
"ts": "1482960137.003543",
"text": "island",
"type": "message",
"user": "U061F7AUR",
"replies": [
{
"ts": "1483037603.017503",
"user": "U061F7AUR"
},
{
"ts": "1483051909.018632",
"user": "U061F7AUR"
},
{
"ts": "1483125339.020269",
"user": "U061F7AUR"
}
],
"last_read": "1484678597.521003",
"thread_ts": "1482960137.003543",
"subscribed": true,
"reply_count": 3,
"unread_count": 0
},
{
"ts": "1483037603.017503",
"text": "one island",
"type": "message",
"user": "U061F7AUR",
"thread_ts": "1482960137.003543",
"parent_user_id": "U061F7AUR"
},
{
"ts": "1483051909.018632",
"text": "two island",
"type": "message",
"user": "U061F7AUR",
"thread_ts": "1482960137.003543",
"parent_user_id": "U061F7AUR"
},
{
"ts": "1483125339.020269",
"text": "three for the land",
"type": "message",
"user": "U061F7AUR",
"thread_ts": "1482960137.003543",
"parent_user_id": "U061F7AUR"
}
],
"response_metadata": {
"next_cursor": "bmV4dF90czoxNDg0Njc4MjkwNTE3MDkx"
}
}
]
Sets the purpose for a conversation.