Create membership
civicrm_create_membershipCreate a membership record for a contact. CiviCRM automatically calculates start and end dates from the membership type duration when omitted.
Instructions
Create a Membership record for a contact. CiviCRM will auto-calculate start/end dates from the membership type's duration if omitted. Requires CIVICRM_ALLOW_WRITES=true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contact_id": "<contact_id>",
"membership_type": "<membership_type>"
},
"name": "civicrm_create_membership"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| extra | No | ||
| source | No | ||
| status | No | Membership status name, e.g. 'New', 'Current', 'Grace', 'Expired'. | New |
| end_date | No | ISO date. If omitted, CiviCRM calculates from the type's duration. | |
| join_date | No | ISO date (YYYY-MM-DD). Defaults to today. | |
| contact_id | Yes | ||
| start_date | No | ISO date. If omitted, CiviCRM calculates from the type's duration. | |
| membership_type | Yes | Membership type name, e.g. 'General', 'Student', 'Lifetime'. |