canonical: https://jentic.com/apis/civicrm.org/civicrm

# CiviCRM REST API v4

Jentic publishes the only available OpenAPI specification for CiviCRM REST API v4, keeping it validated and agent-ready. CiviCRM is the open-source constituent relationship management system used by non-profits, advocacy groups, and member-based organisations to track contacts, activities, contributions, events, and memberships. The APIv4 layer exposes every CiviCRM entity through a uniform entity-action pattern, so the same call shape (POST /ajax/api4/{entity}/{action}) supports any installed entity. Authentication is via the X-Civi-Auth API key header or a bearer token depending on the site's configuration.

## For AI agents

Read and write CiviCRM contacts, activities, contributions, events, and memberships through a uniform entity-action REST interface. Useful for non-profit and member-organisation workflows that need to sync constituent data with external systems.

## Scope

Does not handle payment processing, email delivery, or website rendering - use for reading and writing CiviCRM constituent, activity, contribution, event, and membership records only.

## Capabilities

- Search and filter CiviCRM contacts by any field through Contact/get
- Create, update, or delete a constituent record with the corresponding Contact action
- Log an activity (call, meeting, email) against one or more contacts via Activity/create
- Pull contribution and donation history with Contribution/get for reporting and reconciliation
- Read event registrations and membership records to drive renewal or follow-up workflows
- Discover the fields and actions available on any installed CiviCRM entity at runtime via getFields and getActions

## Use cases

### Donor and contribution sync to an external dashboard

Pull contributions on a schedule with POST /ajax/api4/Contribution/get and join them to contact records via POST /ajax/api4/Contact/get. This populates an external BI dashboard or accounting system with the same donor view CiviCRM uses internally, and the entity-action pattern means the same client code handles any other CiviCRM entity the team adds later.

Example prompt: Get all contributions in the last 7 days, look up each contact, and write a row to a Google Sheet

### Membership renewal automation

Identify members whose memberships are about to expire by calling POST /ajax/api4/Membership/get with a date filter, look up their contact details, and trigger downstream actions - an email send, a payment link generation, or an Activity/create entry that records the outreach. CiviCRM's APIv4 supports the chaining of these calls without leaving the same entity-action vocabulary.

Example prompt: Find memberships expiring in the next 14 days, then create an Activity of type 'Renewal Reminder' against each member

### Field-aware contact import

Before importing contacts from a spreadsheet, an agent can call POST /ajax/api4/{entity}/getFields with entity=Contact to discover the exact custom fields the site has configured. It then maps spreadsheet columns to those fields and submits Contact/create calls. This adapts to each CiviCRM installation's customisations without hard-coding field names.

Example prompt: Call Contact/getFields, map a CSV row to the returned schema, and POST a Contact/create for each row

### Agent integration via Jentic

Through Jentic, an agent helping a non-profit can resolve intents like 'log a phone call with Maria' to the correct CiviCRM action without knowing the entity-action URL pattern. The X-Civi-Auth API key is held in the Jentic credential vault and only injected at execution time.

Example prompt: Search Jentic for 'create a CiviCRM activity', load the schema for Activity/create, and execute it with the parsed contact and call notes

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /ajax/api4/Contact/get | Search for contacts |
| POST | /ajax/api4/Contact/create | Create a contact |
| POST | /ajax/api4/Activity/create | Log an activity against contacts |
| POST | /ajax/api4/Contribution/get | Read contributions |
| POST | /ajax/api4/Membership/get | Read memberships |
| POST | /ajax/api4/Event/get | Read events |
| POST | /ajax/api4/{entity}/getFields | Discover fields on any entity |
| POST | /ajax/api4/{entity}/{action} | Generic entity-action endpoint |

## Key resources

- **Contacts** — Core constituent records - get, create, update, delete
- **Activities** — Calls, meetings, emails, and other interactions logged against contacts
- **Contributions** — Donations and financial transactions tied to contacts
- **Events** — Event records and their participant data
- **Memberships** — Membership tiers, status, and expiry dates
- **Generic** — Entity introspection via getFields and getActions for any installed entity

## Why Jentic

- **Setup:** Wiring the CiviCRM REST API by hand means pointing at your own CiviCRM site host, choosing between its X-Civi-Auth key and bearer token, and posting APIv4 entity actions yourself. Through Jentic you install once, import the CiviCRM REST API v4 from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** CiviCRM addresses records through the entity and action in the request path and body (Contact/get, Activity/create), so scope the agent to the operations it needs, such as reading contacts and contributions. You choose the operations it may call, so creating contacts or activities is not included unless you add it.
- **Credential handling:** Your CiviCRM API key or bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find a CiviCRM contact' or 'read contribution records', and Jentic returns the matching CiviCRM operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Clarkup API** — Clarkup is a small-business contact and pipeline tool that overlaps with CiviCRM's contact-management surface for commercial use.
- **Cituro API** — Cituro handles appointment booking that can attach to a CiviCRM contact's record as the source of truth.
- **Clarra API** — Clarra adds matter and case management that some non-profit legal aid programmes pair with CiviCRM constituents.

## FAQ

### Why is there no official OpenAPI spec for CiviCRM REST API v4?

CiviCRM does not publish an OpenAPI specification - the upstream reference is the APIv4 Explorer in the CiviCRM admin UI. Jentic generates and maintains this spec from the documented entity-action contract so AI agents and developers can call CiviCRM through structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the CiviCRM REST API use?

CiviCRM accepts an API key in the X-Civi-Auth header, or a bearer token, depending on how the site is configured. Through Jentic, the credential is stored encrypted and injected only at execution time so the agent never sees the raw key.

### Can I create and update contacts with the CiviCRM API?

Yes. POST /ajax/api4/Contact/create creates a contact, /Contact/update modifies one, /Contact/get searches, and /Contact/delete removes one. The same entity-action pattern works for Activities, Contributions, Events, and Memberships.

### How do I log an activity against a contact through Jentic?

Search Jentic for 'create a CiviCRM activity'. Jentic returns POST /ajax/api4/Activity/create with its input schema (contact id, activity type, subject, status). Load the schema, fill in the values, and execute - no need to remember the entity-action URL convention.

### What are the rate limits for the CiviCRM REST API?

Rate limits are not declared in the API itself - CiviCRM is typically self-hosted, so throughput is governed by the host's web server and database. For shared or hosted CiviCRM installs, check with the operator before running large bulk imports.

### How does the entity-action URL pattern work?

Every APIv4 call has the shape POST /ajax/api4/{entity}/{action}. For example, /ajax/api4/Membership/get reads memberships and /ajax/api4/Event/create creates an event. You can discover the actions and fields available on a given entity by calling /ajax/api4/{entity}/getActions and /ajax/api4/{entity}/getFields.

### Can I limit what my agent is allowed to do with the CiviCRM REST API?

Yes. Because Jentic One is self-hosted by you, your own rules decide which CiviCRM operations and credentials the agent can use. CiviCRM addresses records through the entity and action in the request, so you can scope the agent to just the operations it needs, such as reading contacts with Contact/get and contributions with Contribution/get. Write operations like Contact/create or Activity/create are not included unless you explicitly grant them.
