# Hi 👋

Welcome to the Zencal API documentation. On this page, you will find all the information you need to help you use the methods we provide to our users. Remember also that if you have a question, our support is available in chat or by email: <hello@zencal.io>

## How to get started?

The best option is to go through our Quick Start, which will let you set everything up and allow you to make requests to the Zencal API.

{% content-ref url="/pages/SRm6RAqwF5KW157u8soT" %}
[Quick Start](/quick-start)
{% endcontent-ref %}

## Jump into methods

If you already know how to perform queries to the Zencal API, simply familiarise yourself with the available methods.

{% content-ref url="/pages/hZAPEAX5pzHggw1SNYni" %}
[API Reference](/reference/api-reference)
{% endcontent-ref %}


# Quick Start

{% hint style="info" %}
**Good to know:** A quick start guide can be good to help folks get up and running with your API in a few steps. Some people prefer diving in with the basics rather than meticulously reading every page of documentation!
{% endhint %}

## Get your API keys

In order to obtain an API key, you must first have a registered and active account with Zencal. To do this, go to the [registration form](https://app.zencal.io/auth/register) and then go through the entire onboarding process.

If you already have a Zencal account, send a request for API keys to <hello@zencal.io>. It is important that the message is sent from the email to which the request relates. In addition, in the body of the email, provide the secret service code, which can be found in the Account tab of the Zencal dashboard.

## How to authorize yourself

To authorize yourself in the Zencal API, you need to use the `X-Zencal-Api-Key` header for this purpose. Set it to the value of the API key you obtained when you contacted us.&#x20;

Also set the `content-type` and `accept` headers to `application/json`

Now you are ready to call the Zencal API methods


# API Reference

Dive into the specifics of each API endpoint by checking out our complete documentation.

{% content-ref url="/pages/ByFSrD8RlR5u2SyJkKpz" %}
[Users](/reference/api-reference/users)
{% endcontent-ref %}

{% content-ref url="/pages/t8Ahc7XwPfAraB6xnCPo" %}
[Teams](/reference/api-reference/teams)
{% endcontent-ref %}

{% content-ref url="/pages/Svw3Cf3xiHhUxSeKG7aP" %}
[Meetings](/reference/api-reference/meetings)
{% endcontent-ref %}

{% content-ref url="/pages/EVzHtAXFkIHxWjiloTuq" %}
[Scheduling](/reference/api-reference/scheduling)
{% endcontent-ref %}


# Meeting topics

## Get list of all meeting topics that are owned by user

<mark style="color:blue;">`GET`</mark> `https://app.zencal.io/api/v1/meeting-topics`

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

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

```json
{
    "meetingTopics": [
        {
            "uuid": "fd8ec570-a809-40e3-8af6-a7d76c0b5adc",
            "name": "Consulting IT",
            "duration": 120,
            "description": "Lorem ipsum",
            "enabled": true,
            "private": false
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Shorten the link to your meeting topic

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/short`

Shorten your long link

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

#### Request Body

| Name                                     | Type   | Description                           |
| ---------------------------------------- | ------ | ------------------------------------- |
| origin<mark style="color:red;">\*</mark> | String | The original link you want to shorten |

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

```json
{
    "link": "https://zcal.me/xxx"
}
```

{% endtab %}
{% endtabs %}

## Update meeting topic

<mark style="color:purple;">`PUT`</mark> `https://app.zencal.io/api/v1/meeting-topics/{uuid}`

Use this method to update meeting topic data

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

#### Request Body

| Name        | Type    | Description                                                              |
| ----------- | ------- | ------------------------------------------------------------------------ |
| name        | String  | Name displayed on the planning page                                      |
| description | String  | Description displayed on the planning page                               |
| enabled     | Boolean | Determines whether appointments can be made on this topic                |
| private     | Boolean | Specifies whether the meeting topic should be hidden on the profile page |
| metadata    | Object  | Set the data you need                                                    |


# Scheduling

## Use this method to schedule a meeting

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/schedule`

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |

#### Request Body

| Name                                           | Type   | Description                                                                                                                                                                                                                                                                      |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dates<mark style="color:red;">\*</mark>        | Array  | Array of objects. Each date need to have "start" and "username" fields. Field "start" is a UTC date in ISO 8601 format. Field "username" is a host's username e.g. \[ { "start":"2023-05-13T10:00:00.000Z", "username":"joe-smith" } ],                                          |
| email<mark style="color:red;">\*</mark>        | String | Participant's email                                                                                                                                                                                                                                                              |
| lang<mark style="color:red;">\*</mark>         | String | Language for system messages. Available values: en, pl                                                                                                                                                                                                                           |
| name<mark style="color:red;">\*</mark>         | String | Participant's name                                                                                                                                                                                                                                                               |
| phone                                          | String | Participant's phone number. It can be required as it's defined in meeting topic advanced settings.                                                                                                                                                                               |
| place<mark style="color:red;">\*</mark>        | String | <p>Place of the meeting. Available values: </p><p>"offline"</p><p>"phone-call"</p><p>"google-meet"</p><p>"teamsForBusiness"</p><p>"skypeForBusiness"</p><p>"skypeForConsumer"</p><p>"zoom"</p><p>"webex"</p><p></p><p>The place must match the account integration settings.</p> |
| meetingTopic<mark style="color:red;">\*</mark> | String | Meeting topic's uuid                                                                                                                                                                                                                                                             |
| team                                           | String | Team's uuid. Required if it's a team meeting                                                                                                                                                                                                                                     |
| timezone<mark style="color:red;">\*</mark>     | String | Participant's timezone                                                                                                                                                                                                                                                           |
| gateway                                        | String | <p>Payment gateway code. Available options:</p><p>"stripe"</p><p>"p24"</p><p>"payu"</p><p>"paypal"</p><p>"tpay"</p><p></p><p>It's required if meeting topic is defined as paid.</p>                                                                                              |
| note                                           | String | Note left by participant                                                                                                                                                                                                                                                         |
| invoiceName                                    | String | Name for the invoice                                                                                                                                                                                                                                                             |
| invoiceAddress                                 | String | Address for the invoice                                                                                                                                                                                                                                                          |
| invoicePostalCode                              | String | Postal code for the invoice                                                                                                                                                                                                                                                      |
| invoiceCity                                    | String | City for the invoice                                                                                                                                                                                                                                                             |
| invoiceTaxNumber                               | String | Tax number for the invoice                                                                                                                                                                                                                                                       |
| discount                                       | String | Discount code                                                                                                                                                                                                                                                                    |
| priceVariant                                   | String | Price variant uuid                                                                                                                                                                                                                                                               |
| form                                           | Object | Form answers                                                                                                                                                                                                                                                                     |
| metadata                                       | Object | In this field you can store any information you need                                                                                                                                                                                                                             |

{% tabs %}
{% tab title="200: OK For free meetings" %}

```json
{
    "success": "Meetings have been scheduled",
    "meetings": [
        {
            "uuid": "ceb85978-0494-11ee-be56-0242ac120002",
            "date": "2023-06-12T13:00:00.000000Z"
        }
    ]
}
```

{% endtab %}

{% tab title="200: OK For paid meetings" %}

```json
{
    "paymentUrl": "https://...."
}
```

{% endtab %}

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

```json
{
    "errors": [
        "gateway": "This field is required",
        "meetingTopic": "This field is required"
    ]
}
```

{% endtab %}
{% endtabs %}

## Use this method to calculate available dates

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/calculate-schedule`

#### Request Body

| Name                                           | Type   | Description                                                                                                                                                                                             |
| ---------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| username<mark style="color:red;">\*</mark>     | String | Host's username from profile                                                                                                                                                                            |
| meetingTopic<mark style="color:red;">\*</mark> | String | Meeting topic's uuid                                                                                                                                                                                    |
| timezone<mark style="color:red;">\*</mark>     | String | Participant's  timezone                                                                                                                                                                                 |
| offset<mark style="color:red;">\*</mark>       | Number | <p>Number of days added to the current date to determine the first date in the schedule. Must be a multiple of 7</p><p></p><p>Minimum: 0</p><p></p><p>It's ignored when month is defined.</p>           |
| month                                          | Number | <p>Number of the month. The first month is January of the current year. For example, the value 5 means May of this year. The value 14 means February of the following year.</p><p></p><p>Minimum: 1</p> |
| team                                           | String | Team's uuid. Required if it is meeting topic for the team                                                                                                                                               |
| year                                           | Number | The year for which we retrieve available dates                                                                                                                                                          |

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

```json
{
    "schedule": {
         "2024-01-01": [
              {
                   "day": "2024-01-01",
                   "start": "2024-01-01T13:00:00+00:00",
                   "end": "2024-01-01T13:40:00+00:00",
                   "timezone": "Europe/Warsaw",
                   "user": {
                        "username": "joe-smith"
                   }
              },
              {
                   "day": "2024-01-01",
                   "start": "2024-01-01T13:40:00+00:00",
                   "end": "2024-01-01T14:20:00+00:00",
                   "timezone": "Europe/Warsaw",
                   "user": {
                        "username": "joe-smith"
                   }
              }
         ],
         "2024-01-02": [
              {
                   "day": "2024-01-02",
                   "start": "2024-01-02T13:00:00+00:00",
                   "end": "2024-01-02T13:40:00+00:00",
                   "timezone": "Europe/Warsaw",
                   "user": {
                        "username": "joe-smith"
                   }
              },
              {
                   "day": "2024-01-02",
                   "start": "2024-01-02T13:40:00+00:00",
                   "end": "2024-01-02T14:20:00+00:00",
                   "timezone": "Europe/Warsaw",
                   "user": {
                        "username": "joe-smith"
                   }
              }
         ],
         ...
    }
}
```

{% endtab %}
{% endtabs %}


# Teams

## Get list of your teams

<mark style="color:blue;">`GET`</mark> `https://app.zencal.io/api/v1/teams`

This method will return a list of all teams to which your user has administrator privileges.

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |

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

```json
{
    "teams": [
        {
            "uuid": "2174ccfc-eb20-11ed-a05b-0242ac120003",
            "name": "Power Rangers"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Get list of users in your team

<mark style="color:blue;">`GET`</mark> `https://app.zencal.io/api/v1/teams/{teamUuid}/users`

This method will return list of team members

#### Path Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| teamUuid<mark style="color:red;">\*</mark> | String | Team's uuid |

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |

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

```json
{
    "users": [
        {
            "uuid": "86f2e210-f168-45d2-81a2-7e220cc20dca",
            "username": "joe-smith",
            "firstName": "Joe",
            "lastName": "Smith",
            "email": "joe.smith@hotmail.com",
            "phone": "+31100200300",
            "avatar": "https://cdn.zencal.io/avatar.png",
            "tags": [
                {
                    "uuid": "dd3107a3-0a48-4c31-a48e-2fc500e416da",
                    "name": "Kraków",
                    "color": "#3b82f6"
                }
            ]
        },
        {
            "uuid": "12f2exx0-f8168-45d2-81a2-7e220cc20dca",
            "username": "barbra-streisand",
            "firstName": "Barbra",
            "lastName": "Streisand",
            "email": "barbra.streisand@hotmail.com",
            "phone": "+23300500700",
            "avatar": "https://cdn.zencal.io/avatar.png",
            "tags": []
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Create a new user in your team

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/teams/{teamUuid}/users`

Remember to check if your subscription plan allows you to add more users before adding them. You can check this in the "Billing" tab of your Zencal account.

#### Path Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| teamUuid<mark style="color:red;">\*</mark> | String | Team's uuid |

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

#### Request Body

| Name                                        | Type    | Description                                           |
| ------------------------------------------- | ------- | ----------------------------------------------------- |
| firstName<mark style="color:red;">\*</mark> | String  | Team member's first name                              |
| lastName<mark style="color:red;">\*</mark>  | String  | Team member's last name                               |
| email<mark style="color:red;">\*</mark>     | String  | Team member's email                                   |
| admin                                       | Boolean | Set to true if this user should have admin privileges |

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

```json
{
    "success": "User has been created",
    "teamUser": {
        "uuid": "d371bcf0-ca3c-4c7f-a24c-ddb35c8b5c7f"
    }
}
```

{% endtab %}

{% tab title="402: Payment Required " %}

```json
{
    "error": "Your team has reached the maximum number of users in the current subscription plan"
}
```

{% endtab %}
{% endtabs %}

## Delete user from your team

<mark style="color:red;">`DELETE`</mark> `https://app.zencal.io/api/v1/teams/{teamUuid}/users/{userUuid}`

#### Path Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| teamUuid<mark style="color:red;">\*</mark> | String | Team's uuid |
| userUuid<mark style="color:red;">\*</mark> | String | User's uuid |

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |

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

```json
{
    "success": "User has been deleted from your team"
}
```

{% endtab %}
{% endtabs %}


# Meetings

## Get host meetings

<mark style="color:blue;">`GET`</mark> `https://app.zencal.io/api/v1/meetings`

Use this method to download the organizer's meeting list. Limit 500

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

#### Query params

| Name                                   | Type   | Description                                                                                                                     |
| -------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| host<mark style="color:red;">\*</mark> | String | If you are a single user, this is your uuid. If you need an appointment list for a team user specify the uuid of the team user. |
| from<mark style="color:red;">\*</mark> | String | Start date of the meeting e.g. 2025-01-01                                                                                       |
| to<mark style="color:red;">\*</mark>   | String | End date of the meeting e.g. 2025-02-01                                                                                         |

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

```json
{
    "meetings": [
        {
            "uuid": "68XX6-dXX4-48bf-a433-eXX",
            "start": "2025-01-07 13:00:00",
            "end": "2025-01-07 14:00:00",
            "status": "confirmed",
            "place": "Google Meet",
            "joinMeetingLink": "https://meet.google.com/gg-gg-gg",
            "topic": {
                "uuid": "85e2526d-70d4-48c2-bada-4d80a322bb9a",
                "name": "Wprowadzenie do Zencal",
                "metadata": {}
            },
            "attendee": {
                "name": "John Doe",
                "email": "john.doe@gmail.com",
                "phone": null
            },
            "host": {
                "name": "Michael Jorban",
                "email": "michael@jorban.com",
                "phone": null
            }
        },
        {
            "uuid": "4eXXXb4-3c33-4629-XX91-e288XXXXXd6d",
            "start": "2025-01-09 08:00:00",
            "end": "2025-01-09 08:44:00",
            "status": "confirmed",
            "place": "Google Meet",
            "joinMeetingLink": "https://meet.google.com/gg-gg-gg",
            "topic": {
                "uuid": "85e2526d-70d4-48c2-bada-4d80a322bb9a",
                "name": "Wprowadzenie do Zencal",
                "metadata": {}
            },
            "attendee": {
                "name": "John Doe",
                "email": "john.doe@gmail.com",
                "phone": null
            },
            "host": {
                "name": "Michael Jorban",
                "email": "michael@jorban.com",
                "phone": null
            }
        },
        {
            "uuid": "157XXX5c-1c9X7-4ace-a6XXXd-69426cXXXXX7c",
            "start": "2025-01-09 15:20:00",
            "end": "2025-01-09 16:04:00",
            "status": "confirmed",
            "place": "Google Meet",
            "joinMeetingLink": "https://meet.google.com/gg-gg-gg",
            "topic": {
                "uuid": "85e2526d-70d4-48c2-bada-4d80a322bb9a",
                "name": "Wprowadzenie do Zencal",
                "metadata": {}
            },
            "attendee": {
                "name": "John Doe",
                "email": "john.doe@gmail.com",
                "phone": null
            },
            "host": {
                "name": "Michael Jorban",
                "email": "michael@jorban.com",
                "phone": null
            }
        },
    ]
}
```

{% endtab %}

{% tab title="404: Not found" %}

```json
{
    "error": "User not found"
}
```

{% endtab %}
{% endtabs %}

## Generate one-time link to scheduling page

## Creating quick meeting

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/meetings/quick`

Use this method to generate a link to an online meeting. The generated link will also create a meeting in your Google or Outlook calendar (depending on the selected provider). The created meeting will have its duration set to the value specified in the duration parameter. The start time of the meeting is the time the request is called.

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

#### Request Body

| Name                                       | Type    | Description                                                                                        |
| ------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------- |
| duration<mark style="color:red;">\*</mark> | Integer | Duration of the meeting                                                                            |
| provider<mark style="color:red;">\*</mark> | String  | A calendar in which an online meeting will be created. Available values are: "google" or "outlook" |

{% tabs %}
{% tab title="201: Created " %}

```json
{
    "url": "https://meet.google.com/abc-def-ghi"
}
```

{% endtab %}
{% endtabs %}

## Generate one-time link to scheduling page

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/meetings/one-time`

Use this method to generate a one-time link to schedule an appointment on a specific topic. Once an appointment has been made, this link will no longer be active.

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |

#### Request Body

| Name                                           | Type   | Description                                                                       |
| ---------------------------------------------- | ------ | --------------------------------------------------------------------------------- |
| username<mark style="color:red;">\*</mark>     | String | Username of the user to whom the participant will be scheduled                    |
| meetingTopic<mark style="color:red;">\*</mark> | String | Uuid of the meeting topic which the owner is the host or co-host (in team topics) |

{% tabs %}
{% tab title="201: Created " %}

```json
{
    "link": "https://app.zencal.io/meet/{LINK_UUID}"
}
```

{% endtab %}
{% endtabs %}

## Get meeting details

<mark style="color:blue;">`GET`</mark> `https://app.zencal.io/api/v1/meetings/{meetingUuid}`

Use this method to get all information about particular meeting

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |

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

```json
{
    "uuid": "uuid",
    "start": "2024-01-01 00:00:00", // ISO8601, UTC
    "end": "2024-01-01 01:00:00", // ISO8601, UTC
    "status": "confirmed", // [created, confirmed, rejected, canceled, postponed]
    "place": "google-meet", // [offline, google-meet, teamsForBusiness, skypeForBusiness, skypeForConsumer, zoom, phone-call, webex]
    "joinMeetingLink": "http://meet.google.com/join/123",
    "topic": {
        "uuid": "uuid",
        "name": "Consulting 60 min",
        "metadata": {
            "field": "value"
        }
    },
    "attendee": {
        "name": "John Smith",
        "email": "email@john.com",
        "phone": "+1200300400"
    },
    "host": {
        "name": "Michale Bond",
        "email": "m@bond.com",
        "phone": "+12301010102"
    },
    "payment": {
        "amount": 10000, // value in pennies
        "currency": "USD",
        "status": "completed" // [registered, completed, failed]
    }
}
```

{% endtab %}

{% tab title="404" %}

```json
{
    "error": "Meeting not found"
}
```

{% endtab %}
{% endtabs %}

## Confirm meeting

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/meetings/{meetingUuid}/confirm`

Use this method to confirm the meeting

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |

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

```json
{
    "message": "Meeting confirmed",
    "meeting": {
        "uuid": "uuid",
        "start": "2024-01-01 00:00:00", // ISO8601, UTC
        "end": "2024-01-01 01:00:00", // ISO8601, UTC
        "status": "confirmed", // [created, confirmed, rejected, canceled, postponed]
        "place": "google-meet", // [offline, google-meet, teamsForBusiness, skypeForBusiness, skypeForConsumer, zoom, phone-call, webex]
        "joinMeetingLink": "http://meet.google.com/join/123",
        "topic": {
            "uuid": "uuid",
            "name": "Consulting 60 min",
            "metadata": {
                "field": "value"
            }
        },
        "attendee": {
            "name": "John Smith",
            "email": "email@john.com",
            "phone": "+1200300400"
        },
        "host": {
            "name": "Michale Bond",
            "email": "m@bond.com",
            "phone": "+12301010102"
        },
        "payment": {
            "amount": 10000, // value in pennies
            "currency": "USD",
            "status": "completed" // [registered, completed, failed]
        }
    }
}
```

{% endtab %}

{% tab title="404" %}

```json
{
    "error": "Meeting not found"
}
```

{% endtab %}
{% endtabs %}

## Get meeting file

<mark style="color:green;">`POST`</mark> `https://app.zencal.io/api/v1/meetings/{meetingUuid}/files/{fileUuid}`

Use this method to get access to file related to meeting

#### Headers

| Name                                               | Type   | Description              |
| -------------------------------------------------- | ------ | ------------------------ |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key           |
| Accept                                             | String | application/octet-stream |
|                                                    |        |                          |

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

```json
<binary file content>
```

{% endtab %}

{% tab title="404" %}

```json
{
    "error": "Meeting file not found"
}
```

{% endtab %}
{% endtabs %}


# Users

## User actions

## Get all information about your profile

<mark style="color:blue;">`GET`</mark> `https://app.zencal.io/api/v1/profile`

The method returns information on the user to whom the API key applies

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

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

```json
{
    "email": "joe.smith@hotmail.com"
    "username": "joe-smith",
    "phone": "+32100200300",
    "firstName": "Joe",
    "lastName": "Smith",
    "avatar": "https://cdn.zencal.io/avatar.png",
    "availableMeetingPlaces": [
        {
            "value": "zoom",
            "name": "Zoom"
        },
        {
            "value": "google-meet",
            "name": "Google Meet"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Update your profile information

<mark style="color:purple;">`PATCH`</mark> `https://app.zencal.io/api/v1/profile`

#### Headers

| Name                                               | Type   | Description      |
| -------------------------------------------------- | ------ | ---------------- |
| X-Zencal-Api-Key<mark style="color:red;">\*</mark> | String | Zencal Api key   |
| Content-Type<mark style="color:red;">\*</mark>     | String | application/json |
| Accept<mark style="color:red;">\*</mark>           | String | application/json |

#### Request Body

| Name        | Type   | Description                                                                   |
| ----------- | ------ | ----------------------------------------------------------------------------- |
| email       | String | User's email                                                                  |
| firstName   | String | User's first name                                                             |
| lastName    | String | User's last name                                                              |
| phone       | String | Phone number                                                                  |
| phonePrefix | String | <p>Phone number prefix eg. 43</p><p></p><p>It's required if phone is sent</p> |

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

```json
{
    "email": "joe.smith@hotmail.com"
    "username": "joe-smith",
    "phone": "+32100200300",
    "firstName": "Joe",
    "lastName": "Smith",
    "avatar": "https://cdn.zencal.io/avatar.png",
    "availableMeetingPlaces": [
        {
            "value": "zoom",
            "name": "Zoom"
        },
        {
            "value": "google-meet",
            "name": "Google Meet"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


