Create Account

Create Account

POST https://api.ocamba.com/v2/ocamba/accounts
Creates a new Account object

Request schema

body

Response schemas

curl -X POST \
 "https://api.ocamba.com/v2/ocamba/accounts" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "new account",
  "status": "active",
  "contacts": [
    {
      "type": "email",
      "value": "[email protected]"
    }
  ],
  "feeds": {
    "postbacks": "test123"
  }
}'
const url = 'https://api.ocamba.com/v2/ocamba/accounts';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "name": "new account",
      "status": "active",
      "contacts": [
        {
          "type": "email",
          "value": "[email protected]"
        }
      ],
      "feeds": {
        "postbacks": "test123"
      }
    }
  )
};

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/v2/ocamba/accounts");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "name" => "new account",
    "status" => "active",
    "contacts" => [
      [
        "type" => "email",
        "value" => "[email protected]"
      ]
    ],
    "feeds" => [
      "postbacks" => "test123"
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

201 Created

Responses