--- title: "API Samples" slug: "api-samples" description: "Explore how to authenticate and use the Web Central API to access calendar categories and events with easy-to-follow examples for retrieving published items securely." updated: 2026-04-22T14:26:26Z published: 2026-04-22T14:26:26Z canonical: "www.civicplus.help/api-samples" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://www.civicplus.help/llms.txt > Use this file to discover all available pages before exploring further. # API Samples ## Examples - **URL:** https://www.mywebsiteURL.org - **Application Programming Interface (****API) DOCS:** https://www.mywebsiteURL.org**/api** - **API Key:** API_Key - **Partition ID:** partition_ID - **Username:** Site_Admin_Need_To_Setup - **Password:** Site_Admin_Need_To_Setup --- ## Authentication Token To use the API you first must get an authentication token. This does not have to be done before every call. - Call the Authenticate method first (/api/Authentication/v1/Authenticate) this will return a token in the **apiKey field** - Sample Successful return:{ "AdditionalInfo": "Success", "Success": true, "apiKey": "API_Key", "UserId": 743, "Message": "Login successful."} - Take the token to make other calls in the UserToken field - The token doesn’t expire until you log out > [!NOTE] > Important Note: > > For security, identifying information is replaced by a label, when you receive your information the keys and ID may be separate. ### Example Calls You can limit your results to only published items by using OData “?$filter=Status eq 'Published'. - **Authenticate:**POST /api/Authentication/v1/Authenticate/Host: mywebsiteURL.orgcontent-type: application/jsonapiKey: API_Keypartition: partition_ID{ "Username": "USERNAME", "Password": "PASSWORD"} - **Get all Calendar Categories:** This will get you all calendar categories (separate calendars). Use the item count to know the number of events under each calendar.GET /api/Calendar/v1/Category/Host: mywebsiteURL.orgcontent-type: application/jsonUserToken: User_API_KeyapiKey: API_Keypartition: partition_ID - **Get all events in a calendar:** We use OData so you can do many cool queries against the data. Note in the below example “22” should be the CategoryID you want to grab.GET /api/Calendar/v1/Item?$filter=CategoryId eq 22&$top=10&$inlinecount=allpages&$orderby=Name descHost: mywebsiteURL.orgcontent-type: application/jsonUserToken: User_API_KeyapiKey: API_Keypartition: partition_ID - **Get full event (52 is the item I want to grab):**GET /api/Calendar/v1/Item/52Host: mywebsiteURL.orgcontent-type: application/jsonUserToken: 6ade72b2-9b63-47a6-b490-a2d75ec6d303apiKey: API_Keypartition: partition_ID Application Programming Interface. A set of rules that allows programmers to develop software for a particular operating system without having to be completely familiar with that operating system. Identification or Identifier.