> For the complete documentation index, see [llms.txt](https://docs.finout.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finout.io/api/finout-api/finout-api-v1/endpoint-api-v1.md).

# Endpoint API V1

Finout’s Endpoint API provides functionalities to query existing endpoints and create new ones effortlessly. You can retrieve a list of current endpoints or create new ones, with all results returned in JSON format for seamless integration and processing.

## <mark style="color:green;">`GET`</mark>`/Endpoints`

Gets a list of all your account endpoints.&#x20;

{% hint style="success" %}
**Prerequisites**

* [Generate a Client ID and Secret Key](/api/finout-api/generate-an-api-token.md) from Finout to add in Headers.&#x20;
  {% endhint %}

**Request**\
`https://app.finout.io/v1/endpoints`

**Response**

{% tabs %}
{% tab title="200" %}

```json
{ 
"endpoints": [
          {
            "type": "email",
            "name": "example@finout.io",
            "configuration": {
                "to": "example@finout.io"
            },
            "createdBy": "example",
            "createdAt": "Thu Dec 28 2023 14:09:57 GMT+0000 (Greenwich Mean Time)",
            "id": "7fecf9fb-4f36-4931-8d02-9cc53bb26af3"
        },
        {
            "type": "msteams",
            "name": "BI Group/DevTeam",
            "createdBy": "Finout",
            "createdAt": "Wed Nov 13 2024 17:44:50 GMT+0000 (Greenwich Mean Time)",
            "id": "a4a41dfc-23b3-4d9d-8f17-6e45cc34e8f8"
        },
   ],
    "requestId": "3b4c8ee0-9d97-4042-8265-ce837a87469d"
}
```

{% endtab %}

{% tab title="400" %}
Bad Request
{% endtab %}

{% tab title="401" %}
Unauthorized
{% endtab %}

{% tab title="429" %}
Too many requests
{% endtab %}

{% tab title="503" %}
Server unavailable
{% endtab %}

{% tab title="504" %}
Gateway Timeout
{% endtab %}
{% endtabs %}

Returns a JSON object with the following properties:

* type: The endpoint type - email.
* name: The name of the endpoint.
* configuration: The email URL that is configured for the endpoint.
* to: The destination address or endpoint for the notification.
* createdBy: The creator of the endpoint.
* createdAt: The time and date the endpoint was created.
* id: The unique identifier of your account's views.
* requestId: The ID of this specific request.

## <mark style="color:green;">`POST`</mark> `/Endpoints`

Creates an email endpoint in Finout.

{% hint style="success" %}
**Prerequisites**

* [Generate a Client ID and Secret Key](/api/finout-api/generate-an-api-token.md) from Finout to add in Headers.&#x20;
  {% endhint %}

**Request**

[`https://app.finout.io/v1/endpoints`](https://app.finout.io/v1/endpoints)

{% tabs %}
{% tab title="200" %}

```json
{
    "type": "email",
    "name": "demo",
    "configuration": {
        "to": "demo@finout.io"
    }
}
```

{% endtab %}
{% endtabs %}

*Body of Request*

| Parameter     | Type   | Description                                                                                                                             |
| ------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| type          | string | Email                                                                                                                                   |
| name          | string | The name of the endpoint.                                                                                                               |
| configuration | Object | <p>The address where notifications or messages are sent.<br>​<em>to</em>: The destination address or endpoint for the notification.</p> |

{% hint style="info" %}
**Note**: For MS Teams - All public channels in a Team will automatically mapped to an endpoint ID in Finout.
{% endhint %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "endpoint": {
        "accountId": "e6ad4c08-9ecd-4592-be61-7a13ad456259",
        "createdBy": "demo@finout.io",
        "type": "email",
        "name": "demo",
        "configuration": {
            "to": "demo@finout.io"
        },
        "createdAt": "Tue Oct 29 2024 12:11:10 GMT+0000 (Greenwich Mean Time)",
        "updatedAt": "Tue Oct 29 2024 12:11:10 GMT+0000 (Greenwich Mean Time)",
        "id": "727e16d6-affe-43bd-924a-c896197640bb"
    },
    "requestId": "0e2516ba-87fb-4210-be7e-6890fcb55adc"
}
```

{% endtab %}

{% tab title="400" %}
Bad Request
{% endtab %}

{% tab title="401" %}
Unauthorized
{% endtab %}

{% tab title="429" %}
Too many requests
{% endtab %}

{% tab title="503" %}
Server unavailable
{% endtab %}

{% tab title="504" %}
Gateway Timeout
{% endtab %}
{% endtabs %}

Returns a JSON object with the following properties:

* accountId: The account id of the endpoint.
* createdby: The creator of the endpoint.
* type: the endpoint type - email.
* name: The name of the endpoint.
* configuration: What the endpoint was configured to.
* to: The destination address or endpoint for the notification.
* createdAt: The time and date the endpoint was created.
* updatedAt: The time and date the endpoint was updated.
* id: The unique identifier of your account's views.
* requestId: The ID of this specific request.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.finout.io/api/finout-api/finout-api-v1/endpoint-api-v1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
