Create linkshortening messaging service

POST /v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid}

Path parameters

  • DomainSid string Required

    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

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^DN[0-9a-fA-F]{32}$.

  • MessagingServiceSid string Required

    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

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • domain_sid string | null

      The unique string identifies the domain resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^DN[0-9a-fA-F]{32}$.

    • messaging_service_sid string | null

      The unique string that identifies the messaging service

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

    • url string(uri) | null
POST /v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid}
curl \
 --request POST 'https://messaging.twilio.com/v1/LinkShortening/Domains/{DomainSid}/MessagingServices/{MessagingServiceSid}' \
 --user "username:password"
Response examples (201)
{
  "url": "https://messaging.twilio.com/v1/LinkShortening/Domains/DNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingServices/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "domain_sid": "DNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}