Single Image Banner Section

Unveiling the Power of Mythradon's RESTful APIs

Overview

Mythradon's REST-based JSON APIs offer comprehensive support for all CRUD (Create, Read, Update, Delete) operations across both standard and custom entities. These APIs provide a robust and versatile foundation, enabling seamless interaction and manipulation of data within the Mythradon system. Whether you're working with standard entities or implementing custom structures, our APIs are designed to facilitate efficient management and integration, empowering users to harness the full potential of their data.


Mythradon operates as a single-page application, with the user interface relying on REST API to communicate with the server. All actions executed through the user interface can be replicated via API calls using your preferred programming language. To understand the API's functionality, you can trace network activities in your browser console.

The majority of API functions yield JSON responses. For POST and PUT requests, data is typically included in the payload in JSON format. When sending a JSON payload, be sure to include the header:

Content-Type: application/json

In Mythradon, the API path is: api/v1/.

For example: https://[Your Mythradon Domain]/api/v1/Contact/65b1a5bc214084d35 will return data about a specific Contact record with the id of `65b1a5bc214084d35'.

Authentication

Secure APIs with multiple

Authentication Options

Mythradon's APIs support two authentication methods:

  • API Key Authentication
  • HMAC Authentication

Both authentication methods necessitate the establishment of an API User. This API User must be linked to a Role, enabling access to predefined scopes based on specified permissions.

API Key Authentication

The API Key Authentication method uses a system generated secret key used in the X-Api-Key header.

HMAC Authentication

The HMAC Authentication method employs a sophisticated X-Hmac-Authorization header, structured as follows:

X-Hmac-Authorization: base64Encode(apiKey + ':' + hashHmacSha256(method + ' /' + uri , secretKey))

where:

  • method: Refers to the HTTP method used (GET, POST, PUT, DELETE).
  • uri: Denotes the request path, such as Lead/action/convert.
  • secretKey: Obtained from Mythradon API User properties.
Api Examples

API Examples

POST {entityType}

This REST API endpoint is used to create a new record of the specific entity type. The request to this endpoint is accomplished through a HTTP POST, with the payload taking the form of a valid JSON object corresponding to the specific entity. Upon successful creation of the record, the API will respond with an object containing the created attributes.

Headers: Content-Type: application/json

Example Request

                    
POST https://[Your Mythradon Domain]/api/v1/Contact
                    
                  

JSON Request Payload

                    
{
    "firstName": "Tim",
    "lastName": "Myers",
    "title": "Director",
    "description": null,
    "emailAddress": "tim.bikeparts@example.com",
    "phoneNumber": "0494 556 433",
    "addressStreet": "123 Main Street",
    "addressCity": "Cityville",
    "addressState": "Stateville",
    "addressCountry": "United States",
    "addressPostalCode": "12345"
}
                    
                  

Example Response

                    
{
    "id": "65d6eb3094fd1c9ec",
    "name": "Tim Myers",
    "deleted": false,
    "firstName": "Tim",
    "lastName": "Myers",
    "title": "Director",
    "description": null,
    "emailAddress": "tim.bikeparts@example.com",
    "phoneNumber": "0494 556 433",
    "doNotCall": false,
    "addressStreet": "123 Main Street",
    "addressCity": "Cityville",
    "addressState": "Stateville",
    "addressCountry": "United States",
    "addressPostalCode": "12345",
    "accountIsInactive": false,
    "createdAt": "2024-02-22 06:35:28",
    "modifiedAt": "2024-02-22 06:35:28",
    "hasPortalUser": false,
    "targetListIsOptedOut": false,
    "emailAddressIsOptedOut": false,
    "emailAddressIsInvalid": false,
    "phoneNumberIsOptedOut": false,
    "phoneNumberIsInvalid": false,
    "emailAddressData": [
        {
            "emailAddress": "tim.bikeparts@example.com",
            "lower": "tim.bikeparts@example.com",
            "primary": true,
            "optOut": false,
            "invalid": false
        }
    ],
    "phoneNumberData": [
        {
            "phoneNumber": "0494 556 433",
            "type": "Mobile",
            "primary": true,
            "optOut": false,
            "invalid": false
        }
    ],
    "accountsIds": [],
    "accountsNames": {},
    "accountsColumns": {},
    "createdById": "6090b0abe0164c845",
    "teamsIds": [],
    "teamsNames": {},
    "isFollowed": false,
    "followersIds": [],
    "followersNames": {}
}
                    
                  

GET {entityType}

This REST API endpoint facilitates the retrieval of a list of records pertaining to the specified entity type. The request to this endpoint will return a JSON array of records associated with the chosen entity.

GET parameters:

  • maxSize: This is an integer value that controls the max number of records returned.
  • offset: This is an integer value that controls the starting point from which the API should retrieve records. It helps in paginating through large datasets by indicating the number of records to skip from the beginning before returning the requested data. For example, if you set the 'offset' to 10, the API would start retrieving records from the 11th position onwards. This parameter is valuable for efficient data retrieval and display, particularly when dealing with extensive datasets, as it allows clients to fetch data in manageable chunks.
  • where: This refers to a JSON array of filters intended to be applied to the query, equivalent to a WHERE clause in a database.
  • orderBy: A string value utilized to specify the attribute by which the data should be sorted.
  • order: Governs the sorting direction. Accepted values include "asc" (ascending) or "desc" (descending).
  • select: This represents a comma-separated string specifying the desired attributes or fields for retrieval. In cases where this parameter is not explicitly defined, the API will return all available attributes by default.

Example Request

                    
GET Account?offset=0&maxSize=20
                    
                  

Example Response

                    
{
    "total": 108,
    "list": [
        {
            "id": "5f1fbda1153452261",
            "name": "Enrico Fermi",
            "salutationName": "Mr.",
            "firstName": "Enrico",
            "lastName": "Fermi",
            "emailAddress": "Enrico.Fermi@example.com",
            "phoneNumber": "(905) 711-5681",
            "middleName": null,
            "emailAddressIsOptedOut": false,
            "emailAddressIsInvalid": false,
            "phoneNumberIsOptedOut": false,
            "phoneNumberIsInvalid": false,
            "accountId": "5f12aa9d3578f6a1a",
            "accountName": "Baltik vairas",
            "createdById": "1",
            "assignedUserId": null
        },
        {
            "id": "5f1fbda10449afb67",
            "name": "Eric Jones",
            "salutationName": "Mr.",
            "firstName": "Eric",
            "lastName": "Jones",
            "emailAddress": "eric@example.com",
            "phoneNumber": "0432 763 443",
            "middleName": null,
            "emailAddressIsOptedOut": false,
            "emailAddressIsInvalid": false,
            "phoneNumberIsOptedOut": false,
            "phoneNumberIsInvalid": false,
            "accountId": "5f12aa9d23080be0f",
            "accountName": "Champion Cycle Company",
            "createdById": "1",
            "assignedUserId": null
        },
        {
            "id": "5f1fbda131f597e94",
            "name": "Ernest Rutherford",
            "salutationName": "Mr.",
            "firstName": "Ernest",
            "lastName": "Rutherford",
            "emailAddress": "Ernest.Rutherford@example.com",
            "phoneNumber": "(325) 794-1414",
            "middleName": null,
            "emailAddressIsOptedOut": false,
            "emailAddressIsInvalid": false,
            "phoneNumberIsOptedOut": false,
            "phoneNumberIsInvalid": false,
            "accountId": "5f12aa9dabc661e5e",
            "accountName": "Chicago Bicycle Company",
            "createdById": "1",
            "assignedUserId": null
        },
        {
            "id": "5f1fbda10edd2dfa6",
            "name": "Erwin Schroedinger",
            "salutationName": "Mr.",
            "firstName": "Erwin",
            "lastName": "Schroedinger",
            "emailAddress": "Erwin.Schroedinger@example.com",
            "phoneNumber": "(758) 822-8076",
            "middleName": null,
            "emailAddressIsOptedOut": false,
            "emailAddressIsInvalid": false,
            "phoneNumberIsOptedOut": false,
            "phoneNumberIsInvalid": false,
            "accountId": "5f12aa9d2f882395d",
            "accountName": "Bike Friday",
            "createdById": "1",
            "assignedUserId": null
        }
    ]
}
                    
                  

GET {entityType}/{id}

This REST API endpoint enables the retrieval of a singular record related to the specified entity type and ID value. Submitting a request to this endpoint will yield a JSON object encompassing all attributes of the specific entity accessible to the Role associated with the API Key.

Example Request

                    
GET https://[Your Mythradon Domain]/api/v1/Contact/60752a6f0bcdc3178
                    
                  

Example Response

                    
{
    "id": "60752a6f0bcdc3178",
    "name": "Kellie Myers",
    "deleted": false,
    "referenceNumberMyth": null,
    "salutationName": "Ms.",
    "firstName": "Kellie",
    "lastName": "Myers",
    "title": "Sale Manager",
    "description": null,
    "emailAddress": "kellie.bikeparts@example.com",
    "phoneNumber": "0498 456 321",
    "doNotCall": false,
    "addressStreet": null,
    "addressCity": null,
    "addressState": null,
    "addressCountry": null,
    "addressPostalCode": null,
    "accountIsInactive": false,
    "accountType": "Supplier",
    "createdAt": "2021-04-13 05:21:51",
    "modifiedAt": "2023-07-17 03:08:41",
    "hasPortalUser": false,
    "interestGroups": [
        "BMX - Freestyle & Street",
        "BMX - Old School",
        "BMX - Race",
        "Folding"
    ],
    "leadscore": null,
    "addressData": null,
    "addressLatitude": 0,
    "addressLongitude": 0,
    "middleName": null,
    "emailAddressIsOptedOut": false,
    "emailAddressIsInvalid": false,
    "phoneNumberIsOptedOut": false,
    "phoneNumberIsInvalid": false,
    "emailAddressData": [
        {
            "emailAddress": "kellie.bikeparts@example.com",
            "lower": "kellie.bikeparts@example.com",
            "primary": true,
            "optOut": false,
            "invalid": false
        }
    ],
    "phoneNumberData": [
        {
            "phoneNumber": "0498 456 321",
            "type": "Mobile",
            "primary": true,
            "optOut": false,
            "invalid": false
        }
    ],
    "accountId": "60752a6f01a0fb480",
    "accountName": "BikeParts Pty Ltd",
    "accountsIds": [
        "60752a6f01a0fb480"
    ],
    "accountsNames": {
        "60752a6f01a0fb480": "BikeParts Pty Ltd"
    },
    "accountsColumns": {
        "60752a6f01a0fb480": {
            "role": "Sale Manager",
            "isInactive": false
        }
    },
    "campaignId": null,
    "campaignName": null,
    "createdById": "5f38a65ebc7af8b49",
    "createdByName": "Peter McRae",
    "modifiedById": "60d01f0e54b5cfdd4",
    "modifiedByName": "Devon Krill",
    "assignedUserId": "5f38a65ebc7af8b49",
    "assignedUserName": "Peter McRae",
    "teamsIds": [],
    "teamsNames": {},
    "portalUserId": null,
    "portalUserName": null,
    "originalLeadId": "6075293e4719a7fbe",
    "originalLeadName": "Kellie Myers",
    "isFollowed": false,
    "followersIds": [
        "5f38a65ebc7af8b49"
    ],
    "followersNames": {
        "5f38a65ebc7af8b49": "Peter McRae"
    }
}
                    
                  

PUT {entityType}/{id}

This REST API endpoint facilitates the updating of values for a particular record within the specified entity type. The request to this endpoint is accomplished through a HTTP PUT, with the payload taking the form of a valid JSON object corresponding to the specific entity.

Headers: Content-Type: application/json

Example Request

                    
PUT https://[Your Mythradon Domain]/api/v1/Contact/62eb6ff1e01d3cefd
                    
                  

JSON Request Payload

                    
{
    "title": "Project Manager",
    "addressStreet": "29 Alderwood Street",
    "addressCity": "South Yarra",
    "addressState": "VIC",
    "addressCountry": "Australia",
    "addressPostalCode": "3456",
    "description": "Abigail is a dedicated professional with a passion for innovation and teamwork."
}
                    
                  

Example Response

                    
{
    "id": "62eb6ff1e01d3cefd",
    "name": "Abigail Greene",
    "deleted": false,
    "referenceNumberMyth": null,
    "salutationName": "Mrs.",
    "firstName": "Abigail",
    "lastName": "Greene",
    "title": "Project Manager",
    "description": "Abigail is a dedicated professional with a passion for innovation and teamwork.",
    "emailAddress": "AbigailGreene.randomrowcycles@example.com",
    "phoneNumber": null,
    "doNotCall": false,
    "addressStreet": "29 Alderwood Street",
    "addressCity": "South Yarra",
    "addressState": "VIC",
    "addressCountry": "Australia",
    "addressPostalCode": "3456",
    "accountIsInactive": false,
    "accountType": "Reseller",
    "createdAt": "2022-08-04 07:06:25",
    "modifiedAt": "2024-02-22 02:16:35",
    "hasPortalUser": false,
    "interestGroups": [
        "BMX - Race",
        "MTB - eBike",
        "Road - Drop Bar"
    ],
    "leadscore": null,
    "addressData": null,
    "addressLatitude": null,
    "addressLongitude": null,
    "middleName": null,
    "emailAddressIsOptedOut": false,
    "emailAddressIsInvalid": false,
    "phoneNumberIsOptedOut": null,
    "phoneNumberIsInvalid": null,
    "accountId": "62eb6ff1d33dbff89",
    "accountName": "Random Row Cycles",
    "campaignId": "5f3920bfcbc913b7f",
    "campaignName": "2020 Adventure Cycles Campaign",
    "createdById": "5f1f7f6d177443239",
    "createdByName": "Jim Malone",
    "modifiedById": "6090b0abe0164c845",
    "modifiedByName": "apiuser1",
    "assignedUserId": "5f1f7f6d177443239",
    "assignedUserName": "Jim Malone",
    "portalUserId": null,
    "portalUserName": null,
    "originalLeadId": "5f39212b95e3a671a",
    "originalLeadName": "Abigail Greene"
}
                    
                  

DELETE {entityType}/{id}

This REST API endpoint facilitates the deleting of a specific record within the specified entity type. The request to this endpoint is accomplished through a HTTP DELETE.

Example Request

                    
DELETE https://[Your Mythradon Domain]/api/v1/Contact/62eb6ff1e01d3cefd
                    
                  

Example Response

                    
true
                    
                  
Call to Action

Get started today

Mythradon: Your Guide to Discovering New Business Opportunities

Gain a competitive edge in managing your business data with Mythradon's 14-day free trial. Experience firsthand how our platform's flexibility and adaptability give you an edge in streamlining operations and enhancing productivity. Discover the efficiency of Mythradon's REST based APIs and streamlined your business processes.

Related Topics

Other great features of

Mythradon CSP