CiviCRM MCP by usefulapi

Work with your own CiviCRM: contacts, contributions, memberships, events; log activities.

使うべきか

品質と安全性

A
説明の品質
100%
スキーマの完全性
92%
命名の品質
80%
ポイズニングのリスク
100%
権限の一致
100%
プロトコルへの準拠
100%

ツール定義とプロトコルへの準拠に関する自動分析に基づいています。

コンテキストコスト

~7,819トークン数(ツール定義)
~2.4 KB一般的なレスポンスサイズ
注意への影響は大きい(128k コンテキストの 6.11%)

これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。

インストール

ワンクリックインストール

これを `claude_desktop_config.json` ファイルに追加してください:

{
  "mcpServers": {
    "civicrm": {
      "url": "https://civicrm.usefulapi.io/mcp"
    }
  }
}

リモートエンドポイント

https://civicrm.usefulapi.io/mcpstreamable-http

できること

ツール一覧

ツール(24)

🟢 読み取り専用🟡 書き込み🔴 削除⚪ 不明
🟢civicrm_whoami

The CiviCRM contact this API key belongs to (contact id, display name, contact type) and how it authenticated. Everything the other tools do is limited to that contact's permissions. GET /civicrm/authx/id, then APIv4 Contact.get.

入力スキーマ

{
  "type": "object",
  "properties": {},
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_search_contacts(query, contact_type, limit, offset)

Find contacts (people, organizations, households) by a word in their name, e-mail address or phone number, optionally of one contact type. Trashed contacts are left out. Returns id, display name, type, primary e-mail and phone. APIv4 Contact.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "query": {
      "description": "Text to look for in the display name, primary e-mail or primary phone (partial match). Leave empty to list contacts by name.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "contact_type": {
      "description": "Only this contact type.",
      "type": "string",
      "enum": [
        "Individual",
        "Organization",
        "Household"
      ]
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_get_contact(contact_id)

One contact by id: name, type, job title, source, communication preferences (do not e-mail, opted out, ...), dates, plus all their e-mail addresses, phone numbers and postal addresses. APIv4 Contact.get, Email.get, Phone.get, Address.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id (the cid in the contact's URL)."
    }
  },
  "required": [
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_contact_notes(contact_id, limit, offset)

The notes recorded on one contact (subject, text, who wrote it, when), newest first. APIv4 Note.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id."
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_relationships(contact_id, active_only, limit, offset)

The relationships of one contact (employee of, spouse of, volunteer for, ...) with the other contact, start and end date and whether it is active. APIv4 Relationship.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id."
    },
    "active_only": {
      "description": "Only active relationships (default true).",
      "type": "boolean"
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_contributions(contact_id, status, financial_type, date_from, date_to, ...)

Contributions (donations, membership dues, event fees) with contact, amount, currency, financial type, status, payment method, date and source, newest first. Filter by contact, status, financial type, date range and minimum amount. Test contributions are left out. APIv4 Contribution.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "description": "Only this contact's contributions.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "description": "Only this status by name, e.g. Completed, Pending, Failed, Cancelled, Refunded.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "financial_type": {
      "description": "Only this financial type by name, e.g. Donation, Member Dues, Event Fee.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "date_from": {
      "description": "Received on or after this date.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "date_to": {
      "description": "Received on or before this date (a plain date includes that whole day).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "min_amount": {
      "description": "Only contributions of at least this amount.",
      "type": "number",
      "minimum": 0,
      "maximum": 1000000000000
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_memberships(contact_id, status, membership_type, ends_before, ends_after, ...)

Memberships with contact, membership type, status (New, Current, Grace, Expired, ...), join, start and end date. Filter by contact, status, type, or those ending before a date (renewal follow-up). Test memberships are left out. APIv4 Membership.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "description": "Only this contact's memberships.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "description": "Only this status by name, e.g. Current, Grace, Expired, Cancelled.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "membership_type": {
      "description": "Only this membership type by name, e.g. General.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "ends_before": {
      "description": "Only memberships that end on or before this date.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "ends_after": {
      "description": "Only memberships that end on or after this date.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_events(title, upcoming_only, active_only, limit, offset)

Events with title, type, start and end date, whether active and public, maximum participants and summary. Upcoming events first when upcoming_only is set. Template events are left out. APIv4 Event.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "title": {
      "description": "Only events whose title contains this text.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "upcoming_only": {
      "description": "Only events that have not ended yet (start date today or later).",
      "type": "boolean"
    },
    "active_only": {
      "description": "Only active events (default true).",
      "type": "boolean"
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_participants(event_id, contact_id, status, limit, offset)

Event registrations with event, contact, status (Registered, Attended, Cancelled, ...), role, registration date and fee. Filter by event, contact or status. Test registrations are left out. APIv4 Participant.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "event_id": {
      "description": "Only this event's participants.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "contact_id": {
      "description": "Only this contact's registrations.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "description": "Only this participant status by name, e.g. Registered, Attended, Cancelled.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_activities(contact_id, activity_type, status, date_from, date_to, ...)

Activities (meetings, phone calls, e-mails, follow-ups, ...) with type, subject, status, date and details, newest first. With contact_id: the activities that contact took part in, with their role (source, target or assignee). Otherwise all activities, optionally of one type or status. APIv4 ActivityContact.get / Activity.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "description": "Only activities this contact is involved in.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "activity_type": {
      "description": "Only this activity type by name, e.g. Meeting, Phone Call, Email, Follow up.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "status": {
      "description": "Only this status by name, e.g. Scheduled, Completed, Cancelled.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "date_from": {
      "description": "On or after this date.",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "date_to": {
      "description": "On or before this date (a plain date includes that whole day).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_cases(contact_id, status, limit, offset)

Cases (CiviCase) with subject, case type, status and dates. With contact_id: the cases that contact is a client of. Needs the CiviCase component to be enabled. APIv4 CaseContact.get / Case.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "description": "Only cases of this client contact.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "description": "Only this case status by name, e.g. Open, Resolved. Applied when no contact_id is given.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_groups(title, active_only, limit, offset)

Contact groups (mailing lists, static groups, smart groups) with title, description, visibility and type. APIv4 Group.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "title": {
      "description": "Only groups whose title contains this text.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "active_only": {
      "description": "Only active groups (default true).",
      "type": "boolean"
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_group_contacts(group_id, contact_id, status, limit, offset)

The members of one static group (or the groups one contact belongs to): contact, group and membership status (Added, Removed, Pending). Smart groups are computed by CiviCRM and not listed here. APIv4 GroupContact.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "group_id": {
      "description": "Members of this group (from civicrm_list_groups).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "contact_id": {
      "description": "The groups of this contact.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "status": {
      "description": "Membership status (default Added).",
      "type": "string",
      "enum": [
        "Added",
        "Removed",
        "Pending"
      ]
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_get_fields(entity, field, action)

The fields of one CiviCRM entity (Contact, Contribution, Event, ...) including custom fields: name, label, data type, whether required, and the allowed options for a pick-list field. Use it to find the right field names for civicrm_query and the right option names for the filters and write tools. APIv4 <Entity>.getFields.

入力スキーマ

{
  "type": "object",
  "properties": {
    "entity": {
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
      "description": "APIv4 entity name, e.g. Contact."
    },
    "field": {
      "description": "Only this field, with its options (e.g. contribution_status_id).",
      "type": "string",
      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}([.][A-Za-z_][A-Za-z0-9_]{0,63}){0,3}(:[a-z_]{1,16})?$"
    },
    "action": {
      "description": "The action the fields are for (default get).",
      "type": "string",
      "enum": [
        "get",
        "create",
        "update"
      ]
    }
  },
  "required": [
    "entity"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_list_entities(search)

The APIv4 entities this CiviCRM site offers (Contact, Contribution, Event, plus those of installed extensions), with a short description. Use the names with civicrm_get_fields and civicrm_query. APIv4 Entity.get.

入力スキーマ

{
  "type": "object",
  "properties": {
    "search": {
      "description": "Only entities whose name or title contains this text.",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_query(entity, select, where, order_by, limit, ...)

Read records of ANY CiviCRM entity with APIv4 Entity.get: choose fields, filter, sort and page. Use civicrm_list_entities and civicrm_get_fields for the names. Field names may be joined (`contact_id.display_name`, `email_primary.email`) or ask for an option's text (`status_id:label`). Examples: entity Tag; entity Campaign with where [{field:'is_active',op:'=',value:true}]; entity Contribution with select ['id','total_amount'] and where [{field:'total_amount',op:'>=',value:1000}]. Read-only; credential fields and system entities (settings, payment processors, mailings, users) are refused.

入力スキーマ

{
  "type": "object",
  "properties": {
    "entity": {
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
      "description": "APIv4 entity name, e.g. Campaign."
    },
    "select": {
      "minItems": 1,
      "maxItems": 40,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}([.][A-Za-z_][A-Za-z0-9_]{0,63}){0,3}(:[a-z_]{1,16})?$"
      },
      "description": "Fields to return."
    },
    "where": {
      "description": "Filters, all of which must match.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}([.][A-Za-z_][A-Za-z0-9_]{0,63}){0,3}(:[a-z_]{1,16})?$"
          },
          "op": {
            "type": "string",
            "enum": [
              "=",
              "!=",
              "<>",
              "<",
              ">",
              "<=",
              ">=",
              "LIKE",
              "NOT LIKE",
              "IN",
              "NOT IN",
              "BETWEEN",
              "NOT BETWEEN",
              "CONTAINS",
              "IS NULL",
              "IS NOT NULL",
              "IS EMPTY",
              "IS NOT EMPTY"
            ],
            "description": "Operator. IS NULL, IS NOT NULL, IS EMPTY and IS NOT EMPTY take no value; IN, NOT IN and BETWEEN take a list."
          },
          "value": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 500
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  }
                ]
              },
              {
                "maxItems": 200,
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 500
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                }
              }
            ]
          }
        },
        "required": [
          "field",
          "op"
        ]
      }
    },
    "order_by": {
      "description": "Sort order.",
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}([.][A-Za-z_][A-Za-z0-9_]{0,63}){0,3}(:[a-z_]{1,16})?$"
          },
          "direction": {
            "type": "string",
            "enum": [
              "ASC",
              "DESC"
            ]
          }
        },
        "required": [
          "field"
        ]
      }
    },
    "limit": {
      "description": "Records per call, 1-100 (default 25).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 100
    },
    "offset": {
      "description": "How many records to skip (default 0). Pass the previous reply's next_offset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "entity",
    "select"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡civicrm_create_contact(contact_type, first_name, last_name, organization_name, household_name, ...)

WRITE: creates ONE new contact (an individual, organization or household) and optionally its first e-mail address and phone number. Does not check for duplicates: search first with civicrm_search_contacts. Sends nothing. APIv4 Contact.create, Email.create, Phone.create.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_type": {
      "type": "string",
      "enum": [
        "Individual",
        "Organization",
        "Household"
      ],
      "description": "Individual, Organization or Household."
    },
    "first_name": {
      "description": "Individual: first name.",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "last_name": {
      "description": "Individual: last name.",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "organization_name": {
      "description": "Organization: its name.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "household_name": {
      "description": "Household: its name.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "job_title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "source": {
      "description": "Where this contact came from (free text).",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "email": {
      "description": "First e-mail address (stored as the primary one).",
      "type": "string",
      "maxLength": 254,
      "pattern": "^[^\\s,;<>\"'()[\\]\\\\@]+@[^\\s,;<>\"'()[\\]\\\\@]+\\.[^\\s,;<>\"'()[\\]\\\\@]+$"
    },
    "phone": {
      "description": "First phone number (stored as the primary one).",
      "type": "string",
      "minLength": 3,
      "maxLength": 40,
      "pattern": "^[0-9+()\\-. xX#*]+$"
    }
  },
  "required": [
    "contact_type"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴civicrm_update_contact(contact_id, first_name, last_name, organization_name, household_name, ...)

WRITE: changes basic fields of ONE existing contact (name, job title, source, preferred language) and/or its communication preferences (do not e-mail, do not phone, do not mail, do not SMS, opted out of bulk mail). Only the fields you give are changed. Setting a do-not flag to false re-enables contact the person may have declined, so only do that on the person's request. APIv4 Contact.update.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id."
    },
    "first_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "last_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "organization_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "household_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "job_title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "source": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "preferred_language": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32,
      "pattern": "^[A-Za-z_-]+$"
    },
    "do_not_email": {
      "type": "boolean"
    },
    "do_not_phone": {
      "type": "boolean"
    },
    "do_not_mail": {
      "type": "boolean"
    },
    "do_not_sms": {
      "type": "boolean"
    },
    "is_opt_out": {
      "description": "Opted out of ALL bulk mailings.",
      "type": "boolean"
    }
  },
  "required": [
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡civicrm_add_contact_note(contact_id, note, subject)

WRITE: adds ONE note to a contact's record, written by the contact this API key belongs to. Sends nothing. APIv4 Note.create.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id the note is about."
    },
    "note": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50000,
      "description": "The note text."
    },
    "subject": {
      "description": "Optional subject line.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "required": [
    "contact_id",
    "note"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡civicrm_log_activity(activity_type, subject, with_contact_ids, details, status, ...)

WRITE: records ONE activity (a meeting, phone call, e-mail, follow-up, ...) with one or more contacts. It only STORES the record: an activity of type Email does not send an e-mail. Added by the contact this API key belongs to unless source_contact_id is given. APIv4 Activity.create.

入力スキーマ

{
  "type": "object",
  "properties": {
    "activity_type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$",
      "description": "Activity type by name, e.g. Meeting, Phone Call, Email, Follow up (see civicrm_get_fields Activity, field activity_type_id)."
    },
    "subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Subject line."
    },
    "with_contact_ids": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      },
      "description": "The contact(s) the activity is with."
    },
    "details": {
      "description": "Description.",
      "type": "string",
      "minLength": 1,
      "maxLength": 50000
    },
    "status": {
      "description": "Status by name, e.g. Completed (default), Scheduled, Cancelled.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "activity_date_time": {
      "description": "When it happened or will happen (default now).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "assignee_contact_ids": {
      "description": "Contact(s) assigned to do it.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      }
    },
    "source_contact_id": {
      "description": "Who added it (default: the API key's own contact).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "activity_type",
    "subject",
    "with_contact_ids"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_record_contribution(contact_id, total_amount, financial_type, receive_date, status, ...)

WRITE: records ONE contribution (a donation, a payment received elsewhere) for a contact. It only STORES the financial record: no card is charged, no receipt is e-mailed, and the amount shows up in CiviCRM's reports and the contact's giving history. Check civicrm_list_contributions first to avoid a duplicate. APIv4 Contribution.create.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id of the donor."
    },
    "total_amount": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000000000000,
      "description": "Amount, in the site's currency unless currency is given."
    },
    "financial_type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$",
      "description": "Financial type by name, e.g. Donation, Member Dues, Event Fee, Campaign Contribution."
    },
    "receive_date": {
      "description": "When it was received (default now).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "status": {
      "description": "Contribution status by name: Completed (default), Pending, ...",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "payment_method": {
      "description": "Payment method by name, e.g. Check, Cash, Credit Card, EFT.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "currency": {
      "description": "ISO currency code (default: the site's default).",
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "source": {
      "description": "Where it came from (free text).",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "trxn_id": {
      "description": "Your own reference, e.g. a check number or bank reference.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "required": [
    "contact_id",
    "total_amount",
    "financial_type"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡civicrm_create_membership(contact_id, membership_type, join_date, start_date, end_date, ...)

WRITE: gives ONE contact a membership of a type. CiviCRM works out the dates and status from the type unless you give dates. It does NOT record a payment (use civicrm_record_contribution for that) and sends nothing. APIv4 Membership.create.

入力スキーマ

{
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id."
    },
    "membership_type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$",
      "description": "Membership type by name, e.g. General (see civicrm_get_fields Membership, field membership_type_id)."
    },
    "join_date": {
      "description": "Join date (default today).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "start_date": {
      "description": "Start date (default: calculated by the type).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "end_date": {
      "description": "End date (default: calculated by the type).",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    },
    "source": {
      "description": "Where it came from (free text).",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "required": [
    "contact_id",
    "membership_type"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡civicrm_add_contact_to_group(group_id, contact_id)

WRITE: adds ONE contact to ONE static group. If the group is used as a mailing list, the contact will receive future mailings sent to it, so only add people who agreed. Sends nothing by itself. Adding a contact who is already in the group changes nothing; a contact who was removed from it (or is pending) is set back to Added. APIv4 GroupContact.save matched on group and contact.

入力スキーマ

{
  "type": "object",
  "properties": {
    "group_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Group id (from civicrm_list_groups)."
    },
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id."
    }
  },
  "required": [
    "group_id",
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢civicrm_register_participant(event_id, contact_id, status, role, source)

WRITE: registers ONE contact for ONE event (a participant record). It does not check the event's capacity or fee, does not take payment and sends no confirmation e-mail. APIv4 Participant.create.

入力スキーマ

{
  "type": "object",
  "properties": {
    "event_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "Event id (from civicrm_list_events)."
    },
    "contact_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "description": "CiviCRM contact id."
    },
    "status": {
      "description": "Participant status by name: Registered (default), Attended, Pending from pay later, ...",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "role": {
      "description": "Role by name: Attendee (default), Volunteer, Host, Speaker.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[\\p{L}\\p{N} _().,&'/-]+$"
    },
    "source": {
      "description": "Where it came from (free text).",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "required": [
    "event_id",
    "contact_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

コミュニティ

このサーバーを評価する

エビデンス

最近の観測

検証済みバージョンは記録されていませんツール 24 件