Create Account
Create Account
POST
https://api.ocamba.com/v2/adex/accounts
Creates a new Account objectRequest schema
bodyResponse schemas
›
201
application/json
curl -X POST \
"https://api.ocamba.com/v2/adex/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/adex/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/adex/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
{
"id": "52794322",
"company_id": "1234123",
"creator_id": "1235523",
"status": "active",
"configured_status": "active",
"name": "Demo_account",
"image": "https://path/logo.jpeg",
"contacts": [
{
"id": "95eb301b-6aaf-42ad-a219-ccbd5f4d3d2b",
"value": "[email protected]",
"type": "email"
}
],
"feeds": {
"postbacks": "https://google.com"
},
"is_default": 1,
"create_time": "2021-10-29 12:47:00",
"update_time": "2021-10-30 14:27:26"
}
Responses
Tip
Image upload can only be accomplished using the multipart/form-data, as shown in the example two.