Send Test Notification

Send Test Notification

POST https://api.ocamba.com/v1/hood/test-notification
Returns a list of Providers

Rate limits:

  • Burst: 10/s
  • Steady: 150/m

Request schema

body

Response schemas

204
No Content
curl -X POST \
 "https://api.ocamba.com/v1/hood/test-notification" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '"{\n  \"integration:\"{\n    \"name\": \"Example Twilio\",\n    \"provider_id\": \"1000\",\n    \"settings\": {\n      \"account_sid\": \"AC7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"auth_token\": \"464XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"default_phone_number\": \"+121XXXXXXXXX\"\n    },\n    \"status\": \"active\"\n  },\n  \"recipient\": \"+38163XXXXXXX\"\n  }"'
const url = 'https://api.ocamba.com/v1/hood/test-notification';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    "{\n  \"integration:\"{\n    \"name\": \"Example Twilio\",\n    \"provider_id\": \"1000\",\n    \"settings\": {\n      \"account_sid\": \"AC7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"auth_token\": \"464XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"default_phone_number\": \"+121XXXXXXXXX\"\n    },\n    \"status\": \"active\"\n  },\n  \"recipient\": \"+38163XXXXXXX\"\n  }"
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v1/hood/test-notification");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  "[\n  \"integration:\"[\n    \"name\" => \"Example Twilio\",\n    \"provider_id\" => \"1000\",\n    \"settings\" => [\n      \"account_sid\" => \"AC7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"auth_token\" => \"464XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"default_phone_number\" => \"+121XXXXXXXXX\"\n    ],\n    \"status\" => \"active\"\n  ],\n  \"recipient\" => \"+38163XXXXXXX\"\n  ]"
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/test-notification" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '"{\n  \"integration\": {\n    \"name\": \"Example Mitto\",\n    \"provider_id\": \"1004\",\n    \"settings\": {\n      \"api_key\": \"AScs8XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"sender_name\": \"Example Name\",\n    },\n    \"status\": \"active\"\n  },\n  \"recipient\": \"+38163XXXXXXX\"\n}"'
const url = 'https://api.ocamba.com/v1/hood/test-notification';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    "{\n  \"integration\": {\n    \"name\": \"Example Mitto\",\n    \"provider_id\": \"1004\",\n    \"settings\": {\n      \"api_key\": \"AScs8XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"sender_name\": \"Example Name\",\n    },\n    \"status\": \"active\"\n  },\n  \"recipient\": \"+38163XXXXXXX\"\n}"
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v1/hood/test-notification");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  "[\n  \"integration\" => [\n    \"name\" => \"Example Mitto\",\n    \"provider_id\" => \"1004\",\n    \"settings\" => [\n      \"api_key\" => \"AScs8XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n      \"sender_name\" => \"Example Name\",\n    ],\n    \"status\" => \"active\"\n  ],\n  \"recipient\" => \"+38163XXXXXXX\"\n]"
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/test-notification" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "integration": {
    "name": "Example Custom",
    "provider_id": "1001",
    "settings": {
      "default_sender_email": "[email protected]",
      "default_sender_name": "John Doe",
      "sending_domain": "ex.example.com",
      "port": "587",
      "username": "[email protected]",
      "password": "yourPassword123"
    },
    "status": "active"
  },
  "recipient": "[email protected]"
}'
const url = 'https://api.ocamba.com/v1/hood/test-notification';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "integration": {
        "name": "Example Custom",
        "provider_id": "1001",
        "settings": {
          "default_sender_email": "[email protected]",
          "default_sender_name": "John Doe",
          "sending_domain": "ex.example.com",
          "port": "587",
          "username": "[email protected]",
          "password": "yourPassword123"
        },
        "status": "active"
      },
      "recipient": "[email protected]"
    }
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v1/hood/test-notification");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "integration" => [
      "name" => "Example Custom",
      "provider_id" => "1001",
      "settings" => [
        "default_sender_email" => "[email protected]",
        "default_sender_name" => "John Doe",
        "sending_domain" => "ex.example.com",
        "port" => "587",
        "username" => "[email protected]",
        "password" => "yourPassword123"
      ],
      "status" => "active"
    ],
    "recipient" => "[email protected]"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/test-notification" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "integration": {
    "name": "Example Mailchimp",
    "provider_id": "1002",
    "settings": {
      "api_key": "md-c8XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "default_sender_name": "Example Name",
      "default_sender_email": "[email protected]",
      "default_reply_to_email": "[email protected]"
    },
    "status": "active"
  },
  "recipient": "[email protected]"
}'
const url = 'https://api.ocamba.com/v1/hood/test-notification';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "integration": {
        "name": "Example Mailchimp",
        "provider_id": "1002",
        "settings": {
          "api_key": "md-c8XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "default_sender_name": "Example Name",
          "default_sender_email": "[email protected]",
          "default_reply_to_email": "[email protected]"
        },
        "status": "active"
      },
      "recipient": "[email protected]"
    }
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v1/hood/test-notification");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "integration" => [
      "name" => "Example Mailchimp",
      "provider_id" => "1002",
      "settings" => [
        "api_key" => "md-c8XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "default_sender_name" => "Example Name",
        "default_sender_email" => "[email protected]",
        "default_reply_to_email" => "[email protected]"
      ],
      "status" => "active"
    ],
    "recipient" => "[email protected]"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/test-notification" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "integration": {
    "name": "Example SendGrid",
    "provider_id": "1003",
    "settings": {
      "api_key": "SG.EKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "default_sender_name": "Example Name",
      "default_sender_email": "[email protected]",
      "default_reply_to_email": "[email protected]"
    },
    "status": "active"
  },
  "recipient": "[email protected]"
}'
const url = 'https://api.ocamba.com/v1/hood/test-notification';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "integration": {
        "name": "Example SendGrid",
        "provider_id": "1003",
        "settings": {
          "api_key": "SG.EKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "default_sender_name": "Example Name",
          "default_sender_email": "[email protected]",
          "default_reply_to_email": "[email protected]"
        },
        "status": "active"
      },
      "recipient": "[email protected]"
    }
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v1/hood/test-notification");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "integration" => [
      "name" => "Example SendGrid",
      "provider_id" => "1003",
      "settings" => [
        "api_key" => "SG.EKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "default_sender_name" => "Example Name",
        "default_sender_email" => "[email protected]",
        "default_reply_to_email" => "[email protected]"
      ],
      "status" => "active"
    ],
    "recipient" => "[email protected]"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/test-notification" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '"{\n  \"integration\":{\n    \"name\": \"Example Mailgun\",\n    \"provider_id\": \"1005\",\n    \"settings\": {\n      \"api_key\": \"568cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXX-XXXXXXXX\",\n      \"domain\":\"sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org\"\n      \"sender_email\": \"[email protected]\",\n      \"sender_name\": \"John Doe\",\n    },\n    \"status\": \"active\"\n  },\n  \"recipient\": \"[email protected]\"\n}"'
const url = 'https://api.ocamba.com/v1/hood/test-notification';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    "{\n  \"integration\":{\n    \"name\": \"Example Mailgun\",\n    \"provider_id\": \"1005\",\n    \"settings\": {\n      \"api_key\": \"568cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXX-XXXXXXXX\",\n      \"domain\":\"sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org\"\n      \"sender_email\": \"[email protected]\",\n      \"sender_name\": \"John Doe\",\n    },\n    \"status\": \"active\"\n  },\n  \"recipient\": \"[email protected]\"\n}"
  )
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
$ch = curl_init("https://api.ocamba.com/v1/hood/test-notification");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  "[\n  \"integration\" =>[\n    \"name\" => \"Example Mailgun\",\n    \"provider_id\" => \"1005\",\n    \"settings\" => [\n      \"api_key\" => \"568cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXX-XXXXXXXX\",\n      \"domain\" =>\"sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org\"\n      \"sender_email\" => \"[email protected]\",\n      \"sender_name\" => \"John Doe\",\n    ],\n    \"status\" => \"active\"\n  ],\n  \"recipient\" => \"[email protected]\"\n]"
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

204 No Content

400 Bad Request

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request body is not valid.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}

500 Internal Server Error

{
  "code": 500,
  "title": "Internal server error.",
  "trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses

Note
The default phone number located in the settings differs from the recipient. Both of them should be in the e163 format. The recipient is the actual mobile phone number of the SMS recipient. The default phone number is the phone number of the Twilio account from which the SMS will be sent.
Tip
List the providers if you don’t know the provider id.
Warning
For different providers you will have different type of recipient. It is based on the provider and integration type.