Uncategorized

Creating and Updating Users via API

The Checklick API allows you to create or update user accounts programmatically. Here's how: 1. Ensure you have a valid API key (see "Managing API Keys"). 2. To create a user, use POST /v2/users with a JSON payload including first_name, last_name, email, and birthdate. Example: curl -X POST https://api.checklick.com/v2/users -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/vnd.api+json" -H "Organization-Id: YOUR_ORG_ID" -d '{"data": {"type": "users", "attributes": {"first_name": "John", "last_name": "Doe", "email": "john@example.com", "birthdate": "1990-01-01"}}}'. 3. To update a user, use PATCH /v2/users/{id} with updated attributes. Example: curl -X PATCH https://api.checklick.com/v2/users/123 -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/vnd.api+json" -H "Organization-Id: YOUR_ORG_ID" -d '{"data": {"type": "users", "id": "123", "attributes": {"email": "newemail@example.com"}}}'. Quick tips: * Check the API documentation at https://api.checklick.com/docs for required fields and response formats. * Use HTTPS and include all required headers. * Handle errors like 400 (bad request) or 429 (rate limit) appropriately.