SuperAPI AI 工具集

telnyx-messaging-profiles-curl

办公与效率

查看项目

更新于 10-16 03:37

技能介绍

用途:使用 curl 调用 Telnyx Messaging Profiles REST API,管理消息配置文件(messaging profiles)及短代码(short codes)。安装:curl 在 macOS、Linux 与 Windows 10+ 上已预装。设置:export TELNYX_API_KEY="YOUR_API_KEY_HERE",所有请求通过 Authorization: Bearer $TELNYX_API_KEY 认证。主要能力:列出(GET /messaging_profiles)、创建(POST,必填 name 与 whitelisted_destinations)、检索(GET /messaging_profiles/{id})、更新(PATCH)、删除(DELETE)消息配置文件;列出配置文件关联的号码(GET /messaging_profiles/{id}/phone_numbers)与短代码(GET /messaging_profiles/{id}/short_codes);列出全部短代码(GET /short_codes)、检索短代码(GET /short_codes/{id})、更新短代码(PATCH /short_codes/{id},必填 messaging_profile_id,解绑可设为 null 或空字符串,可用 tags 数组添加或更新标签)。配置文件字段涵盖 enabled、webhook_url、webhook_failover_url、webhook_api_version、daily_spend_limit、smart_encoding、mms_transcoding、number_pool_settings、url_shortener_settings、whitelisted_destinations 等,可用于号码池、粘性发送与地理匹配等场景,并配置短代码支撑高并发发送。使用方式:以 JSON 请求体传参,创建示例的必填字段为 name 与 whitelisted_destinations。分页:列表端点返回分页结果,可用 page[number]、page[size] 导航,并查看 meta.total_pages。错误处理:需处理网络错误、401(密钥无效)、403(权限不足)、404(资源不存在)、422(校验错误)、429(限流,建议指数退避重试)。限制:具体配额、价格与速率上限暂未提供。