Example API Call

Opentact let's you subscribe to different types of events defined as follows:

  • curl -X 'POST' \
      'https://api.stage.opentact.org/rest/event/subscription' \
      -H 'accept: application/json' \
      -H 'X-Auth-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiMjk4NGExY2EtZmZmNy00YzU5LWE2M2ItMzQ2ODE3OWQ3ZGY3Iiwicm9sZSI6IlVzZXIiLCJpYXQiOjE2NzI2Mzk1NjQsImV4cCI6MTY3MjcyNTk2NH0.zSb_Z0ITpBdyTrI43yRRYk5zpHEAcKHVXfE7PzeCmcE' \
      -H 'Content-Type: application/json' \
      -d '{
      "is_active": true,
      "expired_on": "2023-01-02T07:36:44.784Z",
      "channel": "wss",
      "type": "auth"
    }'
  • {
      "success": true,
      "payload": {
        "is_active": true,
        "expired_on": "2023-01-02T07:36:44.784Z",
        "channel": "wss",
        "type": "auth",
        "user": {
          "created_on": "2022-04-26T05:42:05.858Z",
          "modified_on": "2022-04-26T05:42:05.973Z",
          "uuid": "2984a1ca-fff7-4c59-a63b-3468179d7df7",
          "email": "opentact@callify.io",
          "phone_number": "0418145145585",
          "first_name": "callify",
          "wss_online": true,
          "last_name": "testacc",
          "avatar": null,
          "dob": null,
          "gmail_user_id": null,
          "facebook_user_id": null,
          "apple_user_id": null,
          "wechat_user_id": null,
          "role": "User",
          "gender": null,
          "deleted_on": null,
          "account": {
            "created_on": "2022-04-26T05:42:05.858Z",
            "modified_on": "2022-04-26T05:42:05.968Z",
            "uuid": "9df81deb-afa6-436b-8ce9-af54b3e502e4",
            "email": "opentact@callify.io",
            "name": "callify testacc",
            "level": "Level1",
            "deleted_on": null,
            "disabled_on": null,
            "balance": 777.71173
          }
        },
        "uuid": "7099cb76-92a6-4ed4-b695-d1c4edd66b16",
        "created_on": "2023-01-02T07:38:37.390Z",
        "modified_on": "2023-01-02T07:38:37.390Z"
      }
    }

Last updated