Import Profiles

Import Profiles

POST https://api.ocamba.com/v1/hood/profiles/import
Updates existing profiles in the system.

Note
This endpoint is strictly for updating existing profiles. It does not support the creation of new profiles. Updates are performed based on the mandatory id field. Each profile requires id (numeric string, 19–20 characters) and custom_properties (1–100 keys). Each key must be non-empty and at most 255 characters. Custom property type must be omitted or string. Other types such as bool, date, and number are rejected, including when value is null. Set value to a non-empty string to write a property. JSON null deletes that key. Empty string is rejected. Keys omitted from the patch are left unchanged. A 202 Accepted response indicates that the request has been successfully received and queued for processing. It does not guarantee that the data update is completed immediately.

Rate limits:

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

Request schema

body

Response schemas

curl -X POST \
 "https://api.ocamba.com/v1/hood/profiles/import" \
  -H "Authorization: Bearer {TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
  "profiles": [
    {
      "id": "1759319234567890987",
      "custom_properties": {
        "property_1": {
          "type": "string",
          "value": "John Doe"
        },
        "property_2": {
          "type": "string",
          "value": "1234567890"
        }
      }
    },
    {
      "id": "1759319234567890988",
      "custom_properties": {
        "property_1": {
          "type": "string",
          "value": "Jane Doe"
        },
        "property_3": {
          "type": "string",
          "value": "9876543210"
        },
        "old_flag": {
          "type": "string",
          "value": null
        }
      }
    }
  ]
}'
const url = 'https://api.ocamba.com/v1/hood/profiles/import';
const options = {
  method: 'POST',
  headers: {
    Authorization: "Bearer {TOKEN}",
    'Content-Type': "application/json"
  },
  body: JSON.stringify(
    {
      "profiles": [
        {
          "id": "1759319234567890987",
          "custom_properties": {
            "property_1": {
              "type": "string",
              "value": "John Doe"
            },
            "property_2": {
              "type": "string",
              "value": "1234567890"
            }
          }
        },
        {
          "id": "1759319234567890988",
          "custom_properties": {
            "property_1": {
              "type": "string",
              "value": "Jane Doe"
            },
            "property_3": {
              "type": "string",
              "value": "9876543210"
            },
            "old_flag": {
              "type": "string",
              "value": null
            }
          }
        }
      ]
    }
  )
};

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/import");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {TOKEN}",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
  [
    "profiles" => [
      [
        "id" => "1759319234567890987",
        "custom_properties" => [
          "property_1" => [
            "type" => "string",
            "value" => "John Doe"
          ],
          "property_2" => [
            "type" => "string",
            "value" => "1234567890"
          ]
        ]
      ],
      [
        "id" => "1759319234567890988",
        "custom_properties" => [
          "property_1" => [
            "type" => "string",
            "value" => "Jane Doe"
          ],
          "property_3" => [
            "type" => "string",
            "value" => "9876543210"
          ],
          "old_flag" => [
            "type" => "string",
            "value" => null
          ]
        ]
      ]
    ]
  ]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Responses

202 Accepted

{
  "message": "Profiles have been queued for processing.",
  "publish_time": "2026-04-28 12:00:00",
  "request_id": "f2617fdf782b82acce8ce0a4bd5dc3f1",
  "status": "accepted"
}

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