Slack: Lists items pinned to a channel
Slack pins.list: arguments, response, policy and SDK examples.
← Pins operations · Get started
Operation slack.pins_list
Provider route: GET /pins.list. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/slack with npm, or alter-sdk-slack with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SlackIntegration } from "@alter-ai/slack";
async function execute(input: Parameters<SlackIntegration["pins"]["list"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SlackIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.pins.list(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_slack import SlackIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SlackIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.pins.list(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Required within parent | Additional keys: not allowed |
query.channel | string | Required within parent |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | Schema for successful response from pins.list method |
$ (anyOf 1) | object | Alternative | |
$ (anyOf 1).items | array | Optional | |
$ (anyOf 1).items[] | JSON | Each item | |
$ (anyOf 1).items[] (anyOf 1) | object | Alternative | |
$ (anyOf 1).items[] (anyOf 1).created | JSON | Optional | |
$ (anyOf 1).items[] (anyOf 1).created (anyOf 1) | integer | Alternative | |
$ (anyOf 1).items[] (anyOf 1).created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 1).items[] (anyOf 1).created_by | string | Optional | |
$ (anyOf 1).items[] (anyOf 1).file | Model | Optional | Expand Gets information about a file — response body — file |
$ (anyOf 1).items[] (anyOf 1).type | string | Optional | Known values: file |
$ (anyOf 1).items[] (anyOf 2) | object | Alternative | |
$ (anyOf 1).items[] (anyOf 2).channel | string | Optional | |
$ (anyOf 1).items[] (anyOf 2).created | JSON | Optional | |
$ (anyOf 1).items[] (anyOf 2).created (anyOf 1) | integer | Alternative | |
$ (anyOf 1).items[] (anyOf 2).created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 1).items[] (anyOf 2).created_by | string | Optional | |
$ (anyOf 1).items[] (anyOf 2).message | Model | Optional | Expand Sends a message to a channel — response body — message |
$ (anyOf 1).items[] (anyOf 2).type | string | Optional | Known values: message |
$ (anyOf 1).ok | boolean | Optional | Must equal: true |
$ (anyOf 2) | object | Alternative | |
$ (anyOf 2).count | JSON | Optional | |
$ (anyOf 2).count (anyOf 1) | integer | Alternative | |
$ (anyOf 2).count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 2).ok | boolean | Optional | Must equal: true |
Referenced models: Gets information about a file — response body — file, Sends a message to a channel — response body — message
Schemas
Section titled “Schemas”4 more schemas are linked from the tables above, on the schema pages.
Gets information about a file — response body — file
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
channels | array | Optional | |
channels[] | string | Each item | |
comments_count | JSON | Optional | |
comments_count (anyOf 1) | integer | Alternative | |
comments_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
created | JSON | Optional | |
created (anyOf 1) | integer | Alternative | |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
date_delete | JSON | Optional | |
date_delete (anyOf 1) | integer | Alternative | |
date_delete (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
display_as_bot | boolean | Optional | |
editable | boolean | Optional | |
editor | string | Optional | |
external_id | string | Optional | |
external_type | string | Optional | |
external_url | string | Optional | Format: uri |
filetype | string | Optional | |
groups | array | Optional | |
groups[] | string | Each item | |
has_rich_preview | boolean | Optional | |
id | string | Optional | |
image_exif_rotation | JSON | Optional | |
image_exif_rotation (anyOf 1) | integer | Alternative | |
image_exif_rotation (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
ims | array | Optional | |
ims[] | string | Each item | |
is_external | boolean | Optional | |
is_public | boolean | Optional | |
is_starred | boolean | Optional | |
is_tombstoned | boolean | Optional | |
last_editor | string | Optional | |
mimetype | string | Optional | |
mode | string | Optional | |
name | string | Optional | |
non_owner_editable | boolean | Optional | |
num_stars | JSON | Optional | |
num_stars (anyOf 1) | integer | Alternative | |
num_stars (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
original_h | JSON | Optional | |
original_h (anyOf 1) | integer | Alternative | |
original_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
original_w | JSON | Optional | |
original_w (anyOf 1) | integer | Alternative | |
original_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
permalink | string | Optional | Format: uri |
permalink_public | string | Optional | Format: uri |
pinned_info | Model | Optional | Expand Gets information about a file — response body — file pinned info |
pinned_to | array | Optional | |
pinned_to[] | string | Each item | |
pretty_type | string | Optional | |
preview | string | Optional | |
public_url_shared | boolean | Optional | |
reactions | array | Optional | |
reactions[] | Model | Each item | Expand Gets information about a file — response body — file reactions item |
shares | object | Optional | |
shares.private | JSON | Optional | |
shares.public | JSON | Optional | |
size | JSON | Optional | |
size (anyOf 1) | integer | Alternative | |
size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
source_team | string | Optional | |
state | string | Optional | |
thumb_1024 | string | Optional | Format: uri |
thumb_1024_h | JSON | Optional | |
thumb_1024_h (anyOf 1) | integer | Alternative | |
thumb_1024_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_1024_w | JSON | Optional | |
thumb_1024_w (anyOf 1) | integer | Alternative | |
thumb_1024_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_160 | string | Optional | Format: uri |
thumb_360 | string | Optional | Format: uri |
thumb_360_h | JSON | Optional | |
thumb_360_h (anyOf 1) | integer | Alternative | |
thumb_360_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_360_w | JSON | Optional | |
thumb_360_w (anyOf 1) | integer | Alternative | |
thumb_360_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_480 | string | Optional | Format: uri |
thumb_480_h | JSON | Optional | |
thumb_480_h (anyOf 1) | integer | Alternative | |
thumb_480_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_480_w | JSON | Optional | |
thumb_480_w (anyOf 1) | integer | Alternative | |
thumb_480_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_64 | string | Optional | Format: uri |
thumb_720 | string | Optional | Format: uri |
thumb_720_h | JSON | Optional | |
thumb_720_h (anyOf 1) | integer | Alternative | |
thumb_720_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_720_w | JSON | Optional | |
thumb_720_w (anyOf 1) | integer | Alternative | |
thumb_720_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_80 | string | Optional | Format: uri |
thumb_800 | string | Optional | Format: uri |
thumb_800_h | JSON | Optional | |
thumb_800_h (anyOf 1) | integer | Alternative | |
thumb_800_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_800_w | JSON | Optional | |
thumb_800_w (anyOf 1) | integer | Alternative | |
thumb_800_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_960 | string | Optional | Format: uri |
thumb_960_h | JSON | Optional | |
thumb_960_h (anyOf 1) | integer | Alternative | |
thumb_960_h (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_960_w | JSON | Optional | |
thumb_960_w (anyOf 1) | integer | Alternative | |
thumb_960_w (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
thumb_tiny | string | Optional | |
timestamp | JSON | Optional | |
timestamp (anyOf 1) | integer | Alternative | |
timestamp (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
title | string | Optional | |
updated | JSON | Optional | |
updated (anyOf 1) | integer | Alternative | |
updated (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
url_private | string | Optional | Format: uri |
url_private_download | string | Optional | Format: uri |
user | string | Optional | |
user_team | string | Optional | |
username | string | Optional |
Referenced models: Gets information about a file — response body — file pinned info, Gets information about a file — response body — file reactions item
Gets information about a file — response body — file pinned info
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root |
Gets information about a file — response body — file reactions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
count | JSON | Optional | |
count (anyOf 1) | integer | Alternative | |
count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Optional | |
users | array | Optional | |
users[] | string | Each item |
Sends a message to a channel — response body — message blocks
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | array | Root | This is a very loose definition, in the future, we'll populate this with deeper schema in this definition namespace. |
$[] | object | Each item | Additional keys: allowed |
$[].type | string | Optional |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: slack.pins_list. Catalog operation: pins_list. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["pins:read"]