# Integrate APIs

When a quester engages with a custom task, Intract triggers the necessary APIs with the required parameters to verify the task. You have the option to integrate your API using cURL or manually connect it. If you're unsure about creating an API, fret not, we also have a [section on generating your own API-based template.](https://docs.intract.io/product-guide/tools-guides/integrate-apis/for-devs)

First, go to "Task APIs" from your community dashboard and click on "Connect your API"

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2F9PxjYxZLRXLCDGxBe4Yw%2FScreenshot%202024-10-09%20at%203.05.09%E2%80%AFPM.png?alt=media&#x26;token=f19c53ec-bd2e-4de9-a5e3-4d8bbaecbb57" alt=""><figcaption><p>Connect Your API</p></figcaption></figure>

## Adding API Details:

1. Add API Name and select API Type from REST/GraphQL

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FikGmI2fjScF2lbCBOqQp%2FScreenshot%202024-10-11%20at%205.46.35%E2%80%AFPM.png?alt=media&#x26;token=524de52c-8895-475f-b1b0-34111080dd6e" alt="" width="563"><figcaption></figcaption></figure>

2. Select what actions your API will verify. Additionally if your API is for a special kind of task like the one with Dynamic XP or with recurrence, select appropriate check boxes. then click "Next".

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FJ9Y9meQIoXbFtkkgrS4S%2FScreenshot%202024-10-11%20at%205.51.57%E2%80%AFPM.png?alt=media&#x26;token=ccd4dbef-cefa-4fc6-8de3-666338ae15d2" alt="" width="563"><figcaption></figcaption></figure>

3. Paste your API cURL or click skip to add the details manually. Then click "Next".

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FwIMtoxRlPFyImptwK1na%2FScreenshot%202024-10-11%20at%205.57.46%E2%80%AFPM.png?alt=media&#x26;token=f9555169-a006-4bb4-849a-36a6f0a8a80c" alt="" width="563"><figcaption></figcaption></figure>

3. If you prefer to connect your API manually, you'll need to input the following details:

* **Endpoint:** Provide the endpoint URL of your API.
* **API Method:** Indicate whether the method is POST or GET.
* **Payload Method:** Specify how payloads are handled, whether using Query Params or Body.
* **Payload:** Pick between Wallet Address, Twitter Id, Twitter Handle, Discord Id, Discord Username, Telegram Id, and Email.
* **Constant Values:** You can also add constants not mentioned in the above Payloads
* **Custom Headers:** Use headers for additional authentication or to access private APIs.

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FjkwOppuwakosQZnxdLyv%2Fimage.png?alt=media&#x26;token=75e1e208-7de6-4409-83a9-4ca627e99d1c" alt="" width="563"><figcaption></figcaption></figure>

4. Click "Test API" for testing with sample payloads.

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FiOEKUYmEAIRTekOxD1f9%2Fimage.png?alt=media&#x26;token=63ccd6dc-5c4c-45f9-a37f-33656b528229" alt="" width="563"><figcaption></figcaption></figure>

4. If everything goes well, you can click SAVE API here.

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FiYockC9V3utoprqAgtAD%2FScreenshot%202024-10-12%20at%205.45.00%E2%80%AFPM.png?alt=media&#x26;token=cbb7b662-e5e7-4da9-b961-6cb711c38f40" alt="" width="563"><figcaption></figcaption></figure>

4. If not, click on "Format API Response" to evaluate the API response data.
   1. You can write code in JavaScript for the expressions for response Result, Code, Error Message, Task Metric,  and Task Metric Data Type.

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FvqcLuV7GSjDCkoK6Hm6u%2FScreenshot%202024-10-11%20at%206.15.46%E2%80%AFPM.png?alt=media&#x26;token=53bb7ef1-b57f-491a-9fdd-97e58ae66113" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2FAfenGe5gXOBXs96zfP7H%2FScreenshot%202024-10-11%20at%206.19.01%E2%80%AFPM.png?alt=media&#x26;token=923ac3dd-7333-4d69-9f02-6fb9a6b2ce0f" alt="" width="563"><figcaption></figcaption></figure>

Contact us by pressing on the Chat button if you face any issues with the API Integration process.

<figure><img src="https://1130498538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKGgeahEPgCyenKG4Y7ib%2Fuploads%2F2wYCgBue1wxVW5c5pOIL%2FScreenshot%202024-10-11%20at%206.28.03%E2%80%AFPM.png?alt=media&#x26;token=e5b8e49f-d8c7-44e6-aa6d-cc7a13c3117a" alt=""><figcaption></figcaption></figure>
