Create access code
Create an access code for a ticket type, with an optional limit.
MCP tool billetto_write → create_access_code
Does what Generate access code does under Promotions & Offers > Access Codes: it ties the code to one ticket type. The discount comes from that ticket type's own price, so use a ticket type that list_ticket_types shows with needs_access_code true. limit caps the tickets bought with the code in total, not the number of times the code is used. A code gives access to tickets that cost money, so each call needs your OK by default. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| event_id string required | string | Event ID from list_events. |
| ticket_type_id string required | string | Ticket type ID from list_ticket_types. |
| code string required | string | The code buyers type in. |
| limit integer | integer | Most tickets that can be bought with this code in total. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "billetto_write",
"arguments": {
"operation": "create_access_code",
"arguments": {
"event_id": "event_8c41d2",
"ticket_type_id": "ticket_type_8c41d2",
"code": "code"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"event_id": "1204551",
"ticket_type_id": "77122",
"code": "HARBOUR18",
"limit": 30,
"status": "created"
},
"isError": false
}