Telstra Messaging API

Send and receive SMS and MMS messages programmatically across the Telstra mobile network. Supports outbound delivery to Australian and international destinations, inbound replies on provisioned dedicated virtual numbers, delivery status callbacks, scheduled delivery, and message validity windows. Authentication uses OAuth 2.0 client credentials with the NSMS scope against /oauth/token.

Telstra Messaging API is one of 2 APIs that Telstra publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 4 machine-runnable capabilities that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko and 3 JSON Schema definitions.

Tagged areas include Messaging, SMS, MMS, Telecommunications, and Mobile. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, a JSON-LD context, sample payloads, SDKs, 4 Naftiko capability specs, and 3 JSON Schemas.

Documentation

Specifications

SDKs

Examples

Schemas & Data

Other Resources

OpenAPI Specification

telstra-messaging-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Telstra Messaging API
  description: |
    The Telstra Messaging API provides programmatic SMS and MMS messaging
    services in Australia and select international destinations. Built on
    the Telstra mobile network, the API supports outbound and inbound
    SMS/MMS, delivery status callbacks, virtual numbers, and provisioning
    workflows. Authentication uses OAuth 2.0 client credentials with the
    NSMS scope.
  version: '2.2.10'
  contact:
    name: Telstra Developer Support
    url: https://dev.telstra.com
  termsOfService: https://www.telstra.com.au/business-enterprise/legal/messaging-api-terms-of-service
  license:
    name: Telstra Developer License
    url: https://github.com/telstra/tdev-doc-license
  x-logo:
    url: https://www.telstra.com.au/etc/designs/telstrav8/clientlibs/img/Telstra_Symbol.svg
servers:
  - url: https://tapi.telstra.com/v2
    description: Production Server
security:
  - OAuth2ClientCredentials: [NSMS]
tags:
  - name: Authentication
    description: OAuth 2.0 client credentials token issuance.
  - name: SMS
    description: Send, retrieve, and check status of SMS messages.
  - name: MMS
    description: Send, retrieve, and check status of MMS messages.
  - name: Provisioning
    description: Create, retrieve, and delete dedicated number subscriptions.
  - name: HealthCheck
    description: Service health checks for SMS and MMS messaging surfaces.
paths:
  /oauth/token:
    post:
      summary: Telstra Generate OAuth Token
      description: Generate an OAuth 2.0 bearer token using the client credentials grant with the NSMS scope.
      operationId: generateToken
      tags:
        - Authentication
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OAuthTokenRequest'
      responses:
        '200':
          description: Token issued successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthTokenResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /messages/sms:
    post:
      summary: Telstra Send SMS
      description: Send a single SMS message to one or more destination numbers. Returns a message ID per destination plus delivery and reply callback registrations.
      operationId: sendSms
      tags:
        - SMS
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSmsRequest'
      responses:
        '201':
          description: SMS accepted for delivery.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendMessageResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
    get:
      summary: Telstra Get SMS Replies
      description: Retrieve queued inbound SMS replies for the authenticated dedicated virtual number.
      operationId: getSmsReplies
      tags:
        - SMS
      responses:
        '200':
          description: Reply payload (empty if no replies are queued).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboundMessage'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /messages/sms/{messageId}/status:
    get:
      summary: Telstra Get SMS Status
      description: Retrieve the current delivery status for a previously sent SMS by message ID.
      operationId: getSmsStatus
      tags:
        - SMS
      parameters:
        - name: messageId
          in: path
          required: true
          schema:
            type: string
          description: Server-issued message identifier returned from POST /messages/sms.
      responses:
        '200':
          description: Current delivery status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageStatus'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /messages/sms/healthcheck:
    get:
      summary: Telstra SMS Healthcheck
      description: Service availability indicator for SMS messaging.
      operationId: smsHealthcheck
      tags:
        - HealthCheck
      security: []
      responses:
        '200':
          description: Service is operational.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
        '503':
          description: Service is degraded or unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
  /messages/mms:
    post:
      summary: Telstra Send MMS
      description: Send an MMS containing one or more multimedia parts (image, audio, video, vCard, or text) to a destination number.
      operationId: sendMms
      tags:
        - MMS
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMmsRequest'
      responses:
        '201':
          description: MMS accepted for delivery.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendMessageResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '413':
          description: Payload too large.
        '429':
          $ref: '#/components/responses/RateLimited'
    get:
      summary: Telstra Get MMS Replies
      description: Retrieve queued inbound MMS replies for the authenticated dedicated virtual number.
      operationId: getMmsReplies
      tags:
        - MMS
      responses:
        '200':
          description: Inbound MMS payload (empty if no replies queued).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboundMessage'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /messages/mms/{messageId}/status:
    get:
      summary: Telstra Get MMS Status
      description: Retrieve the current delivery status for a previously sent MMS by message ID.
      operationId: getMmsStatus
      tags:
        - MMS
      parameters:
        - name: messageId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Current delivery status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageStatus'
        '404':
          $ref: '#/components/responses/NotFound'
  /messages/mms/healthcheck:
    get:
      summary: Telstra MMS Healthcheck
      description: Service availability indicator for MMS messaging.
      operationId: mmsHealthcheck
      tags:
        - HealthCheck
      security: []
      responses:
        '200':
          description: Service is operational.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
  /messages/provisioning/subscriptions:
    post:
      summary: Telstra Create Subscription
      description: Provision a dedicated virtual number subscription for the calling application, allowing inbound replies.
      operationId: createSubscription
      tags:
        - Provisioning
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionRequest'
      responses:
        '201':
          description: Subscription provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
    get:
      summary: Telstra Get Subscription
      description: Retrieve the current dedicated virtual number subscription for the authenticated application.
      operationId: getSubscription
      tags:
        - Provisioning
      responses:
        '200':
          description: Current subscription details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      summary: Telstra Delete Subscription
      description: Release the dedicated virtual number subscription for the authenticated application.
      operationId: deleteSubscription
      tags:
        - Provisioning
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                emptyArr:
                  type: integer
                  description: Sentinel field required by the API; pass 0 to confirm deletion.
      responses:
        '204':
          description: Subscription released.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  securitySchemes:
    OAuth2ClientCredentials:
      type: oauth2
      description: OAuth 2.0 client credentials grant against https://tapi.telstra.com/v2/oauth/token with the NSMS scope.
      flows:
        clientCredentials:
          tokenUrl: https://tapi.telstra.com/v2/oauth/token
          scopes:
            NSMS: Send and receive SMS/MMS through Telstra Messaging.
  responses:
    BadRequest:
      description: Bad Request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Too Many Requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    OAuthTokenRequest:
      type: object
      required:
        - client_id
        - client_secret
        - grant_type
      properties:
        client_id:
          type: string
          description: The application's client ID issued by dev.telstra.com.
        client_secret:
          type: string
          description: The application's client secret.
        grant_type:
          type: string
          enum:
            - client_credentials
        scope:
          type: string
          default: NSMS
    OAuthTokenResponse:
      type: object
      required:
        - access_token
        - expires_in
        - token_type
      properties:
        access_token:
          type: string
          description: Bearer token for subsequent API calls.
        expires_in:
          type: string
          description: Token lifetime in seconds (commonly 3599).
        token_type:
          type: string
          enum:
            - Bearer
    SendSmsRequest:
      type: object
      required:
        - to
        - body
      properties:
        to:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          description: One or more destination MSISDNs in E.164 format.
        body:
          type: string
          description: The SMS message body. UCS-2 supported.
          maxLength: 1900
        from:
          type: string
          description: Sender ID or virtual number override; subject to provisioning and regulatory approvals.
        validity:
          type: integer
          description: Validity period in minutes (1 to 1440).
          minimum: 1
          maximum: 1440
        scheduledDelivery:
          type: integer
          description: Delay in minutes before the message is dispatched (1 to 1440).
          minimum: 1
          maximum: 1440
        notifyURL:
          type: string
          format: uri
          description: HTTPS callback URL to receive delivery status notifications.
        replyRequest:
          type: boolean
          description: Whether to enable inbound reply tracking on this message.
        priority:
          type: boolean
          description: Whether the message is sent at high priority.
        receiptOff:
          type: boolean
          description: Suppress carrier-side delivery receipts.
        userMsgRef:
          type: string
          description: Application-supplied reference echoed back in callbacks and status retrieval.
    SendMmsRequest:
      type: object
      required:
        - to
        - subject
        - MMSContent
      properties:
        to:
          type: string
          description: Destination MSISDN in E.164 format.
        subject:
          type: string
          description: MMS subject line (max 64 chars).
          maxLength: 64
        from:
          type: string
        notifyURL:
          type: string
          format: uri
        replyRequest:
          type: boolean
        priority:
          type: boolean
        MMSContent:
          type: array
          description: One or more MMS content parts; base64 encoded payloads.
          items:
            $ref: '#/components/schemas/MmsContentPart'
    MmsContentPart:
      type: object
      required:
        - type
        - payload
      properties:
        type:
          type: string
          description: MIME type (image/jpeg, image/png, image/gif, audio/amr, text/plain, application/smil).
        filename:
          type: string
        payload:
          type: string
          format: byte
          description: Base64-encoded content payload.
    SendMessageResponse:
      type: object
      required:
        - messages
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/MessageReceipt'
        country:
          type: array
          items:
            type: object
        messageType:
          type: string
        numberSegments:
          type: integer
        numberNationalDestinations:
          type: integer
        numberInternationalDestinations:
          type: integer
    MessageReceipt:
      type: object
      required:
        - to
        - deliveryStatus
        - messageId
      properties:
        to:
          type: string
        deliveryStatus:
          type: string
          enum:
            - MessageWaiting
            - DeliveredToNetwork
            - MessageBuffered
            - DeliveredToTerminal
            - DeliveryImpossible
            - Rejected
        messageId:
          type: string
        messageStatusURL:
          type: string
          format: uri
    MessageStatus:
      type: object
      required:
        - to
        - sentTimestamp
        - status
      properties:
        to:
          type: string
        sentTimestamp:
          type: string
          format: date-time
        receivedTimestamp:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - MessageWaiting
            - DeliveredToNetwork
            - MessageBuffered
            - DeliveredToTerminal
            - DeliveryImpossible
            - Rejected
    InboundMessage:
      type: object
      properties:
        status:
          type: string
          enum:
            - EMPTY
            - RECEIVED
        destinationAddress:
          type: string
        senderAddress:
          type: string
        message:
          type: string
        messageId:
          type: string
        sentTimestamp:
          type: string
          format: date-time
        apiMsgId:
          type: string
    CreateSubscriptionRequest:
      type: object
      properties:
        activeDays:
          type: integer
          description: How many days the dedicated number remains active (1 to 1825).
          minimum: 1
          maximum: 1825
          default: 30
        notifyURL:
          type: string
          format: uri
          description: HTTPS callback URL for inbound message notifications.
        callbackData:
          type: string
          description: Optional opaque value passed through to the notify URL.
    Subscription:
      type: object
      required:
        - destinationAddress
      properties:
        destinationAddress:
          type: string
          description: The dedicated virtual number assigned to the application.
        activeDays:
          type: integer
        notifyURL:
          type: string
          format: uri
        expiryDate:
          type: string
          format: date-time
    HealthCheckResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - up
            - down
    ErrorResponse:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          type: string
        code:
          type: string
        message:
          type: string