Create Profile

Create Profile

POST https://api.ocamba.com/v1/hood/profiles
Creates a new profile

Tip

To successfully create a profile, it is required to provide either an email or a mobile phone number.

If a phone number is provided, the profile’s country code will be determined based on the phone number, if possible.

Rate limits:

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

Request schema

body

Response schemas

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

Responses

201 Created

{
  "id": "17430755068336100383",
  "company_id": "1234567",
  "status": "1",
  "container_id": "0",
  "app_type": "web",
  "app_name": "",
  "country_code": "DE",
  "region": "0",
  "city": "0",
  "asn": "0",
  "os_id": "0",
  "browser_id": "0",
  "device_id": "0",
  "user_lang": "en",
  "timezone": "",
  "total_pageviews": "0",
  "total_goals": "0",
  "push_wokenup": "0",
  "push_clicks": "0",
  "ad_served": "0",
  "ad_impressions": "0",
  "ad_spam_impressions": "0",
  "ad_clicks": "0",
  "ad_spam_clicks": "0",
  "ad_conversions": "0",
  "metadata": {
    "encrypted": [
      "email",
      "mobile_phone_number"
    ]
  },
  "mobile_phone_number": "* * * * * * * * * *",
  "email": "* * * * * * * * * *",
  "subscription": {
    "sms": {
      "status": "active",
      "create_time": "2025-03-27 11:38:26"
    },
    "email": {
      "status": "active",
      "create_time": "2025-03-27 11:38:26"
    }
  },
  "engagement_score": 0,
  "conversion_score": "0",
  "first_session_date": "2025-03-27",
  "income": "0",
  "cost": "0",
  "full_name": "Jane Doe",
  "create_time": "2025-03-27 11:38:26",
  "update_time": "2025-03-27 11:38:26",
  "total_engagements": "0"
}

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