Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/0m1n3m/contacts-db/llms.txt

Use this file to discover all available pages before exploring further.

All contact endpoints require a valid authenticated session and email verification. Destructive operations (delete, bulk delete) are restricted to the admin role; creating and editing contacts requires at least the editor role. Listing, viewing, and exporting contacts are available to any authenticated user.

GET /contacts

Returns the paginated contact list rendered as an HTML Blade view. Supports rich column-level filtering, global search, sorting, and configurable page size via query parameters. Role: any authenticated user
q
string
Global search string. Matches against organisation_name, first_name, last_name, job_title, stakeholder_type, comment, relevant_project_programme, contact_category, relationship_status, country, and all JSON array fields (emails, phones, keywords, organisation_types, expertise_speaking_topics).
sort
string
default:"updated_at"
Column to sort by. Allowed values: contact_category, relationship_status, use_for_events, potential_speaker, organisation_name, first_name, last_name, job_title, country, relevant_project_programme, stakeholder_type, created_at, updated_at. Unknown values fall back to updated_at.
dir
string
default:"desc"
Sort direction. asc or desc.
per_page
integer
default:"25"
Results per page. Accepted values: 10, 25, 50, 100. Any other value falls back to 25.
first_name
string
Case-insensitive substring filter on the first_name column.
last_name
string
Case-insensitive substring filter on the last_name column.
organisation_name
string
Case-insensitive substring filter on the organisation_name column.
stakeholder_type
string
Case-insensitive substring filter on the stakeholder_type column.
comment
string
Case-insensitive substring filter on the comment column.
relevant_project_programme
string
Case-insensitive substring filter on relevant_project_programme.
job_title
string
Case-insensitive substring filter on the job_title column.
contact_category
string
Case-insensitive substring filter on contact_category.
relationship_status
string
Case-insensitive substring filter on relationship_status.
use_for_events
boolean
Filter by event flag. Accepted truthy values: 1, true, yes, y, on. Accepted falsy values: 0, false, no, n, off.
potential_speaker
boolean
Filter by speaker flag. Same truthy/falsy values as use_for_events.
country
string
Filter by country. Pass a 2-letter ISO code (e.g. DE) for an exact match, or a country name substring (e.g. germany) which is resolved against the countries config to find the matching ISO code(s).
emails
string
Search for a value inside the JSON emails array. Pass a plain string — the query wraps it in JSON string delimiters ("value") before performing the LIKE match.
phones
string
Search for a value inside the JSON phones array.
keywords
string
Search for a value inside the JSON keywords array.
organisation_types
string
Search for a value inside the JSON organisation_types array.
expertise_speaking_topics
string
Search for a value inside the JSON expertise_speaking_topics array.
Response: Paginated HTML view (contacts.index). Query string parameters are preserved in pagination links.

POST /contacts

Creates a new contact record. Role: admin or editor
Content-Type: application/x-www-form-urlencoded or multipart/form-data
contact_category
string
required
Category label for the contact. Maximum 255 characters.
relationship_status
string
required
Relationship status label. Maximum 255 characters.
first_name
string
Contact’s first name. Maximum 255 characters.
last_name
string
Contact’s last name. Maximum 255 characters.
organisation_name
string
Organisation or company name. Maximum 255 characters.
job_title
string
Job title or role. Maximum 255 characters.
emails_text
string
One email address per line. The server splits on newlines and stores the result as a JSON array in the emails column.
phones_text
string
One phone number per line. Stored as a JSON array in the phones column.
country
string
2-letter ISO country code or full country name. Maximum 255 characters.
organisation_types_text
string
One organisation type per line. Stored as a JSON array.
keywords_text
string
One keyword per line. Stored as a JSON array.
expertise_speaking_topics
string
One topic per line. Stored as a JSON array.
relevant_project_programme
string
Project or programme association. Maximum 255 characters.
stakeholder_type
string
Stakeholder classification. Maximum 255 characters.
comment
string
Free-text notes. No length limit enforced at the route level.
use_for_events
boolean
Whether to include this contact in event mailing lists.
potential_speaker
boolean
Whether this contact is a potential speaker.
Response: 302 redirect to GET /contacts on success. Validation errors redirect back with $errors in the session.

GET /contacts/

Displays the detail view for a single contact. Role: any authenticated user
Route model binding: resolves by primary key id.
Response: HTML view (contacts.show). Returns 404 if the contact does not exist.

GET /contacts//edit

Displays the edit form for a contact. Role: admin or editor Response: HTML view (contacts.edit). Returns 403 for viewers.

PATCH /contacts/

Updates an existing contact. Accepts the same body fields as POST /contacts. Role: admin or editor
Content-Type: application/x-www-form-urlencoded (include _method=PATCH for HTML forms) or send a true PATCH request.
All fields follow the same validation rules as POST /contacts. contact_category and relationship_status remain required. Response: 302 redirect to GET /contacts/{id} on success.

DELETE /contacts/

Permanently deletes a single contact record. Role: admin only
Contact deletion is permanent and cannot be undone. There is no soft-delete or recycle bin. The record is removed immediately from the database.
Response: 302 redirect to GET /contacts with a status flash message "Contact deleted.". Returns 403 for non-admin users.

POST /contacts/bulk-destroy

Permanently deletes multiple contacts in a single atomic database transaction. Role: admin only
ids
array
required
Array of integer contact IDs to delete. Must contain at least one entry. All IDs must exist in the contacts table.
Bulk deletion is permanent and irreversible. All matching records are removed in a single transaction. Export any data you need before calling this endpoint.
Response: 302 redirect to GET /contacts with a status flash message indicating how many records were deleted (e.g. "Deleted 5 contact(s)."). Returns 403 for non-admin users.

POST /contacts/export

Streams a CSV download of the selected contacts. Role: any authenticated user
ids
array
required
Array of integer contact IDs to include in the export. Must contain at least one entry. All IDs must exist in the contacts table.
The response is a streaming CSV file with the following characteristics:
  • UTF-8 BOM prepended so that Excel opens the file correctly
  • Filename pattern: contacts-selected-YYYYMMDD-HHmmss.csv
  • Header row: id, contact_category, relationship_status, use_for_events, potential_speaker, organisation_name, first_name, last_name, job_title, emails, phones, country, organisation_types, keywords, relevant_project_programme, expertise_speaking_topics, stakeholder_type, comment, created_at, updated_at
  • JSON array columns (emails, phones, organisation_types, keywords, expertise_speaking_topics) are serialised as compact JSON arrays in each cell
  • Boolean columns (use_for_events, potential_speaker) are exported as 1 or 0
  • Records are ordered by id descending and streamed in chunks of 500 rows
Response: 200 with Content-Type: text/csv; charset=UTF-8 and Content-Disposition: attachment.

GET /contacts/import

Displays the CSV/spreadsheet import upload form. Role: admin or editor Response: HTML view (contacts.import.create).

POST /contacts/import/preview

Accepts a spreadsheet file, validates it, and returns a column-mapping preview view. The file is stored temporarily on the server; its path is returned for use in the subsequent run call. Role: admin or editor
Content-Type: multipart/form-data
file
file
required
The file to import. Accepted MIME types: text/csv, text/plain, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx), application/vnd.ms-excel (xls). Maximum size: 10 MB.
Response: HTML view showing the first 10 data rows and a column-mapping form. The stored temporary file path is embedded in the view for the subsequent run request.

POST /contacts/import/run

Executes the import using the mapping confirmed in the preview step. Role: admin or editor
stored_path
string
required
The server-side temporary file path returned by the preview step.
map
object
required
Object mapping Contacts DB field names (keys) to the corresponding column headers in the uploaded file (values). For example: {"first_name": "First Name", "emails_text": "Email"}.
Response: 302 redirect with a flash message summarising import results (rows imported, rows skipped, errors encountered).

Build docs developers (and LLMs) love