Introduction Last updated: 06-08-2023

  Welcome to the GO4Contact API Documentation. Here, we introduce three essential features that empower your application's capabilities: SMS integration, Email functionality, and Two-Factor Authentication (2FA).

GO4Contact provides specialized tools for each feature while ensuring a harmonious experience. Whether you're enhancing user engagement through SMS, delivering crucial information via email, or fortifying security with 2FA, our API streamlines the process. You have the flexibility to adopt one or all features based on your needs.

Furthermore, our API's seamless design allows effortless transitions between SMS, Email, and 2FA functionalities. Dive into the dedicated sections below to uncover the potential of GO4Contact API for transforming your app's communication and security landscape.

Thank you for choosing the GO4Contact API to enhance your application's communication and security features. Let's dive in and create amazing experiences together!

SMS

  Introducing the GO4Contact SMS API – your gateway to seamless and efficient communication. With our SMS API, you can effortlessly send SMS messages to multiple recipients, create personalized templates, and even schedule messages for future delivery. Whether you're sending updates, alerts, or promotions, our API provides a reliable and user-friendly solution to ensure your messages reach the right audience at the right time. Streamline your messaging strategy with ease using the GO4Contact SMS API.

SMS API

GET  Message List

https://go4.contact/api/v1/sms/list
Authorization Bearer Token
Token Api Management Token
Query Params
pageNo 1 Page Number
limitPerPage 10 Limit Per Page
status 2 1 = "Scheduled" | 2 = "Pending" | 3 = "Sending" | 4 = "Sent" | 5 = "Failed"
curl --location --globoff 'https://go4.contact/api/v1/sms/list?pageNo=1&limitPerPage=10&status=2'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pageNo": "1",
        "limitPerPage": "10",
        "messageList": [
            {
                "id": 1,
                "source": "API",
                "recipient": "628225341xxxx",
                "message": "Greetings ladies and gentleman this is the message : Testing",
                "cost": 0.311,
                "status": "Pending"
            },
            {
                "id": 2,
                "source": "API",
                "recipient": "628225341xxxx",
                "message": "Greetings ladies and gentleman this is the message : Testing",
                "cost": 0.311,
                "status": "Pending"
            }
        ]
    }
}

GET  Message Detail

https://go4.contact/api/v1/sms/{$messageId}
Authorization Bearer Token
Token Api Management Token
curl --location --globoff 'https://go4.contact/api/v1/sms/1'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "message": {
            "id": 1,
            "source": "API",
            "recipient": "628225341xxxx",
            "message": "Greetings ladies and gentleman this is the message : Testing",
            "cost": 0.311,
            "status": "Pending"
        }
    }
}

GET  Template List

https://go4.contact/api/v1/sms/template/list
Authorization Bearer Token
Token Api Management Token
Query Params
pageNo 1 Page Number
limitPerPage 10 Limit Per Page
curl --location --globoff 'https://go4.contact/api/v1/sms/template/list?pageNo=1&limitPerPage=10'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "templateList": [
            {
                "id": 1,
                "name": "Greetings",
                "content": "Greetings ladies and gentleman this is the message : {message}"
            }
        ]
    }
}

GET  Template Detail

https://go4.contact/api/v1/sms/template/{$templateId}
Authorization Bearer Token
Token Api Management Token
curl --location --globoff 'https://go4.contact/api/v1/sms/template/1'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "template": {
            "id": 1,
            "name": "Greetings",
            "content": "Greetings ladies and gentleman this is the message : {message}"
        }
    }
}

POST  Send SMS

https://go4.contact/api/v1/sms/send
Authorization Bearer Token
Token Api Management Token
{
    "sourceAddress": "GO4Contact",
    "recipients": [
        "628225341xxxx",
        "628235001xxxx"
    ],
    "message": "Testing",
    "templateId": 1,
    "scheduleDate": "01-04-2023 12:00"
}
curl --location --globoff 'https://go4.contact/api/v1/sms/send' \ --data '{
    "sourceAddress": "GO4Contact",
    "recipients": [
        "628225341xxxx",
        "628235001xxxx"
    ],
    "message": "Testing",
    "templateId": 1,
    "scheduleDate": "01-04-2023 12:00"
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "messageList": [
            {
                "id": 3,
                "source": "API",
                "source_address": "GO4Contact",
                "recipient": "628225341xxxx",
                "message": "Greetings ladies and gentleman this is the message : Testing",
                "cost": 0.311,
                "status": "Pending"
            },
            {
                "id": 4,
                "source": "API",
                "source_address": "GO4Contact",
                "recipient": "628225341xxxx",
                "message": "Greetings ladies and gentleman this is the message : Testing",
                "cost": 0.311,
                "status": "Pending"
            }
        ]
    }
}

Email

  Discover the power of the GO4Contact Email API – your tool for streamlined and effective communication. Our API empowers you to effortlessly send emails to multiple recipients, craft personalized templates, and even schedule messages for future delivery. Whether you're delivering important updates, notifications, or promotional content, our user-friendly features ensure your emails reach the right recipients at the optimal time. Elevate your email communication strategy with ease using the GO4Contact Email API.

Email API

GET  Email List

https://go4.contact/api/v1/email/list
Authorization Bearer Token
Token Api Management Token
Query Params
pageNo 1 Page Number
limitPerPage 10 Limit Per Page
status 2 1 = "Pending" | 2 = "Sending" | 3 = "Sent" | 4 = "Failed" | 5 = "Scheduled"
curl --location --globoff 'https://go4.contact/api/v1/email/list?pageNo=1&limitPerPage=10&status=2'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pageNo": "1",
        "limitPerPage": "10",
        "mailMessageList": [
            {
                "hash": "6c6cd491-a27c-4180-8f68-a4c2533a2872",
                "source": "API",
                "assigned_date": "14-04-2023 02:26:00",
                "subject": "Testing Email 1",
                "from_email": "thisisaemail@gmail.com",
                "recipient_email": "thisisanotheremail@gmail.com",
                "cost": 0.5,
                "status": "Pending"
            },
            {
                "hash": "448a32f5-ce87-48c7-8333-b33829bfe78f",
                "source": "API",
                "assigned_date": "14-04-2023 02:26:00",
                "subject": "Testing Email 2",
                "from_email": "thisisaemail@gmail.com",
                "recipient_email": "thisisanotheremail@gmail.com",
                "cost": 0.5,
                "status": "Pending"
            }
        ]
    }
}

GET  Email Detail

https://go4.contact/api/v1/email/{$hash}
Authorization Bearer Token
Token Api Management Token
curl --location --globoff 'https://go4.contact/api/v1/email/1'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "mailMessage": {
            "id": 1,
            "user_id": 1,
            "contact_id": 1,
            "mail_campaign_id": 1,
            "source": 1,
            "source_str": "API",
            "recipient_email": "thisisemail@gmail.com",
            "subject": "Testing Email 1",
            "message": "Hello this is email testing",
            "from_name": "John Doe",
            "from_email": "thisisanotheremail@gmail.com",
            "message_id": null,
            "schedule_date": null,
            "assigned_date": "2023-04-14 02:26:00",
            "sent_date": null,
            "unsubscribed_date": null,
            "opened_date": null,
            "clicked_date": null,
            "open_count": null,
            "click_count": null,
            "price": 0.5,
            "status": 1,
            "status_str": "Pending",
            "failed_date": null,
            "failed_cause": null,
            "failed_severity": null,
            "deleted_at": null,
            "created_at": "2023-04-13T16:26:00.000000Z",
            "updated_at": "2023-04-13T16:26:00.000000Z"
        }
    }
}

GET  Email Template List

https://go4.contact/api/v1/email/template/list
Authorization Bearer Token
Token Api Management Token
Query Params
pageNo 1 Page Number
limitPerPage 10 Limit Per Page
curl --location --globoff 'https://go4.contact/api/v1/email/template/list?pageNo=1&limitPerPage=10'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "templateList": [
            {
                "id": 1,
                "name": "Greetings",
                "content": "Greetings ladies and gentleman this is the message : {message}"
            }
        ]
    }
}

GET  Email Template Detail

https://go4.contact/api/v1/email/template/{$templateId}
Authorization Bearer Token
Token Api Management Token
curl --location --globoff 'https://go4.contact/api/v1/email/template/1'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "template": {
            "id": 1,
            "name": "Greetings",
            "content": "Greetings ladies and gentleman this is the message : {message}"
        }
    }
}

POST  Send Email

https://go4.contact/api/v1/email/send
Authorization Bearer Token
Token Api Management Token
{
    "recipients": [
        "thisisemail@gmail.com",
        "thisisanotheremail@gmail.com"
    ],
    "subject": "Testing Email 1",
    "fromName": "John Doe",
    "fromEmail": "thisisalsoemail@gmail.com",
    "message": "Hello this is testing email",
    "templateId": 1,
    "scheduleDate": "01-04-2023 12:00"
}
curl --location --globoff 'https://go4.contact/api/v1/email/send' \ --data '{
    "recipients": [
        "thisisemail@gmail.com",
        "thisisanotheremail@gmail.com"
    ],
    "subject": "Testing Email 1",
    "fromName": "John Doe",
    "fromEmail": "thisisalsoemail@gmail.com",
    "message": "Hello this is testing email",
    "templateId": 1,
    "scheduleDate": "01-04-2023 12:00"
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "messageList": [
            {
                "hash": "6c6cd491-a27c-4180-8f68-a4c2533a2872",
                "source": "API",
                "assigned_date": "14-04-2023 02:26:00",
                "subject": "Testing Email 1",
                "from_email": "thisisalsoemail@gmail.com",
                "recipient_email": "thisisemail@gmail.com",
                "cost": 0.5,
                "status": "Pending"
            },
            {
                "hash": "448a32f5-ce87-48c7-8333-b33829bfe78f",
                "source": "API",
                "assigned_date": "14-04-2023 02:26:00",
                "subject": "Testing Email 1",
                "from_email": "thisisalsoemail@gmail.com",
                "recipient_email": "thisisanotheremail@gmail.com",
                "cost": 0.5,
                "status": "Pending"
            }
        ]
    }
}

Two Factor Authentication

  Introducing the GO4Contact Two-Factor Authentication (2FA) API – a robust solution to enhance your application's security. With our API, you can effortlessly send PIN codes via SMS or email, personalize PIN messages using customizable templates, and seamlessly configure 2FA for your application. Strengthen your user accounts and protect sensitive data by implementing a secure and user-friendly 2FA solution. Elevate your application's security strategy effortlessly with the GO4Contact 2FA API.

You need to configure 2FA Application from your dashboard to get the necessary paramater, you can also create custom template for Message and Email to start sending 2FA PIN with your personalized message.

Two Factor Authentication API

GET  Two Factor Authentication PIN List

https://go4.contact/api/v1/2fa/pins/list
Authorization Bearer Token
Token Api Management Token
Query Params
pageNo 1 Page Number
limitPerPage 10 Limit Per Page
status 2 1 = "Pending" | 2 = "Sent" | 3 = "Failed" | 4 = "Expired" | 5 = "Verified"
curl --location --globoff 'https://go4.contact/api/v1/2fa/pins/list?pageNo=1&limitPerPage=10&status=2'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pageNo": "1",
        "limitPerPage": "10",
        "pinsList": [
            {
                "id": 1,
                "refId": "PIN-1",
                "pinId": "CTYAGSLAFYSMXR78FRR63T2M17QNIKWO",
                "pin": 123123,
                "sent_to": "62821xxxxxxxx",
                "attempts_remaining": 5,
                "expired_at": "2023-08-06 12:12:12"
            },
            {
                "id": 2,
                "refId": null,
                "pinId": "USB4PWLCIHX0CTPBIDAVVFU4DAO1PQBY",
                "pin": 456456,
                "sent_to": "thisisemail@gmail.com",
                "attempts_remaining": 5,
                "expired_at": "2023-08-06 12:12:12"
            }
        ]
    }
}

GET  Two Factor Authentication PIN Detail

https://go4.contact/api/v1/2fa/pins/{$pinId}
Authorization Bearer Token
Token Api Management Token
curl --location --globoff 'https://go4.contact/api/v1/2fa/pins/CTYAGSLAFYSMXR78FRR63T2M17QNIKWO'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pin": {
            "id": 1,
            "user_id": 1,
            "app_id": 1,
            "pin": 123123,
            "appId": "PXKZXPQEI7XUZYJKFWOXITG9COHJZHUL",
            "pinId": "CTYAGSLAFYSMXR78FRR63T2M17QNIKWO",
            "refId": "PIN-1",
            "sent_to": "62821xxxxxxxx",
            "placeholders": "{\"first_name\":\"GO4\",\"last_name\":\"Contact\",\"email\":\"thisisemail@gmail.com\"}",
            "attempts_remaining": 5,
            "expired_at": "2023-08-06 12:12:12",
            "sentVia": 1,
            "status": 1,
            "deleted_at": null,
            "created_at": "2023-08-06 12:12:12",
            "updated_at": "2023-08-06 12:12:12"
        }
    }
}

POST  Send Two Factor Authentication PIN (Via SMS)

https://go4.contact/api/v1/2fa/send
Authorization Bearer Token
Token Api Management Token
{
    "appId": "U0I8U7K9E2IOVRC6JQKEW6ZD9O2OVD22",
    "sendTo": "62821xxxxxxxx",
    "refId": "PIN-1",
    "placeholders": {
        "first_name": "GO4",
        "last_name": "Contact",
        "email": "thisisemail@gmail.com"
    }
}
curl --location --globoff 'https://go4.contact/api/v1/2fa/send' \ --data '{
    "appId": "U0I8U7K9E2IOVRC6JQKEW6ZD9O2OVD22",
    "sendTo": "62821xxxxxxxx",
    "refId": "PIN-1",
    "placeholders": {
        "first_name": "GO4",
        "last_name": "Contact",
        "email": "thisisemail@gmail.com"
    }
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK",
        "to": "62821xxxxxxxx",
        "status": "Pending",
        "expired_at": "2023-08-06 12:12:12"
    }
}

POST  Send Two Factor Authentication PIN (Via Email)

https://go4.contact/api/v1/2fa/send/email
Authorization Bearer Token
Token Api Management Token
{
    "appId": "U0I8U7K9E2IOVRC6JQKEW6ZD9O2OVD22",
    "sendTo": "thisisemail@gmail.com",
    "refId": "PIN-1",
    "placeholders": {
        "first_name": "GO4",
        "last_name": "Contact",
        "email": "thisisalsoemail@gmail.com"
    }
}
curl --location --globoff 'https://go4.contact/api/v1/2fa/send/email' \ --data '{
    "appId": "U0I8U7K9E2IOVRC6JQKEW6ZD9O2OVD22",
    "sendTo": "thisisemail@gmail.com",
    "refId": "PIN-1",
    "placeholders": {
        "first_name": "GO4",
        "last_name": "Contact",
        "email": "thisisalsoemail@gmail.com"
    }
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK",
        "to": "thisisemail@gmail.com",
        "status": "Pending",
        "expired_at": "2023-08-27 10:21:41"
    }
}

POST  Send Two Factor Authentication PIN (Via Whatsapp)

https://go4.contact/api/v1/2fa/send/whatsapp
Authorization Bearer Token
Token Api Management Token
{
    "appId": "U0I8U7K9E2IOVRC6JQKEW6ZD9O2OVD22",
    "sendTo": "62821xxxxxxxx",
    "refId": "PIN-1",
    "placeholders": {
        "first_name": "GO4",
        "last_name": "Contact",
        "email": "thisisemail@gmail.com"
    }
}
curl --location --globoff 'https://go4.contact/api/v1/2fa/send/whatsapp' \ --data '{
    "appId": "U0I8U7K9E2IOVRC6JQKEW6ZD9O2OVD22",
    "sendTo": "62821xxxxxxxx",
    "refId": "PIN-1",
    "placeholders": {
        "first_name": "GO4",
        "last_name": "Contact",
        "email": "thisisemail@gmail.com"
    }
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK",
        "to": "62821xxxxxxxx",
        "status": "Pending",
        "expired_at": "2023-08-06 12:12:12"
    }
}

POST  Resend Two Factor Authentication PIN

https://go4.contact/api/v1/2fa/resend
Authorization Bearer Token
Token Api Management Token
{
    "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK"
}
curl --location --globoff 'https://go4.contact/api/v1/2fa/resend' \ --data '{
    "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK"
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK",
        "to": "62821xxxxxxxx",
        "status": "Pending"
    }
}

POST  Verify Two Factor Authentication PIN

https://go4.contact/api/v1/2fa/verify
Authorization Bearer Token
Token Api Management Token
{
    "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK",
    "pin": "123123"
}
curl --location --globoff 'https://go4.contact/api/v1/2fa/verify' \ --data '{
    "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK",
    "pin": "123123"
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "pinId": "J5EG409RGA1XS89D7LHGYWHULF0GEUPK",
        "refId": "PIN-1",
        "verified": false,
        "attemptsRemaining": 9
    }
}

Messages

  Introducing the GO4Contact Message API GO4Contact Messages API.

You need to configure Message Application from your dashboard to get the necessary paramater, you can also create custom template for Message and Email to start sending message to platform of your choosing.

Messages API

POST  Send Telegram

https://go4.contact/api/v1/messages/send/telegram/{session_id}
{
    "number": "628225341xxxx",
    "text": "Greetings ladies and gentleman this is the message : Testing",
    "mediaUrl": "google.com\/dummy-image.jpg",
    "mediaData": "fill with base64 data",
    "mediaMimeType": "image\/jpeg"
}
curl --location --globoff 'https://go4.contact/api/v1/messages/send/telegram/rms-acfa16e1-7095-4991-afea-98xxxxxxx' \ --data '{
    "number": "628225341xxxx",
    "text": "Greetings ladies and gentleman this is the message : Testing",
    "mediaUrl": "google.com\/dummy-image.jpg",
    "mediaData": "fill with base64 data",
    "mediaMimeType": "image\/jpeg"
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": []
}

POST  Send Whatsapp

https://go4.contact/api/v1/messages/send/whatsapp/{session_id}
{
    "number": "628225341xxxx",
    "text": "Greetings ladies and gentleman this is the message : Testing",
    "mediaUrl": "google.com\/dummy-image.jpg",
    "mediaData": "fill with base64 data",
    "mediaMimeType": "image\/jpeg"
}
curl --location --globoff 'https://go4.contact/api/v1/messages/send/telegram/rms-acfa16e1-7095-4991-afea-984ad181xxxx' \ --data '{
    "number": "628225341xxxx",
    "text": "Greetings ladies and gentleman this is the message : Testing",
    "mediaUrl": "google.com\/dummy-image.jpg",
    "mediaData": "fill with base64 data",
    "mediaMimeType": "image\/jpeg"
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": []
}

POST  Send Message SMS

https://go4.contact/api/v1/messages/send/sms
{
    "sourceAddress": "GO4Contact",
    "recipients": [
        "628225341xxxx",
        "628235001xxxx"
    ],
    "message": "Testing",
    "templateId": 1,
    "scheduleDate": "01-04-2023 12:00"
}
curl --location --globoff 'https://go4.contact/api/v1/messages/send/telegram' \ --data '{
    "sourceAddress": "GO4Contact",
    "recipients": [
        "628225341xxxx",
        "628235001xxxx"
    ],
    "message": "Testing",
    "templateId": 1,
    "scheduleDate": "01-04-2023 12:00"
}'
{
    "statusCode": 0,
    "statusMessage": "success",
    "data": {
        "messageList": [
            {
                "id": 3,
                "source": "API",
                "sourceAddress": "GO4Contact",
                "recipient": "628225341xxxx",
                "message": "Greetings ladies and gentleman this is the message : Testing",
                "cost": 0.311,
                "status": "Pending"
            },
            {
                "id": 4,
                "source": "API",
                "sourceAddress": "GO4Contact",
                "recipient": "628225341xxxx",
                "message": "Greetings ladies and gentleman this is the message : Testing",
                "cost": 0.311,
                "status": "Pending"
            }
        ]
    }
}