Skip to main content

Quickstart Guide

This guide will help you make your first API call to the Cobi Data Ingestion API.

Prerequisites

  • An API key from the Cobi team
  • Basic knowledge of REST APIs
  • A tool to make HTTP requests (like cURL, Postman, or your favorite programming language)

Making Your First API Call

Let’s upload some customer data to get started:
curl -X POST https://api.hellocobi.com/v1/data/customers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "records": [
      {
        "customer_id": "550e8400-e29b-41d4-a716-446655440000",
        "user_id": "550e8400-e29b-41d4-a716-446655440001",
        "region": "US",
        "birthdate": "1990-01-01",
        "gender": "MALE"
      }
    ]
  }'

Example Response

A successful response will look like this:
{
  "status": "success",
  "message": "Records uploaded successfully",
  "count": 1
}

Uploading Different Data Types

The Cobi API supports three types of data:

1. Customer Data

curl -X POST https://api.hellocobi.com/v1/data/customers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"records": [...]}'

2. Transaction Data

curl -X POST https://api.hellocobi.com/v1/data/transactions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"records": [...]}'

3. Offer Data

curl -X POST https://api.hellocobi.com/v1/data/offers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"records": [...]}'

Best Practices

  1. Batch Size: Upload up to 5000 records at a time for optimal performance
  2. Error Handling: Check the response status and handle errors appropriately
  3. Data Validation: Ensure your data matches the required schema before uploading
  4. Rate Limiting: Be mindful of API rate limits and implement appropriate backoff strategies

Next Steps

Need help? Contact our support team at [email protected]