Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectRequired within parentAdditional keys: not allowed
query.channelstringRequired within parent

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRootSchema for successful response from pins.list method
$ (anyOf 1)objectAlternative
$ (anyOf 1).itemsarrayOptional
$ (anyOf 1).items[]JSONEach item
$ (anyOf 1).items[] (anyOf 1)objectAlternative
$ (anyOf 1).items[] (anyOf 1).createdJSONOptional
$ (anyOf 1).items[] (anyOf 1).created (anyOf 1)integerAlternative
$ (anyOf 1).items[] (anyOf 1).created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).items[] (anyOf 1).created_bystringOptional
$ (anyOf 1).items[] (anyOf 1).fileModelOptionalExpand Gets information about a file — response body — file
$ (anyOf 1).items[] (anyOf 1).typestringOptionalKnown values: file
$ (anyOf 1).items[] (anyOf 2)objectAlternative
$ (anyOf 1).items[] (anyOf 2).channelstringOptional
$ (anyOf 1).items[] (anyOf 2).createdJSONOptional
$ (anyOf 1).items[] (anyOf 2).created (anyOf 1)integerAlternative
$ (anyOf 1).items[] (anyOf 2).created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).items[] (anyOf 2).created_bystringOptional
$ (anyOf 1).items[] (anyOf 2).messageModelOptionalExpand Sends a message to a channel — response body — message
$ (anyOf 1).items[] (anyOf 2).typestringOptionalKnown values: message
$ (anyOf 1).okbooleanOptionalMust equal: true
$ (anyOf 2)objectAlternative
$ (anyOf 2).countJSONOptional
$ (anyOf 2).count (anyOf 1)integerAlternative
$ (anyOf 2).count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 2).okbooleanOptionalMust equal: true

Referenced models: Gets information about a file — response body — file, Sends a message to a channel — response body — message

4 more schemas are linked from the tables above, on the schema pages.

Gets information about a file — response body — file
FieldTypePresenceDescription and constraints
$objectRoot
channelsarrayOptional
channels[]stringEach item
comments_countJSONOptional
comments_count (anyOf 1)integerAlternative
comments_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
createdJSONOptional
created (anyOf 1)integerAlternative
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
date_deleteJSONOptional
date_delete (anyOf 1)integerAlternative
date_delete (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
display_as_botbooleanOptional
editablebooleanOptional
editorstringOptional
external_idstringOptional
external_typestringOptional
external_urlstringOptionalFormat: uri
filetypestringOptional
groupsarrayOptional
groups[]stringEach item
has_rich_previewbooleanOptional
idstringOptional
image_exif_rotationJSONOptional
image_exif_rotation (anyOf 1)integerAlternative
image_exif_rotation (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imsarrayOptional
ims[]stringEach item
is_externalbooleanOptional
is_publicbooleanOptional
is_starredbooleanOptional
is_tombstonedbooleanOptional
last_editorstringOptional
mimetypestringOptional
modestringOptional
namestringOptional
non_owner_editablebooleanOptional
num_starsJSONOptional
num_stars (anyOf 1)integerAlternative
num_stars (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
original_hJSONOptional
original_h (anyOf 1)integerAlternative
original_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
original_wJSONOptional
original_w (anyOf 1)integerAlternative
original_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
permalinkstringOptionalFormat: uri
permalink_publicstringOptionalFormat: uri
pinned_infoModelOptionalExpand Gets information about a file — response body — file pinned info
pinned_toarrayOptional
pinned_to[]stringEach item
pretty_typestringOptional
previewstringOptional
public_url_sharedbooleanOptional
reactionsarrayOptional
reactions[]ModelEach itemExpand Gets information about a file — response body — file reactions item
sharesobjectOptional
shares.privateJSONOptional
shares.publicJSONOptional
sizeJSONOptional
size (anyOf 1)integerAlternative
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
source_teamstringOptional
statestringOptional
thumb_1024stringOptionalFormat: uri
thumb_1024_hJSONOptional
thumb_1024_h (anyOf 1)integerAlternative
thumb_1024_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_1024_wJSONOptional
thumb_1024_w (anyOf 1)integerAlternative
thumb_1024_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_160stringOptionalFormat: uri
thumb_360stringOptionalFormat: uri
thumb_360_hJSONOptional
thumb_360_h (anyOf 1)integerAlternative
thumb_360_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_360_wJSONOptional
thumb_360_w (anyOf 1)integerAlternative
thumb_360_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_480stringOptionalFormat: uri
thumb_480_hJSONOptional
thumb_480_h (anyOf 1)integerAlternative
thumb_480_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_480_wJSONOptional
thumb_480_w (anyOf 1)integerAlternative
thumb_480_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_64stringOptionalFormat: uri
thumb_720stringOptionalFormat: uri
thumb_720_hJSONOptional
thumb_720_h (anyOf 1)integerAlternative
thumb_720_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_720_wJSONOptional
thumb_720_w (anyOf 1)integerAlternative
thumb_720_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_80stringOptionalFormat: uri
thumb_800stringOptionalFormat: uri
thumb_800_hJSONOptional
thumb_800_h (anyOf 1)integerAlternative
thumb_800_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_800_wJSONOptional
thumb_800_w (anyOf 1)integerAlternative
thumb_800_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_960stringOptionalFormat: uri
thumb_960_hJSONOptional
thumb_960_h (anyOf 1)integerAlternative
thumb_960_h (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_960_wJSONOptional
thumb_960_w (anyOf 1)integerAlternative
thumb_960_w (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
thumb_tinystringOptional
timestampJSONOptional
timestamp (anyOf 1)integerAlternative
timestamp (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
titlestringOptional
updatedJSONOptional
updated (anyOf 1)integerAlternative
updated (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
url_privatestringOptionalFormat: uri
url_private_downloadstringOptionalFormat: uri
userstringOptional
user_teamstringOptional
usernamestringOptional

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
FieldTypePresenceDescription and constraints
$objectRoot
Gets information about a file — response body — file reactions item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
countJSONOptional
count (anyOf 1)integerAlternative
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringOptional
usersarrayOptional
users[]stringEach item
Sends a message to a channel — response body — message blocks
FieldTypePresenceDescription and constraints
$arrayRootThis is a very loose definition, in the future, we'll populate this with deeper schema in this definition namespace.
$[]objectEach itemAdditional keys: allowed
$[].typestringOptional

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"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.