TSG Global API Documentation
  • Get Started
  • ISO/IEC/SOC Certification
  • Staging Environment Access
  • API Reference
    • Programmable SMS
      • Send an SMS Message
      • Receive an SMS Message
      • Delivery Receipts (DLRs)
      • SMPP
        • Headers
        • Errors
    • Programmable MMS
      • Send an MMS Message
      • Receive an MMS Message
      • Receive DLRs
      • SMTP
    • Phone Numbers
      • Search For New Available Numbers
      • Add Number to Cart
      • Get Reserved Numbers In Cart
      • Remove Reserved Number From Cart
      • Checkout Numbers in Cart
      • Disconnect Number
      • Get Number Information
      • Manage Number for SMS & 10DLC
        • Enable SMS/10DLC on a Number
        • Disable SMS on a Number
        • Update inbound SMS webhook/URI
      • Manage Number for MMS
        • Enable MMS on a Number
        • Disable MMS on a Number
        • Update inbound MMS webhook/URI
      • Manage Number for Voice
        • List Destination Priority
        • Add Destination Priority
        • Update Destination Priority
        • Delete Destination Priority
      • Protect your phone number
        • TextProtect Webhook
      • Toll-free phone numbers - search & ordering
    • Data Services
      • CNAM Lookup
      • Lookup SMS Carrier
    • Reports
      • CDR Records
        • Get Count of CDR Records
        • Get CDR Records
    • Compliance & Identity
      • Business Identity & 10DLC (TNID v1)
      • Toll-Free Verified Sender (Order)
      • Short Code Submission (Order)
  • GraphQL API & Authentication
Powered by GitBook
On this page
  • Overview
  • Authentication
  • Method
  • Update per-did configuration. Currently only sms webhook URL is available using this enpodint.
  • Example CURL

Was this helpful?

  1. API Reference
  2. Phone Numbers
  3. Manage Number for SMS & 10DLC

Update inbound SMS webhook/URI

PreviousDisable SMS on a NumberNextManage Number for MMS

Last updated 10 months ago

Was this helpful?

Overview

This method allows you to update your inbound messaging webhook/URI for a phone number.

If you are an HTTP API Customer and do not utilize SMPP the posturl must be a fully qualified URL i.e. Leaving the posturl blank or not including it in your API call will convert the number from HTTP POST to SMPP Please be sure to have SMPP credentials setup and tested before converting numbers to SMPP or message loss could occur (which is bad).

Authentication

Authentication is done by passing your TSG Global API key via the Authorization header in the format "Authorization: Bearer <api_key>"

Method

Update per-did configuration. Currently only sms webhook URL is available using this enpodint.

POST https://api-service.tsgglobal.world/v1/sms/webhook

Request Body

Name
Type
Description

webhook_url

String

did*

String

DID you want to set/update SMS webhook endpoint for

webhook_type

String

postv2 (default) | postv1 | post3jam | smpp

x_api_key_header

String

This value will be passed as x-api-key header in the webhook http call. Can be used to secure your webhook API. (should not be provided if webhook_type is smpp)

Success

Example CURL

curl -n https://api-service.tsgglobal.world/v1/sms/webhook -XPOST -H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" -d '{
  "webhook_url": "https://example.com/webhook",
  "did": "12003004000"
}'

e.g.

http://someapi.somedomain.com/somescript.php
https://example.com/webhook