ClientCasa
API

Webhooks

Subscribe to events with HTTP POST notifications.

GET
/api/v1/webhooks
x-api-key<token>

In: header

Query Parameters

page?integer
Default1
Range1 <= value
pageSize?integer
Default25
Range1 <= value <= 100
enabled?|
event?string
Value in"invoice_sent" | "invoice_due_soon" | "invoice_overdue" | "invoice_paid" | "invoice_payment_failed" | "invoice_disputed" | "invoice_payment_reminder" | "invoice_viewed" | "payment_received" | "payment_refunded" | "payment_applied" | "payment_unapplied" | "payment_deleted" | "payment_chargeback" | "receipt_sent" | "schedule_deposit_ready" | "schedule_installment_due" | "schedule_installment_paid" | "schedule_completed" | "document_processed" | "document_action_created" | "document_action_approved" | "document_needs_review" | "document_failed" | "client_created" | "contact_created" | "project_created" | "time_entry_created" | "lead_created" | "client_won" | "client_lost" | "lead_status_changed" | "milestone_approaching" | "timer_running_reminder" | "contract_sent" | "contract_viewed" | "contract_signed" | "contract_recipient_signed" | "contract_countersigned" | "contract_completed" | "contract_expired" | "contract_voided" | "smart_file_sent" | "smart_file_viewed" | "smart_file_accepted" | "smart_file_completed" | "smart_file_expired" | "form_submission_completed" | "subscription_payment_failed" | "payout_paid" | "payout_failed" | "event_day_created" | "event_day_published" | "event_day_archived" | "timeline_item_completed" | "timeline_reminder_sent"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.clientcasa.com/api/v1/webhooks"
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "string",
      "url": "http://example.com",
      "events": [
        "invoice_sent"
      ],
      "enabled": true,
      "source": "manual",
      "hasSecret": true,
      "lastTriggered": "2019-08-24T14:15:22Z",
      "lastStatus": 0,
      "consecutiveFailures": 0,
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 1,
    "total": 0,
    "totalPages": 0,
    "hasMore": true
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
POST
/api/v1/webhooks
x-api-key<token>

In: header

Header Parameters

Idempotency-Key?string

Optional unique key that makes this create safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://www.clientcasa.com/api/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "url": "http://example.com",    "events": [      "invoice_sent"    ]  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "url": "http://example.com",
  "events": [
    "invoice_sent"
  ],
  "enabled": true,
  "source": "manual",
  "hasSecret": true,
  "lastTriggered": "2019-08-24T14:15:22Z",
  "lastStatus": 0,
  "consecutiveFailures": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
GET
/api/v1/webhooks/{id}
x-api-key<token>

In: header

Path Parameters

id*string

UUID v4

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.clientcasa.com/api/v1/webhooks/550e8400-e29b-41d4-a716-446655440000"
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "url": "http://example.com",
  "events": [
    "invoice_sent"
  ],
  "enabled": true,
  "source": "manual",
  "hasSecret": true,
  "lastTriggered": "2019-08-24T14:15:22Z",
  "lastStatus": 0,
  "consecutiveFailures": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
PATCH
/api/v1/webhooks/{id}
x-api-key<token>

In: header

Path Parameters

id*string

UUID v4

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://www.clientcasa.com/api/v1/webhooks/550e8400-e29b-41d4-a716-446655440000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "string",
  "url": "http://example.com",
  "events": [
    "invoice_sent"
  ],
  "enabled": true,
  "source": "manual",
  "hasSecret": true,
  "lastTriggered": "2019-08-24T14:15:22Z",
  "lastStatus": 0,
  "consecutiveFailures": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
DELETE
/api/v1/webhooks/{id}
x-api-key<token>

In: header

Path Parameters

id*string

UUID v4

Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://www.clientcasa.com/api/v1/webhooks/550e8400-e29b-41d4-a716-446655440000"
Empty
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}