Twilio LinkShortening API

The LinkShortening API from Twilio — 5 operation(s) for linkshortening.

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/LinkShortening/Domains/{DomainSid}/Certificate Upload a TLS certificate for a short-link domain · Update domain cert V4 #
Ask an LLM
“How do I upload my own TLS certificate so shortened links work over HTTPS?”
“What format does the certificate and private key need to be in for a branded link domain?”
Tell an agent
Upload PEM certificate {cert} to short-link domain {domain}.
Replace the expiring certificate on domain {domain} with {cert}.
GET /v1/LinkShortening/Domains/{DomainSid}/Certificate Check the TLS certificate on a short-link domain · Fetch domain cert V4 #
Ask an LLM
“Is the TLS certificate on my branded link-shortening domain valid and uploaded?”
“Can I see which certificate is currently attached to a short-link domain?”
Tell an agent
Show the TLS certificate for short-link domain {domain}.
Check the certificate status on domain {domain}.
DELETE /v1/LinkShortening/Domains/{DomainSid}/Certificate Remove the TLS certificate from a short-link domain · Delete domain cert V4 #
Ask an LLM
“Can I remove the certificate I uploaded for a link-shortening domain?”
“What happens to HTTPS short links if I delete a domain's certificate?”
Tell an agent destructive · confirm first
Delete the TLS certificate on short-link domain {domain}.
Remove the uploaded cert from domain {domain}.
POST /v1/LinkShortening/Domains/{DomainSid}/Config Configure fallback, click webhook and HTTPS for a domain · Update domain config #
Ask an LLM
“How do I get a webhook every time a recipient clicks a shortened link?”
“Can I send shortened links without the https:// prefix?”
Tell an agent
Send click events for domain {domain} to {callback}.
Redirect unmatched short links on {domain} to {fallback}.
GET /v1/LinkShortening/Domains/{DomainSid}/Config View a short-link domain's configuration · Fetch domain config #
Ask an LLM
“Where do unmatched visits to my short-link domain get redirected?”
“Which webhook receives click events for a branded link domain?”
Tell an agent
Show the configuration of short-link domain {domain}.
Get the fallback and click-callback URLs set on domain {domain}.
GET /v1/LinkShortening/MessagingService/{MessagingServiceSid}/DomainConfig View domain config through a Messaging Service · Fetch domain config messaging service #
Ask an LLM
“What link-shortening domain settings apply to a given Messaging Service?”
“Can I look up the short-link config starting from the Messaging Service instead of the domain?”
Tell an agent
Show the link-shortening domain config used by Messaging Service {service}.
Get the fallback and callback settings that apply to service {service}.
POST /v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid} Attach a short-link domain to a Messaging Service · Create linkshortening messaging service #
Ask an LLM
“How do I make a Messaging Service shorten links with my branded domain?”
“Can one short-link domain be linked to a specific Messaging Service?”
Tell an agent
Associate short-link domain {domain} with Messaging Service {service}.
Turn on branded link shortening for service {service} using domain {domain}.
DELETE /v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid} Detach a short-link domain from a Messaging Service · Delete linkshortening messaging service #
Ask an LLM
“How do I stop a Messaging Service from using my branded short-link domain?”
“Can I unlink a domain from one service without deleting the domain?”
Tell an agent destructive · confirm first
Dissociate domain {domain} from Messaging Service {service}.
Stop service {service} from shortening links with domain {domain}.
GET /v1/LinkShortening/MessagingServices/{MessagingServiceSid}/Domain Find which domain a Messaging Service shortens with · Fetch linkshortening messaging service domain association #
Ask an LLM
“Which short-link domain is my Messaging Service associated with?”
“Is any branded link domain attached to this Messaging Service yet?”
Tell an agent
Tell me which short-link domain is associated with Messaging Service {service}.
Look up the domain association for service {service}.

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/twilio-linkshortening-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

twilio-linkshortening-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Twilio - Messaging Link Shortening API
  description: This is the public Twilio REST API.
  termsOfService: https://www.twilio.com/legal/tos
  contact:
    name: Twilio Support
    url: https://support.twilio.com
    email: support@twilio.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.52.0
servers:
- url: https://messaging.twilio.com
tags:
- name: LinkShortening
paths:
  /v1/LinkShortening/Domains/{DomainSid}/Certificate:
    servers:
    - url: https://messaging.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - certificate_sid
      - domain_name
      - domain_sid
      - date_expires
      - date_created
      - date_updated
      - url
      pathType: instance
      mountName: domain_certs
      className: domain_certs
    post:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: DomainSid
        in: path
        description: Unique string used to identify the domain that this certificate should be associated with.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.domain_cert_v4'
          description: OK
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.domain_cert_v4'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: UpdateDomainCertV4
      x-maturity:
      - Beta
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateDomainCertV4Request'
      summary: Update domain cert V4
      x-summary-source: derived
    get:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: DomainSid
        in: path
        description: Unique string used to identify the domain that this certificate should be associated with.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.domain_cert_v4'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchDomainCertV4
      x-maturity:
      - Beta
      summary: Fetch domain cert V4
      x-summary-source: derived
    delete:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: DomainSid
        in: path
        description: Unique string used to identify the domain that this certificate should be associated with.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteDomainCertV4
      x-maturity:
      - Beta
      summary: Delete domain cert V4
      x-summary-source: derived
  /v1/LinkShortening/Domains/{DomainSid}/Config:
    servers:
    - url: https://messaging.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - config_sid
      - fallback_url
      - callback_url
      - continue_on_failure
      - date_created
      - date_updated
      - url
      - disable_https
      pathType: instance
      mountName: domain_config
    post:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: DomainSid
        in: path
        description: Unique string used to identify the domain that this config should be associated with.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.domain_config'
          description: OK
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.domain_config'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: UpdateDomainConfig
      x-maturity:
      - Beta
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateDomainConfigRequest'
      summary: Update domain config
      x-summary-source: derived
    get:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: DomainSid
        in: path
        description: Unique string used to identify the domain that this config should be associated with.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.domain_config'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchDomainConfig
      x-maturity:
      - Beta
      summary: Fetch domain config
      x-summary-source: derived
  /v1/LinkShortening/MessagingService/{MessagingServiceSid}/DomainConfig:
    servers:
    - url: https://messaging.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - domain_sid
      - config_sid
      - fallback_url
      - callback_url
      - continue_on_failure
      - date_created
      - date_updated
      - url
      - messaging_service_sid
      pathType: instance
      mountName: domain_config_messaging_service
    get:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: MessagingServiceSid
        in: path
        description: Unique string used to identify the Messaging service that this domain should be associated with.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^MG[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.domain_config_messaging_service'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchDomainConfigMessagingService
      x-maturity:
      - Beta
      summary: Fetch domain config messaging service
      x-summary-source: derived
  /v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid}:
    servers:
    - url: https://messaging.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - messaging_service_sid
      - domain_sid
      - url
      pathType: instance
      mountName: linkshortening_messaging_service
    post:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: DomainSid
        in: path
        description: The domain SID to associate with a messaging service. With URL shortening enabled, links in messages sent with the associated messaging service will be shortened to the provided domain
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
        required: true
      - name: MessagingServiceSid
        in: path
        description: A messaging service SID to associate with a domain. With URL shortening enabled, links in messages sent with the provided messaging service will be shortened to the associated domain
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^MG[0-9a-fA-F]{32}$
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.linkshortening_messaging_service'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateLinkshorteningMessagingService
      x-maturity:
      - Beta
      summary: Create linkshortening messaging service
      x-summary-source: derived
    delete:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: DomainSid
        in: path
        description: The domain SID to dissociate from a messaging service. With URL shortening enabled, links in messages sent with the associated messaging service will be shortened to the provided domain
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
        required: true
      - name: MessagingServiceSid
        in: path
        description: A messaging service SID to dissociate from a domain. With URL shortening enabled, links in messages sent with the provided messaging service will be shortened to the associated domain
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^MG[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteLinkshorteningMessagingService
      x-maturity:
      - Beta
      summary: Delete linkshortening messaging service
      x-summary-source: derived
  /v1/LinkShortening/MessagingServices/{MessagingServiceSid}/Domain:
    servers:
    - url: https://messaging.twilio.com
    description: 'TODO: Resource-level docs'
    x-twilio:
      defaultOutputProperties:
      - domain_sid
      - messaging_service_sid
      - url
      pathType: instance
      mountName: linkshortening_messaging_service_domain_association
    get:
      description: ''
      tags:
      - LinkShortening
      parameters:
      - name: MessagingServiceSid
        in: path
        description: Unique string used to identify the Messaging service that this domain should be associated with.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^MG[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v1.linkshortening_messaging_service_domain_association'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchLinkshorteningMessagingServiceDomainAssociation
      x-maturity:
      - Beta
      summary: Fetch linkshortening messaging service domain association
      x-summary-source: derived
components:
  schemas:
    messaging.v1.linkshortening_messaging_service_domain_association:
      type: object
      properties:
        domain_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Domain resource.
        messaging_service_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^MG[0-9a-fA-F]{32}$
          description: The unique string that identifies the messaging service
        url:
          type:
          - string
          - 'null'
          format: uri
    messaging.v1.domain_config_messaging_service:
      type: object
      properties:
        domain_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Domain resource.
        config_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^ZK[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Domain config (prefix ZK).
        messaging_service_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^MG[0-9a-fA-F]{32}$
          description: The unique string that identifies the messaging service
        fallback_url:
          type:
          - string
          - 'null'
          format: uri
          description: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        callback_url:
          type:
          - string
          - 'null'
          format: uri
          description: URL to receive click events to your webhook whenever the recipients click on the shortened links.
        continue_on_failure:
          type:
          - boolean
          - 'null'
          description: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        date_created:
          type:
          - string
          - 'null'
          format: date-time
          description: Date this Domain Config was created.
        date_updated:
          type:
          - string
          - 'null'
          format: date-time
          description: Date that this Domain Config was last updated.
        url:
          type:
          - string
          - 'null'
          format: uri
    messaging.v1.domain_config:
      type: object
      properties:
        domain_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Domain resource.
        config_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^ZK[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Domain config (prefix ZK).
        fallback_url:
          type:
          - string
          - 'null'
          format: uri
          description: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        callback_url:
          type:
          - string
          - 'null'
          format: uri
          description: URL to receive click events to your webhook whenever the recipients click on the shortened links.
        continue_on_failure:
          type:
          - boolean
          - 'null'
          description: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        date_created:
          type:
          - string
          - 'null'
          format: date-time
          description: Date this Domain Config was created.
        date_updated:
          type:
          - string
          - 'null'
          format: date-time
          description: Date that this Domain Config was last updated.
        url:
          type:
          - string
          - 'null'
          format: uri
        disable_https:
          type:
          - boolean
          - 'null'
          description: Customer's choice to send links with/without "https://" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.
    messaging.v1.domain_cert_v4:
      type: object
      properties:
        domain_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Domain resource.
        date_updated:
          type:
          - string
          - 'null'
          format: date-time
          description: Date that this Domain was last updated.
        date_expires:
          type:
          - string
          - 'null'
          format: date-time
          description: Date that the private certificate associated with this domain expires. You will need to update the certificate before that date to ensure your shortened links will continue to work.
        date_created:
          type:
          - string
          - 'null'
          format: date-time
          description: Date that this Domain was registered to the Twilio platform to create a new Domain object.
        domain_name:
          type:
          - string
          - 'null'
          format: uri
          description: Full url path for this domain.
        certificate_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^CW[0-9a-fA-F]{32}$
          description: The unique string that we created to identify this Certificate resource.
        url:
          type:
          - string
          - 'null'
          format: uri
        cert_in_validation:
          description: Optional JSON field describing the status and upload date of a new certificate in the process of validation
    messaging.v1.linkshortening_messaging_service:
      type: object
      properties:
        domain_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^DN[0-9a-fA-F]{32}$
          description: The unique string identifies the domain resource
        messaging_service_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^MG[0-9a-fA-F]{32}$
          description: The unique string that identifies the messaging service
        url:
          type:
          - string
          - 'null'
          format: uri
    UpdateDomainCertV4Request:
      type: object
      required:
      - TlsCert
      properties:
        TlsCert:
          type: string
          description: 'Contains the full TLS certificate and private for this domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail. Twilio uses this information to process HTTPS traffic sent to your domain.'
    UpdateDomainConfigRequest:
      type: object
      properties:
        FallbackUrl:
          type: string
          format: uri
          description: Any requests we receive to this domain that do not match an existing shortened message will be redirected to the fallback url. These will likely be either expired messages, random misdirected traffic, or intentional scraping.
        CallbackUrl:
          type: string
          format: uri
          description: URL to receive click events to your webhook whenever the recipients click on the shortened links
        ContinueOnFailure:
          type: boolean
          description: Boolean field to set customer delivery preference when there is a failure in linkShortening service
        DisableHttps:
          type: boolean
          description: Customer's choice to send links with/without "https://" attached to shortened url. If true, messages will not be sent with https:// at the beginning of the url. If false, messages will be sent with https:// at the beginning of the url. False is the default behavior if it is not specified.
  securitySchemes:
    accountSid_authToken:
      type: http
      scheme: basic
x-maturity:
- name: GA
  description: This product is Generally Available.
- name: Beta
  description: PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution.