Skip to main content

Setup your development environment

Get your API key and make your first API call in minutes.
1

Create a Contazen account

Sign up for a free account at app.contazen.ro if you don’t have one already.
2

Set up your company details

Complete your company profile in the dashboard:
  1. Navigate to Company Settings
  2. Fill in your company details:
    • Company name and legal information (CUI, RC)
    • Address and contact information
    • Bank account details (for invoices)
    • Logo and branding
Complete company setup is required before creating invoices.
3

Get your API key

Navigate to Settings → API Keys in your dashboard to create your API key.
You’ll receive a Live key (sk_live_...) for production use. Store it securely - it won’t be shown again.
4

Make your first API call

Test your setup by listing your clients:
curl https://api.contazen.ro/v1/clients \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"

Create your first invoice

Now let’s create a complete invoice with a client in one API call:
curl -X POST https://api.contazen.ro/v1/invoices \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client_data": {
      "type": "b2b",
      "name": "Acme Corp SRL",
      "cui": "RO12345678",
      "address": "Str. Exemplu nr. 123",
      "city": "București",
      "email": "contact@acmecorp.ro"
    },
    "items": [{
      "description": "Web Development Services",
      "quantity": 10,
      "price": 100,
      "vat_rate": 21
    }]
  }'

What’s next?

Authentication

Learn about API keys and security best practices

Error Handling

Understand how to handle API errors gracefully

Client Management

Explore the clients API endpoints

Invoice Creation

Deep dive into invoice creation options

Example Response

A successful invoice creation returns:
{
  "success": true,
  "data": {
    "id": "inv_1a2b3c4d5e",
    "object": "invoice",
    "number": "CTZ-2024-00001",
    "document_type": "fiscal",
    "date": "2024-01-15",
    "due_date": "2024-02-14",
    "client": {
      "id": "9z8y7x6w5v",
      "name": "Acme Corp SRL",
      "cui": "RO12345678"
    },
    "subtotal": 1000.00,
    "vat_amount": 210.00,
    "total": 1210.00,
    "currency": "RON",
    "status": "draft",
    "created_at": 1705334400
  },
  "meta": {
    "version": "v1",
    "response_time": "45.23ms"
  }
}
The invoice is created as a draft by default. You can send it to your client using the send endpoint.