Fetch service

GET /v1/Services/{Sid}

A Messaging Service resource to create, fetch, update, delete or add/remove senders from Messaging Services.

Path parameters

  • Sid string Required

    The SID of the Service resource to fetch.

Responses

  • OK

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

      The SID of the Account that created the resource

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

    • area_code_geomatch boolean | null

      Whether to enable Area Code Geomatch on the Service Instance

    • date_created string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was last updated

    • fallback_method string(http-method) | null

      The HTTP method we use to call fallback_url

      Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

    • Whether to enable Fallback to Long Code for messages sent through the Service instance

    • fallback_url string(uri) | null

      The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. This field will be overridden if the use_inbound_webhook_on_number field is enabled.

    • friendly_name string | null

      The string that you assigned to describe the resource

    • inbound_method string(http-method) | null

      The HTTP method we use to call inbound_request_url

      Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

    • inbound_request_url string(uri) | null

      The URL we call using inbound_method when a message is received by any phone number or short code in the Service. This field will be overridden if the use_inbound_webhook_on_number field is enabled.

    • mms_converter boolean | null

      Whether to enable the MMS Converter for messages sent through the Service instance

    • Reserved

      Values are inherit, enable, or disable.

    • sid string | null

      The unique string that identifies the resource

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

    • smart_encoding boolean | null

      Whether to enable Encoding for messages sent through the Service instance

    • status_callback string(uri) | null

      The URL we call to pass status updates about message delivery

    • sticky_sender boolean | null

      Whether to enable Sticky Sender on the Service instance

    • Reserved

    • url string(uri) | null

      The absolute URL of the Service resource

    • Whether US A2P campaign is registered for this Service.

    • If enabled, the webhook url configured on the phone number will be used and will override the inbound_request_url/fallback_url url called when an inbound message is received.

    • usecase string | null

      A string describing the scenario in which the Messaging Service will be used

    • validity_period integer | null

      How long, in seconds, messages sent from the Service are valid

GET /v1/Services/{Sid}
curl \
 -X GET https://messaging.twilio.com/v1/Services/{Sid} \
 --user "username:password"
Response examples (200)
{
  "account_sid": "string",
  "area_code_geomatch": true,
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "fallback_method": "HEAD",
  "fallback_to_long_code": true,
  "fallback_url": "https://example.com",
  "friendly_name": "string",
  "inbound_method": "HEAD",
  "inbound_request_url": "https://example.com",
  "links": {},
  "mms_converter": true,
  "scan_message_content": "inherit",
  "sid": "string",
  "smart_encoding": true,
  "status_callback": "https://example.com",
  "sticky_sender": true,
  "synchronous_validation": true,
  "url": "https://example.com",
  "us_app_to_person_registered": true,
  "use_inbound_webhook_on_number": true,
  "usecase": "string",
  "validity_period": 42
}
Response examples (200)
{
  "account_sid": "string",
  "area_code_geomatch": true,
  "date_created": "2024-05-04T09:42:00+00:00",
  "date_updated": "2024-05-04T09:42:00+00:00",
  "fallback_method": "HEAD",
  "fallback_to_long_code": true,
  "fallback_url": "https://example.com",
  "friendly_name": "string",
  "inbound_method": "HEAD",
  "inbound_request_url": "https://example.com",
  "links": {},
  "mms_converter": true,
  "scan_message_content": "inherit",
  "sid": "string",
  "smart_encoding": true,
  "status_callback": "https://example.com",
  "sticky_sender": true,
  "synchronous_validation": true,
  "url": "https://example.com",
  "us_app_to_person_registered": true,
  "use_inbound_webhook_on_number": true,
  "usecase": "string",
  "validity_period": 42
}