{"id":36983646,"url":"https://github.com/kemonai/zigatext-php","last_synced_at":"2026-01-13T22:58:13.648Z","repository":{"id":57005526,"uuid":"398425244","full_name":"kemonai/zigatext-php","owner":"kemonai","description":"This library helps to easily integrate Zigatext Messaging Platform into your PHP project.","archived":false,"fork":false,"pushed_at":"2022-02-25T17:57:07.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-07T06:20:28.019Z","etag":null,"topics":["birthday","birthday-contact","birthday-message","birthday-sms","bulksms","contact","message","messaging","newsletter","php","sms","sms-api","sms-gatewai-api","sms-messages","sms-newsletter","smsc","subscriber","zigatext"],"latest_commit_sha":null,"homepage":"https://zigatext.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kemonai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-20T23:50:31.000Z","updated_at":"2023-06-03T17:03:20.000Z","dependencies_parsed_at":"2022-08-21T12:10:53.572Z","dependency_job_id":null,"html_url":"https://github.com/kemonai/zigatext-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kemonai/zigatext-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kemonai%2Fzigatext-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kemonai%2Fzigatext-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kemonai%2Fzigatext-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kemonai%2Fzigatext-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kemonai","download_url":"https://codeload.github.com/kemonai/zigatext-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kemonai%2Fzigatext-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["birthday","birthday-contact","birthday-message","birthday-sms","bulksms","contact","message","messaging","newsletter","php","sms","sms-api","sms-gatewai-api","sms-messages","sms-newsletter","smsc","subscriber","zigatext"],"created_at":"2026-01-13T22:58:12.983Z","updated_at":"2026-01-13T22:58:13.640Z","avatar_url":"https://github.com/kemonai.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zigatext-php\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Total Downloads][ico-downloads]][link-downloads]\n\nA PHP API wrapper for [Zigatext](https://zigatext.com/). This library helps to easily integrate Zigatext Messaging Platform into your PHP project.\n\n[![Zigatext](img/zigatext.png?raw=true \"Zigatext\")](https://zigatext.com/)\n\n## Requirements\n- Curl 7.34.0 or latest (Unless using Guzzle)\n- PHP 5.4.0 or latest\n- OpenSSL v1.0.1 or latest\n\n## Install\n\n### Via Composer\n\n``` bash\n    $ composer require kemonai/zigatext-php\n```\n\n### Via download\n\nDownload a release version from the [releases page](https://github.com/kemonai/zigatext-php/releases).\nExtract, then:\n``` php\n    require 'path/to/src/autoload.php';\n```\n\n## IMPORTANT\nThis is the first implementation of Zigatext API version 1.\n\n## Usage\n\nInstantiate Zigatext class and pass you ACCESS-KEY as an argument to the construct. Then you can can start calling resource methods to fulfill your requests\n\n### 0. Prerequisites\nConfirm that your server can conclude a TLSv1.2 connection to Zigatext's servers. Most up-to-date software have this capability. Contact your service provider for guidance if you have any SSL errors.\n\n### 1. Initiate sending message\nWhen you submit message for sending our server queue's the message for delivery and after delivery your callback url is called to notify your system/website that your message has been sent.\n\n```php\n    $zigatext = new Kemonai\\Zigatext(ACCESS-KEY);\n    try\n    {\n        $response = $zigatext-\u003emessage-\u003esend(['sender' =\u003e 'php lib',\n                                        'message' =\u003e 'it is awesome',\n                                        'recipients' =\u003e '23470xxxxxxxx',\n                                        'use_corporate_route' =\u003e true, // [true or false]\n                                        'callback_url' =\u003e 'http://your-website/your-callback-url',  \n                                        ]);\n        var_dump($response);\n\n    } catch(\\Kemonai\\Zigatext\\Exception\\ApiException $e){\n        print_r($e-\u003egetResponseObject());\n        die($e-\u003egetMessage());\n    }\n```\n#### send method parameters\n- `sender` is your custom name/title for your message and is should not exceed 11 characters (space is also counted as character)\n- `recipients` is the phone number(s) you are sending message to\n- `message` is the content you want to send to your recipient(s)\n- `use_corporate_route` can either be true or false. Value 'true' means that you want your message delivers to Do-Not-disturb (DND) numbers for countries that has dnd policy\n- `callback_url` When you submit message for sending our server queue's the message for delivery and after delivery your callback url is called to notify your system/website that your message has been sent. Then you can use the message id passed as query string to retrieve delivery details. This parameter is optional in case you don't want to receive callback.\n\n\n### 2. Scheduling message\nMost of the parameter are the same with `send` method above. Before scheduling message you need to include `time_zone_id`, call `$zigatext-\u003etimezone-\u003elist();` for the list of time zones and their ids. \n\n```php\n    $zigatext = new Kemonai\\Zigatext(ACCESS-KEY);\n    try\n    {\n        $response = $zigatext-\u003emessage-\u003eschedule(['sender' =\u003e 'php lib',\n                                    'message' =\u003e 'it is awesome',\n                                    'recipients' =\u003e '23470xxxxxxxx',\n                                    'use_corporate_route' =\u003e true,\n                                    'callback_url' =\u003e 'http://your-website/your-callback-url',\n                                    'extras' =\u003e [[\n                                        'deliver_at' =\u003e '2019-07-23 10:10',\n                                        'time_zone_id' =\u003e 2,\n                                    ]]]);\n        var_dump($response);\n\n    } catch(\\Kemonai\\Zigatext\\Exception\\ApiException $e){\n        print_r($e-\u003egetResponseObject());\n        die($e-\u003egetMessage());\n    }\n```\n\n- `extras` accepts arrays of delivery times, in case you want your scheduled message to deliver at different times.\n- `time_zone_id` You can call our time zone endpoint to get list of timezones and their ids. It's used to set at what timezone you want your scheduled message to delivery to your recipient(s).\n\n### 3. Add Subscriber to your Newsletter list\nTo add subscriber from your system/website to your Newsletter list, first login to your Zigatext dashboard and create the newsletter list. Next call Newsletter `$zigatext-\u003enewsletter-\u003elist();` to pull your list with their ids.\n\n```php\n    $zigatext = new Kemonai\\Zigatext(ACCESS-KEY);\n    try\n    {\n        $response =  $zigatext-\u003enewsletter-\u003eaddSubscriber([\n                                    'id' =\u003e 2, //sms newsletter id\n                                    'name' =\u003e 'Chibuike Mba',\n                                    'phone_no' =\u003e '23470xxxxxxxx']);\n        var_dump($response);\n\n    } catch(\\Kemonai\\Zigatext\\Exception\\ApiException $e){\n        print_r($e-\u003egetResponseObject());\n        die($e-\u003egetMessage());\n    }\n```\n\n### 4. Add Subscribers to your Newsletter list\nThis is same as adding single subscriber but in this case you add multiple subscribers at once.\n\n```php\n    $zigatext = new Kemonai\\Zigatext(ACCESS-KEY);\n    try\n    {\n        $response =  $zigatext-\u003enewsletter-\u003eaddBulkSubscribers([\n                                        'id' =\u003e 2, //sms newsletter id\n                                        'subscribers' =\u003e [\n                                            [\n                                                'name' =\u003e 'Benjamin Akawu',\n                                                'phone_no' =\u003e '23470xxxxxxxx'\n                                            ],\n                                            [\n                                                'name' =\u003e 'Franklin Nnakwe',\n                                                'phone_no' =\u003e '23480xxxxxxxx'\n                                            ]\n                                        ]\n                                    ]);\n        var_dump($response);\n\n    } catch(\\Kemonai\\Zigatext\\Exception\\ApiException $e){\n        print_r($e-\u003egetResponseObject());\n        die($e-\u003egetMessage());\n    }\n```\n\n### 5. Add Birthday Contact to your Birthday group\nTo add contact from your system/website to your birthday group, first login to your Zigatext dashboard and create the birthday group. Next call Birthday `$zigatext-\u003ebirthday-\u003egetGroupList();` to pull your groups with their ids and `$zigatext-\u003emonth-\u003elist();` for months ids.\n\n```php\n    $zigatext = new Kemonai\\Zigatext(ACCESS-KEY);\n    try\n    {\n        $response =  $zigatext-\u003ebirthday-\u003eaddContactToGroup([\n                                        'group_id' =\u003e 7,\n                                        'name' =\u003e 'Dennis Okonnachi',\n                                        'phone_no' =\u003e '23470xxxxxxxx',\n                                        'day' =\u003e 9,\n                                        'month_id' =\u003e 1,\n                                    ]);\n        var_dump($response);\n\n    } catch(\\Kemonai\\Zigatext\\Exception\\ApiException $e){\n        print_r($e-\u003egetResponseObject());\n        die($e-\u003egetMessage());\n    }\n```\n\n### 6. Add Birthday Contacts to your Birthday group\nThis is same as adding single contact but in this case you add multiple contacts at once.\n\n```php\n    $zigatext = new Kemonai\\Zigatext(ACCESS-KEY);\n    try\n    {\n        $response =  $zigatext-\u003ebirthday-\u003eaddBulkContactsToGroup([\n                                        'group_id' =\u003e 7,\n                                        'contacts' =\u003e [\n                                            [\n                                            'name' =\u003e 'Caleb Uche',\n                                            'phone_no' =\u003e '23470xxxxxxxx',\n                                            'day' =\u003e 9,\n                                            'month_id' =\u003e 1,\n                                            ],\n                                            [\n                                            'name' =\u003e 'Bernard Inyang',\n                                            'phone_no' =\u003e '23480xxxxxxxx',\n                                            'day' =\u003e 19,\n                                            'month_id' =\u003e 3,\n                                            ]\n                                        ]\n                                    ]);\n        var_dump($response);\n\n    } catch(\\Kemonai\\Zigatext\\Exception\\ApiException $e){\n        print_r($e-\u003egetResponseObject());\n        die($e-\u003egetMessage());\n    }\n```\n\n## 7. Closing Notes\n\nGenerally, to make an API request after constructing a Zigatext object, Make a call\n to the resource/method thus: `$zigatext-\u003e{resource}-\u003e{method}()`; for gets,\n  use `$zigatext-\u003e{resource}(id)` and to list resources: `$zigatext-\u003e{resource}s()`.\n\nCurrently, we support: 'message', 'newsletter', 'birthday', 'month', 'balance' and 'timezones'. Check\nour API reference([link-zigatext-api-reference][link-zigatext-api-reference]) for the methods supported. To specify parameters, send as an array.\n\nCheck [SAMPLES](SAMPLES.md) for more sample calls.\n\n### MetadataBuilder\n\nThis class helps you build valid json metadata strings to be sent when making transaction requests.\n```php\n    $builder = new MetadataBuilder();\n```\n\n#### Add metadata\n\nTo turn off automatic snake-casing of Key names, do:\n\n```php\n    MetadataBuilder::$auto_snake_case = false;\n```\n\nbefore you start adding metadata to the `$builder`.\n\n#### Build JSON\n\nFinally call `build()` to get your JSON metadata string.\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Testing\n\n``` bash\n    $ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](.github/CONDUCT.md) for details. Check our [todo list](TODO.md) for features already intended.\n\n## Security\n\nIf you discover any security related issues, please email chibexme@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Kemonai Technologies][link-author]\n- [Chibuike Mba](https://github.com/chibexme)\n- [Caleb Uche](https://github.com/KhalebOBrien)\n- [Yabaconn](https://github.com/yabacon/paystack-php) - followed the style he employed in creating the [Paystack PHP Wrapper](https://github.com/yabacon/paystack-php)\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/kemonai/zigatext-php.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/kemonai/zigatext-php/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/kemonai/zigatext-php.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/kemonai/zigatext-php.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/kemonai/zigatext-php.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/kemonai/zigatext-php\n[link-travis]: https://travis-ci.org/kemonai/zigatext-php\n[link-scrutinizer]: https://scrutinizer-ci.com/g/kemonai/zigatext-php/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/kemonai/zigatext-php\n[link-downloads]: https://packagist.org/packages/kemonai/zigatext-php\n[link-author]: https://github.com/kemonai\n[link-contributors]: ../../contributors\n[link-ozioma-api-reference]: https://zigatext.com/api/docs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkemonai%2Fzigatext-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkemonai%2Fzigatext-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkemonai%2Fzigatext-php/lists"}