Create Integration

Create Integration

POST https://api.ocamba.com/v1/hood/integrations
Creates an Integration

Note
The settings may differ according to the provider id.

Rate limits:

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

Request schema

body

Response schemas

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

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/integrations");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "name" => "Example Twilio",
    "provider_id" => "1000",
    "settings" => [
      "account_sid" => "AC7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "auth_token" => "464XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "default_phone_number" => "+121XXXXXXXXX"
    ],
    "status" => "active"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/integrations" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Example Mitto",
  "provider_id": "1004",
  "settings": {
    "api_key": "AScs8XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "sender_name": "Example Name"
  },
  "status": "active"
}'
const url = 'https://api.ocamba.com/v1/hood/integrations';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "name": "Example Mitto",
      "provider_id": "1004",
      "settings": {
        "api_key": "AScs8XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "sender_name": "Example Name"
      },
      "status": "active"
    }
  )
};

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/integrations");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "name" => "Example Mitto",
    "provider_id" => "1004",
    "settings" => [
      "api_key" => "AScs8XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "sender_name" => "Example Name"
    ],
    "status" => "active"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/integrations" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "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"
}'
const url = 'https://api.ocamba.com/v1/hood/integrations';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "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"
    }
  )
};

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/integrations");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "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"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/integrations" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "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"
}'
const url = 'https://api.ocamba.com/v1/hood/integrations';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "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"
    }
  )
};

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/integrations");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "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"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/integrations" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "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"
}'
const url = 'https://api.ocamba.com/v1/hood/integrations';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "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"
    }
  )
};

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/integrations");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "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"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl -X POST \
 "https://api.ocamba.com/v1/hood/integrations" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Example Mailgun",
  "provider_id": "1005",
  "settings": {
    "api_key": "568cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXX-XXXXXXXX",
    "domain": "sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org",
    "sender_email": "[email protected]",
    "sender_name": "John Doe"
  },
  "status": "active"
}'
const url = 'https://api.ocamba.com/v1/hood/integrations';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "name": "Example Mailgun",
      "provider_id": "1005",
      "settings": {
        "api_key": "568cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXX-XXXXXXXX",
        "domain": "sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org",
        "sender_email": "[email protected]",
        "sender_name": "John Doe"
      },
      "status": "active"
    }
  )
};

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/integrations");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "name" => "Example Mailgun",
    "provider_id" => "1005",
    "settings" => [
      "api_key" => "568cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXX-XXXXXXXX",
      "domain" => "sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org",
      "sender_email" => "[email protected]",
      "sender_name" => "John Doe"
    ],
    "status" => "active"
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

201 Created

{
  "id": "1165",
  "company_id": "6197120",
  "name": "Example",
  "type": "sms",
  "provider_id": "1000",
  "settings": {
    "account_sid": "AC7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "auth_token": "464XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "default_phone_number": "+121XXXXXXXXX"
  },
  "status": "active",
  "is_default": false
}

400 Bad Request

{
  "code": 400,
  "title": "Bad request.",
  "message": "The request 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