Create service

POST /v1/Services

TODO: Resource-level docs

Body

  • AlexaSkillId string

    Deprecated.

  • ApnCredentialSid string

    The SID of the Credential to use for APN Bindings.

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

  • DefaultAlexaNotificationProtocolVersion string

    Deprecated.

  • DefaultApnNotificationProtocolVersion string

    The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

  • DefaultFcmNotificationProtocolVersion string

    The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

  • DefaultGcmNotificationProtocolVersion string

    The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.

  • DeliveryCallbackEnabled boolean

    Callback configuration that enables delivery callbacks, default false

  • DeliveryCallbackUrl string

    URL to send delivery status callback.

  • FacebookMessengerPageId string

    Deprecated.

  • FcmCredentialSid string

    The SID of the Credential to use for FCM Bindings.

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

  • FriendlyName string

    A descriptive string that you create to describe the resource. It can be up to 64 characters long.

  • GcmCredentialSid string

    The SID of the Credential to use for GCM Bindings.

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

  • LogEnabled boolean

    Whether to log notifications. Can be: true or false and the default is true.

  • MessagingServiceSid string

    The SID of the Messaging Service to use for SMS Bindings. This parameter must be set in order to send SMS notifications.

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

Responses

  • 201

    Created

    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}$.

    • alexa_skill_id string | null

      Deprecated

    • apn_credential_sid string | null

      The SID of the Credential to use for APN Bindings

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

    • date_created string(date-time) | null

      The RFC 2822 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The RFC 2822 date and time in GMT when the resource was last updated

    • default_alexa_notification_protocol_version string | null

      Deprecated

    • default_apn_notification_protocol_version string | null

      The protocol version to use for sending APNS notifications

    • default_fcm_notification_protocol_version string | null

      The protocol version to use for sending FCM notifications

    • default_gcm_notification_protocol_version string | null

      The protocol version to use for sending GCM notifications

    • delivery_callback_enabled boolean | null

      Enable delivery callbacks

    • delivery_callback_url string | null

      Webhook URL

    • facebook_messenger_page_id string | null

      Deprecated

    • fcm_credential_sid string | null

      The SID of the Credential to use for FCM Bindings

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

    • friendly_name string | null

      The string that you assigned to describe the resource

    • gcm_credential_sid string | null

      The SID of the Credential to use for GCM Bindings

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

    • log_enabled boolean | null

      Whether to log notifications

    • messaging_service_sid string | null

      The SID of the Messaging Service to use for SMS Bindings

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

    • sid string | null

      The unique string that identifies the resource

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

    • url string(uri) | null

      The absolute URL of the Service resource

POST /v1/Services
curl \
 -X POST https://notify.twilio.com/v1/Services \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'AlexaSkillId=string&ApnCredentialSid=string&DefaultAlexaNotificationProtocolVersion=string&DefaultApnNotificationProtocolVersion=string&DefaultFcmNotificationProtocolVersion=string&DefaultGcmNotificationProtocolVersion=string&DeliveryCallbackEnabled=true&DeliveryCallbackUrl=string&FacebookMessengerPageId=string&FcmCredentialSid=string&FriendlyName=string&GcmCredentialSid=string&LogEnabled=true&MessagingServiceSid=string'
Request example
{
  "AlexaSkillId": "string",
  "ApnCredentialSid": "string",
  "DefaultAlexaNotificationProtocolVersion": "string",
  "DefaultApnNotificationProtocolVersion": "string",
  "DefaultFcmNotificationProtocolVersion": "string",
  "DefaultGcmNotificationProtocolVersion": "string",
  "DeliveryCallbackEnabled": true,
  "DeliveryCallbackUrl": "string",
  "FacebookMessengerPageId": "string",
  "FcmCredentialSid": "string",
  "FriendlyName": "string",
  "GcmCredentialSid": "string",
  "LogEnabled": true,
  "MessagingServiceSid": "string"
}
Request examples
{
  "AlexaSkillId": "string",
  "ApnCredentialSid": "string",
  "DefaultAlexaNotificationProtocolVersion": "string",
  "DefaultApnNotificationProtocolVersion": "string",
  "DefaultFcmNotificationProtocolVersion": "string",
  "DefaultGcmNotificationProtocolVersion": "string",
  "DeliveryCallbackEnabled": true,
  "DeliveryCallbackUrl": "string",
  "FacebookMessengerPageId": "string",
  "FcmCredentialSid": "string",
  "FriendlyName": "string",
  "GcmCredentialSid": "string",
  "LogEnabled": true,
  "MessagingServiceSid": "string"
}
Response examples (201)
{
  "account_sid": "string",
  "alexa_skill_id": "string",
  "apn_credential_sid": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "default_alexa_notification_protocol_version": "string",
  "default_apn_notification_protocol_version": "string",
  "default_fcm_notification_protocol_version": "string",
  "default_gcm_notification_protocol_version": "string",
  "delivery_callback_enabled": true,
  "delivery_callback_url": "string",
  "facebook_messenger_page_id": "string",
  "fcm_credential_sid": "string",
  "friendly_name": "string",
  "gcm_credential_sid": "string",
  "links": {},
  "log_enabled": true,
  "messaging_service_sid": "string",
  "sid": "string",
  "url": "https://example.com"
}
Response examples (201)
{
  "account_sid": "string",
  "alexa_skill_id": "string",
  "apn_credential_sid": "string",
  "date_created": "2025-05-04T09:42:00Z",
  "date_updated": "2025-05-04T09:42:00Z",
  "default_alexa_notification_protocol_version": "string",
  "default_apn_notification_protocol_version": "string",
  "default_fcm_notification_protocol_version": "string",
  "default_gcm_notification_protocol_version": "string",
  "delivery_callback_enabled": true,
  "delivery_callback_url": "string",
  "facebook_messenger_page_id": "string",
  "fcm_credential_sid": "string",
  "friendly_name": "string",
  "gcm_credential_sid": "string",
  "links": {},
  "log_enabled": true,
  "messaging_service_sid": "string",
  "sid": "string",
  "url": "https://example.com"
}