Clockwork SMS API
Documentation
Everything you need to know

Ruby gem

A Ruby gem for our SMS API is available to browse and download on Github. You can also install it directly from rubygems.org, by adding the “clockworksms” gem to your Gemfile.

1
2
3
4
5
6
7
8
9
10
11
12
require 'clockwork'

api = Clockwork::API.new( 'API_KEY_GOES_HERE' )
message = api.messages.build( :to => '447000000000', :content => 'Hello World' )
response = message.deliver

if response.success
    puts response.message_id
else
    puts response.error_code
    puts response.error_description
end

Full documentation can be found in the readme file. If you have any questions get in touch.

Code Wrappers

  • C# wrapper
  • Java wrapper
  • Node.js Wrapper
  • PHP Wrapper
  • Python Wrapper
  • Ruby gem
  • VB.NET wrapper

Email Interface

  • Send SMS via email

HTTP Interface

  • Check your credit via HTTP
  • SMS Delivery Receipts via HTTP
  • Receive SMS via HTTP
  • Send SMS via HTTP

XML Interface

  • Check your credit using XML
  • SMS Delivery Receipts in XML
  • Receive SMS in XML
  • Send SMS using XML

Reference

  • API Error Codes
  • Delivery States
  • GSM Character set