AptlyStar

Linq

Send iMessage, SMS, and RCS messages and manage conversations with Linq

使用说明

Reach people on iMessage, SMS, and RCS through Linq. Start chats, send messages with media, links, effects, and replies, send voice memos, react with tapbacks, manage group participants, check iMessage/RCS capability, configure contact cards, and subscribe to webhook events — all through a single Linq API key.

工具

linq_add_participant

Add a participant to a group chat (3+ existing participants)

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the group chat
handlestring是Phone number (E.164 format) or email address of the participant to add

输出

参数类型描述
messagestringHuman-readable status message
statusstringQueued action status
traceIdstringTrace ID for the queued action

linq_check_imessage

Check whether an address (phone number or email) supports iMessage

输入

参数类型必填描述
apiKeystring是Linq API key
addressstring是Phone number (E.164 format) or email address to check
fromstring否Sender phone number to check from (defaults to an available number)

输出

参数类型描述
addressstringThe address that was checked
availablebooleanWhether the address supports iMessage

linq_check_rcs

Check whether an address (phone number or email) supports RCS

输入

参数类型必填描述
apiKeystring是Linq API key
addressstring是Phone number (E.164 format) or email address to check
fromstring否Sender phone number to check from (defaults to an available number)

输出

参数类型描述
addressstringThe address that was checked
availablebooleanWhether the address supports RCS

linq_create_attachment

Upload a file to Linq as a reusable attachment (max 100MB) and get an attachment ID to send in messages

输入

参数类型必填描述
apiKeystring是Linq API key
filefile否File to upload (a UserFile from a file-upload field or a previous block)
fileContentstring否Legacy base64-encoded file content fallback
filenamestring否Override the file name (defaults to the uploaded file name)
contentTypestring否Override the MIME type (defaults to the uploaded file type)

输出

参数类型描述
attachmentIdstringReusable attachment ID to reference when sending messages or voice memos
downloadUrlstringURL the attachment can be downloaded from
filenamestringFile name
contentTypestringMIME type of the file
sizeBytesnumberFile size in bytes
statusstringUpload status

linq_create_chat

Start a new iMessage, SMS, or RCS chat and send the first message

输入

参数类型必填描述
apiKeystring是Linq API key
fromstring是Sender phone number in E.164 format (e.g. +14155551234)
toarray是Recipient handles (phone numbers in E.164 format or email addresses)
textstring否Text content of the first message. Optional, but at least one of text, media, attachment, or link is required
mediaUrlstring否Optional publicly accessible HTTPS URL of an image, video, or file to attach
attachmentIdstring否Optional ID of a pre-uploaded attachment to send instead of a media URL
preferredServicestring否Preferred delivery service: iMessage, SMS, or RCS
effectNamestring否Optional iMessage effect name (e.g. confetti, fireworks, lasers)
effectTypestring否Optional effect type: screen or bubble
replyToMessageIdstring否Optional message ID to reply to inline
replyToPartIndexnumber否Optional part index of the message being replied to
idempotencyKeystring否Optional idempotency key to safely retry the request

输出

参数类型描述
chatIdstringID of the created chat
displayNamestringDisplay name of the chat
isGroupbooleanWhether the chat is a group chat
servicestringDelivery service used (iMessage, SMS, RCS)
handlesjsonParticipant handles in the chat
healthStatusjsonMessaging line health status
messagejsonThe sent message object with parts and delivery info

linq_create_contact_card

Set up a contact card (Name and Photo Sharing) for a phone number

输入

参数类型必填描述
apiKeystring是Linq API key
phoneNumberstring是Phone number in E.164 format the card applies to
firstNamestring是First name to display
lastNamestring否Last name to display
imageUrlstring否Profile photo URL

输出

参数类型描述
phoneNumberstringPhone number the card applies to
firstNamestringFirst name
lastNamestringLast name
imageUrlstringProfile photo URL
isActivebooleanWhether the card is active

linq_create_webhook_subscription

Subscribe an HTTPS endpoint to Linq webhook events

输入

参数类型必填描述
apiKeystring是Linq API key
targetUrlstring是HTTPS endpoint that will receive webhook events
subscribedEventsarray是Event types to subscribe to (e.g. message.sent, message.delivered)
phoneNumbersarray否E.164 phone numbers to filter events by (omit for all numbers)

输出

参数类型描述
idstringSubscription ID
targetUrlstringEndpoint that receives events
subscribedEventsjsonSubscribed event types
phoneNumbersjsonFiltered phone numbers (null = all)
isActivebooleanWhether the subscription is active
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 update timestamp
signingSecretstringHMAC-SHA256 signing secret. Store securely — it cannot be retrieved again

linq_delete_attachment

Permanently delete an attachment owned by your account

输入

参数类型必填描述
apiKeystring是Linq API key
attachmentIdstring是The unique identifier of the attachment to delete

输出

参数类型描述
successbooleanWhether the attachment was deleted

linq_delete_message

Delete a message from the Linq API only (does not unsend it; recipients still see it)

输入

参数类型必填描述
apiKeystring是Linq API key
messageIdstring是The unique identifier of the message to delete

输出

参数类型描述
successbooleanWhether the message was deleted

linq_delete_webhook_subscription

Delete a webhook subscription from your account

输入

参数类型必填描述
apiKeystring是Linq API key
subscriptionIdstring是The unique identifier of the webhook subscription to delete

输出

参数类型描述
successbooleanWhether the subscription was deleted

linq_edit_message

Edit the text of a sent message (up to 5 times, within 15 minutes of sending; iMessage only)

输入

参数类型必填描述
apiKeystring是Linq API key
messageIdstring是The unique identifier of the message to edit
textstring是New text content for the message part
partIndexnumber否Index of the message part to edit (defaults to 0)

输出

参数类型描述
idstringMessage ID
chatIdstringID of the chat the message belongs to
isFromMebooleanWhether the message was sent by you
isDeliveredbooleanWhether the message was delivered
isReadbooleanWhether the message was read
servicestringDelivery service (iMessage, SMS, RCS)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 update timestamp
sentAtstringISO 8601 sent timestamp
partsjsonUpdated message parts with reactions
messagejsonThe full updated message object

linq_get_attachment

Retrieve metadata for an attachment, including its download URL and status

输入

参数类型必填描述
apiKeystring是Linq API key
attachmentIdstring是The unique identifier of the attachment

输出

参数类型描述
idstringAttachment ID
filenamestringFile name
contentTypestringMIME type of the file
sizeBytesnumberFile size in bytes
statusstringUpload status (pending, complete, failed)
downloadUrlstringURL to download the file
createdAtstringISO 8601 creation timestamp

linq_get_chat

Retrieve a chat by ID, including participants and line health

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat

输出

参数类型描述
idstringChat ID
displayNamestringDisplay name of the chat
isGroupbooleanWhether the chat is a group chat
isArchivedbooleanWhether the chat is archived
servicestringDelivery service (iMessage, SMS, RCS)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 update timestamp
handlesjsonParticipant handles in the chat
healthStatusjsonMessaging line health status

linq_get_contact_card

Retrieve contact cards, optionally filtered by phone number

输入

参数类型必填描述
apiKeystring是Linq API key
phoneNumberstring否E.164 phone number to filter by (omit to return all cards)

输出

参数类型描述
contactCardsarrayContact cards on the account
↳ phoneNumberstringPhone number in E.164 format
↳ firstNamestringFirst name
↳ lastNamestringLast name
↳ imageUrlstringProfile photo URL
↳ isActivebooleanWhether the card is active

linq_get_message

Retrieve a single message by ID, including parts, reactions, and delivery status

输入

参数类型必填描述
apiKeystring是Linq API key
messageIdstring是The unique identifier of the message

输出

参数类型描述
idstringMessage ID
chatIdstringID of the chat the message belongs to
isFromMebooleanWhether the message was sent by you
isDeliveredbooleanWhether the message was delivered
isReadbooleanWhether the message was read
servicestringDelivery service (iMessage, SMS, RCS)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 update timestamp
sentAtstringISO 8601 sent timestamp
partsjsonMessage parts (text, media, link) with reactions
messagejsonThe full message object

linq_get_webhook_subscription

Retrieve a webhook subscription by ID

输入

参数类型必填描述
apiKeystring是Linq API key
subscriptionIdstring是The unique identifier of the webhook subscription

输出

参数类型描述
idstringSubscription ID
targetUrlstringEndpoint that receives events
subscribedEventsjsonSubscribed event types
phoneNumbersjsonFiltered phone numbers (null = all)
isActivebooleanWhether the subscription is active
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 update timestamp

linq_leave_chat

Leave an iMessage group chat (4+ active participants; not supported for direct chats)

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the group chat

输出

参数类型描述
messagestringHuman-readable status message
statusstringQueued action status (e.g. accepted)
traceIdstringTrace ID for the queued action

linq_list_chats

List chats, optionally filtered by sender or participant handle

输入

参数类型必填描述
apiKeystring是Linq API key
fromstring否Filter by sender phone number in E.164 format
tostring否Filter by participant handle (phone number or email)
limitnumber否Results per page (default 20, max 100)
cursorstring否Pagination cursor from a previous response

输出

参数类型描述
chatsjsonArray of chat objects
nextCursorstringCursor for the next page, or null if there are no more results

linq_list_messages

List messages in a chat with pagination

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat
limitnumber否Maximum number of messages to return
cursorstring否Pagination cursor from a previous response

输出

参数类型描述
messagesjsonArray of message objects with parts and reactions
nextCursorstringCursor for the next page, or null if there are no more results

linq_list_phone_numbers

List all phone numbers assigned to your partner account, with line health

输入

参数类型必填描述
apiKeystring是Linq API key

输出

参数类型描述
phoneNumbersarrayPhone numbers assigned to the account
↳ idstringPhone number ID
↳ phoneNumberstringPhone number in E.164 format
↳ healthStatusjsonLine health status (status, doc_url)

linq_list_thread

List all messages in the thread that contains a given message

输入

参数类型必填描述
apiKeystring是Linq API key
messageIdstring是The ID of any message in the thread
orderstring否Sort order: asc (oldest first) or desc (newest first)
limitnumber否Maximum number of messages to return
cursorstring否Pagination cursor from a previous response

输出

参数类型描述
messagesjsonArray of message objects in the thread
nextCursorstringCursor for the next page, or null if there are no more results

linq_list_webhook_events

List all webhook event types available to subscribe to

输入

参数类型必填描述
apiKeystring是Linq API key

输出

参数类型描述
eventsjsonAvailable webhook event type names
docUrlstringDocumentation URL for webhook events

linq_list_webhook_subscriptions

List all webhook subscriptions on your account

输入

参数类型必填描述
apiKeystring是Linq API key

输出

参数类型描述
subscriptionsarrayWebhook subscriptions
↳ idstringSubscription ID
↳ targetUrlstringEndpoint that receives events
↳ subscribedEventsjsonSubscribed event types
↳ phoneNumbersjsonFiltered phone numbers (null = all)
↳ isActivebooleanWhether the subscription is active
↳ createdAtstringISO 8601 creation timestamp
↳ updatedAtstringISO 8601 update timestamp

linq_mark_chat_read

Mark all messages in a chat as read

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat

输出

参数类型描述
successbooleanWhether the chat was marked as read

linq_react_to_message

Add or remove a tapback reaction on a message

输入

参数类型必填描述
apiKeystring是Linq API key
messageIdstring是The unique identifier of the message to react to
operationstring是Whether to add or remove the reaction: add or remove
typestring是Reaction type: love, like, dislike, laugh, emphasize, question, custom, or sticker
customEmojistring否Emoji to use when type is custom
partIndexnumber否Index of the message part to react to (defaults to the entire message)

输出

参数类型描述
messagestringHuman-readable status message
statusstringQueued action status
traceIdstringTrace ID for the queued action

linq_remove_participant

Remove a participant from a group chat (minimum 3 participants must remain)

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the group chat
handlestring是Phone number (E.164 format) or email address of the participant to remove

输出

参数类型描述
messagestringHuman-readable status message
statusstringQueued action status
traceIdstringTrace ID for the queued action

linq_send_message

Send a message to an existing chat, with optional media, link, effect, or reply

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat
textstring否Text content of the message. Optional, but at least one of text, media, attachment, or link is required
mediaUrlstring否Optional publicly accessible HTTPS URL of an image, video, or file to attach
attachmentIdstring否Optional ID of a pre-uploaded attachment to send instead of a media URL
linkUrlstring否Optional URL to send as a rich link preview. Linq requires a link to be its own message, so when set, text and media are ignored
preferredServicestring否Preferred delivery service: iMessage, SMS, or RCS
effectNamestring否Optional iMessage effect name (e.g. confetti, fireworks, lasers)
effectTypestring否Optional effect type: screen or bubble
replyToMessageIdstring否Optional message ID to reply to inline
replyToPartIndexnumber否Optional part index of the message being replied to
idempotencyKeystring否Optional idempotency key to safely retry the request

输出

参数类型描述
chatIdstringID of the chat the message was sent to
messageIdstringID of the sent message
deliveryStatusstringDelivery status (pending, queued, sent, delivered, failed)
sentAtstringISO 8601 timestamp the message was sent
servicestringDelivery service (iMessage, SMS, RCS)
messagejsonThe full sent message object with parts

linq_send_voice_memo

Send a voice memo to a chat from a URL or a pre-uploaded attachment

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat
voiceMemoUrlstring否Publicly accessible HTTPS URL of the audio file (MP3, M4A, AAC, CAF, WAV, AIFF, AMR)
attachmentIdstring否ID of a pre-uploaded audio attachment (use instead of voiceMemoUrl)

输出

参数类型描述
idstringID of the sent voice memo message
statusstringDelivery status
fromstringSender handle
tojsonRecipient handles
servicestringDelivery service (iMessage, SMS, RCS)
voiceMemojsonAudio file metadata (id, filename, mime_type, size_bytes, url, duration_ms)

linq_share_contact_card

Share your configured contact card (Name and Photo Sharing) with a chat

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat

输出

参数类型描述
successbooleanWhether the contact card was shared

linq_start_typing

Show a typing indicator in a one-on-one chat (iMessage only, not group chats)

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat

输出

参数类型描述
successbooleanWhether the typing indicator was sent

linq_stop_typing

Stop the typing indicator in a one-on-one chat (iMessage only, not group chats)

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat

输出

参数类型描述
successbooleanWhether the typing indicator was stopped

linq_update_chat

Update chat properties such as group display name and icon

输入

参数类型必填描述
apiKeystring是Linq API key
chatIdstring是The unique identifier of the chat
displayNamestring否New display name for the group chat
groupChatIconstring否New group chat icon (publicly accessible image URL)

输出

参数类型描述
chatIdstringID of the updated chat
statusstringStatus of the queued update

linq_update_contact_card

Partially update an existing active contact card for a phone number

输入

参数类型必填描述
apiKeystring是Linq API key
phoneNumberstring是Phone number in E.164 format identifying the card to update
firstNamestring否New first name
lastNamestring否New last name
imageUrlstring否New profile photo URL

输出

参数类型描述
phoneNumberstringPhone number the card applies to
firstNamestringFirst name
lastNamestringLast name
imageUrlstringProfile photo URL
isActivebooleanWhether the card is active

linq_update_webhook_subscription

Update a webhook subscription (target URL, events, phone filter, or active state)

输入

参数类型必填描述
apiKeystring是Linq API key
subscriptionIdstring是The unique identifier of the webhook subscription
targetUrlstring否New HTTPS endpoint that will receive events
subscribedEventsarray否New set of event types to subscribe to
phoneNumbersarray否New set of E.164 phone numbers to filter by
isActiveboolean否Whether the subscription should be active

输出

参数类型描述
idstringSubscription ID
targetUrlstringEndpoint that receives events
subscribedEventsjsonSubscribed event types
phoneNumbersjsonFiltered phone numbers (null = all)
isActivebooleanWhether the subscription is active
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 update timestamp

On this page