Example API Call

curl -X 'POST' \
  'https://api.stage.opentact.org/rest/batch' \
  -H 'accept: application/json' \
  -H 'X-Auth-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiOTI1MzY4NmUtMzY5MC00YThhLWI4MTAtNDQ3NmViZDFlNDkxIiwicm9sZSI6IlVzZXIiLCJpYXQiOjE2NzU0MDYwOTEsImV4cCI6MTY3NTQ5MjQ5MX0.QLISrE9Z7d7DrrZ-fqx7ryuXFrAYO5pUsgWsz2AjV_k' \
  -H 'Content-Type: application/json' \
  -d '{
  "outbound_voice_profile": "60f98be5-1c4e-4d2c-b144-55fb9b4c79fd",
  "phones": [
   13019947779

  ],
  "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Say loop=\"3\">Verification code 1234</Say><Hangup/></Response>",
  "tn_lease": "2ed01387-cf80-4c09-b62a-00e170796b84"
}'
{
  "success": true,
  "payload": {
    "outbound_voice_profile": {
      "created_on": "2022-05-30T10:14:00.953Z",
      "modified_on": "2023-02-03T06:37:14.377Z",
      "uuid": "60f98be5-1c4e-4d2c-b144-55fb9b4c79fd",
      "name": "foniotest",
      "is_active": true,
      "tech_prefix": 861045,
      "shaken_sign_policy": 0,
      "account": {}
    },
    "phones": [
      13019947779
    ],
    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Say loop=\"3\">Verification code 1234</Say><Hangup/></Response>",
    "tn_lease": {
      "created_on": "2023-01-31T17:11:44.809Z",
      "modified_on": "2023-01-31T17:11:44.809Z",
      "uuid": "2ed01387-cf80-4c09-b62a-00e170796b84",
      "expired_on": "2023-05-01T17:11:41.720Z",
      "autorenew": true,
      "subscriptions": [
        {},
        {}
      ],
      "tn": {}
    },
    "type": "call_xml",
    "state": "created",
    "created_by": {
      "created_on": "2022-05-30T10:10:40.332Z",
      "modified_on": "2022-12-22T10:22:31.570Z",
      "uuid": "9253686e-3690-4a8a-b810-4476ebd1e491",
      "email": "opentact@fonio.app",
      "phone_number": "05548785556",
      "first_name": "fonio",
      "wss_online": true,
      "last_name": "account",
      "avatar": "https://s3.opentact.org/avatar-stage/9253686e-3690-4a8a-b810-4476ebd1e491.png",
      "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": {}
    },
    "account": {
      "created_on": "2022-05-30T10:10:40.332Z",
      "modified_on": "2022-05-30T10:10:40.548Z",
      "uuid": "59e5c78f-445c-4b21-adfb-c51b347435e6",
      "email": "opentact@fonio.app",
      "name": "fonio account",
      "level": "Level1",
      "deleted_on": null,
      "disabled_on": null,
      "balance": 967.4542
    },
    "total": 1,
    "processing": 1,
    "uuid": "4ac72ce9-429a-4602-99b8-80dff7a10dad",
    "created_on": "2023-02-03T06:44:23.364Z",
    "modified_on": "2023-02-03T06:44:23.364Z",
    "created": 0,
    "preparing": 0,
    "success": 0,
    "failed": 0
  }
}

Last updated