# Getting Started with Dynamic API

### Aurinko account setup

***

First, create your account in the [Aurinko portal](https://app.aurinko.io/), then follow the guide to [get your developer API keys](https://docs.aurinko.io/getting-started/get-your-developer-api-keys).\
\
When presented with the **New Application** dialog choose the CRM feature.

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FxZcgqvLOrbbOpJdBpStd%2Fimage.png?alt=media&#x26;token=6a5ee9ad-f14c-4eb0-a407-04b59e4708e8" alt="" width="563"><figcaption></figcaption></figure>

Next, navigate to **Settings** and specify your app's OAuth details (clientId+secret) for your Salesforce and Hubspot integrations.

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2Fy9IEq1sMgnRwti0NbNx3%2Fimage.png?alt=media&#x26;token=c5f95230-27ff-499e-88c6-2fa05ddee21f" alt=""><figcaption></figcaption></figure>

\
Now, navigate to **Accounts** to test creating Salesforce and/or Hubspot accounts.&#x20;

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FRZfPdA783IFGDHeu5rDb%2Fimage.png?alt=media&#x26;token=22237765-a85e-4e8a-8300-b6978cdccaf8" alt=""><figcaption></figcaption></figure>

Once a new account is added you can find its Aurinko access token on the **Account** page. You will need this token to make API calls later.

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2Fquqt7b0BhklvWIXSxxhn%2Fimage.png?alt=media&#x26;token=b79e05dc-6c93-49c1-907c-6d34d7b5f5e8" alt=""><figcaption></figcaption></figure>

Upon adding a CRM account, its metadata is automatically loaded into the system. You will be able to examine the provider metadata when adding/ediging object and field mappings.

The **Virtual APIs** tab displays your virtual data models. If you have not created any models yet, start by clicking 'New virtual model'.

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FdfOSP0xFT6Mggso780Yt%2FVirtual_metadata.png?alt=media&#x26;token=5da8f4ed-ef41-4a19-a027-9f0b3349b1fe" alt=""><figcaption></figcaption></figure>

You can quickly create a new model from an existing template with a number of CRM provider mappings, i.e. Hubspot, Salesforce, MS Dynamics:\
\
![](https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FdC8hjefJOeDdv0quVFcj%2Fimage.png?alt=media\&token=eef812c1-b0a1-419f-97d8-71fc7caadccf)

Our AurinkoCRM template will clone a model with four objects: Company, Contact, Deal and User.

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FVtM1oQ8Pqbm3VI5X0mzf%2FMonosnap%20Custom%20metadata%202025-08-14%2017-17-43.png?alt=media&#x26;token=2b2761de-746e-42b9-ae25-875e38a1d91c" alt=""><figcaption></figcaption></figure>

and the following mappings/configurations will be pre-populated:\
\
![](https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FAmVUOn2tKSIart7qwW36%2Fimage.png?alt=media\&token=70578985-ca98-4e7b-a107-2f97952c7011)

Choose one of them to see how your virtual model is mapped to a provider model, like Hubspot:

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FZlWD94eUZVAouQxIlhwi%2FMonosnap%20Custom%20metadata%202025-08-14%2017-21-07.png?alt=media&#x26;token=de21b0e4-e187-48c0-a656-f1daf301ea13" alt=""><figcaption></figcaption></figure>

Click any object to see its field mappings:

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FeAqOzMXuK6K78bJWylAb%2Fimage.png?alt=media&#x26;token=f73422cb-3820-47f6-8ca2-62824ab69451" alt=""><figcaption></figcaption></figure>

Note the 'Configuration Id', you need to reference this id when using the Dynamic API.

Here is the same Contact object mapped to the Salesforce Contact object (configuration id: 403):

<figure><img src="https://3933352743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0ua36KLVlbUN5bA2bgiq%2Fuploads%2FAxDhNoD2MvNziglqXdFV%2Fimage.png?alt=media&#x26;token=21a37323-d4f9-4c9b-b08e-8c983b843dd2" alt=""><figcaption></figcaption></figure>

You can have as many mapping configurations as you need. Many Salesforce and Hubspot instances have their own customizations so you may need a CRM configuration per customer.\
Create them in Aurinko once needed and remember their ids. You will be able to reference a specific configuration when calling the /dynamic API.\
\
**Understanding Dynamic API Endpoints**

Aurinko Dynamic API offers a unified API experience, but with the key advantage of being virtualized. This means the API endpoints are dynamically generated based on your configuration. Here's an overview of the endpoint structure:

* **Metadata Endpoints:**
  * `/dynamic/{configId}/metadata/{objName}`: Retrieves metadata for a specific CRM object (e.g., contacts).
  * `/dynamic/{configId}/metadata/{objName}/{fieldName}`: Retrieves metadata for a particular field within a CRM object.
* **Object Endpoints:**
  * `/dynamic/{configId}/objects/{objName}`: Retrieves a list of objects of a specific type (e.g., all contacts).
  * `/dynamic/{configId}/objects/{objName}/{id}`: Retrieves a single CRM object by its ID.
  * `/dynamic/{configId}/objects/{objName}/{id}/{childRelationship}`: Retrieves data related to a child relationship of a specific CRM object.
