> For the complete documentation index, see [llms.txt](https://ckdals5815.gitbook.io/birthwiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ckdals5815.gitbook.io/birthwiki/master.md).

# Initial page

### USER

## &#x20;LOGIN

<mark style="color:green;">`POST`</mark> `https://server.birthwiki.space/user/login`

This endpoint allows you to get free cakes.

#### Request Body

| Name              | Type   | Description  |
| ----------------- | ------ | ------------ |
| AuthorizationCode | string | Oauth Code   |
| source            | string | login source |
| userEmail         | string | userEmail    |
| password          | string | password     |

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

```
{
  data: {
    nickName: roadman,
    profileImage: imageURL,
    accessToken: accessToken,
    likeCard: [
      {...},
      {    //issue&birth&death card
       id: 3,
       date: 7-5,
       image: image url
       category: 'birth',
       contents: [[year, [content1, content2...]], ...]
      },
      {    //music&movie card
       id: 8,
       date: 1997-14,
       image: image url,
       category: 'music' or 'movie'
       korea: { title: '극한직업', poster: image url }
       world: { title: '라일락', poster: image url singer?: 아이유}
      }
    ],
    recordCard: [
      {...},
      {...},
      {
        id: 1,
        date: '1977-6-3'
        cardDesc: text
        cardImage: image url
      }
    ]
  },
  message: "logIn"
}

cookies(refreshToken)
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}

{% tab title="401 " %}

```
{ message: "unregistered user" }
```

{% endtab %}
{% endtabs %}

## LOGOUT

<mark style="color:green;">`POST`</mark> `https://server.birthwiki.space/user/logout`

#### Headers

| Name    | Type   | Description  |
| ------- | ------ | ------------ |
| cookies | string | refreshToken |

#### Request Body

| Name        | Type   | Description               |
| ----------- | ------ | ------------------------- |
| accessToken | string | \`Bearer ${accessToken}\` |

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

```
{ message: "logOut" }
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

## SIGNUP

<mark style="color:green;">`POST`</mark> `https://server.birthwiki.space/user/signup`

#### Request Body

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| profileImage | string | Image       |
| userEmail    | string | userEmail   |
| nickName     | string | nickName    |
| password     | string | password    |

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

```
{ message: "singUp" }
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

## SIGNOUT

<mark style="color:green;">`POST`</mark> `https://server.birthwiki.space/user/signout`

#### Headers

| Name    | Type   | Description  |
| ------- | ------ | ------------ |
| cookies | string | refreshToken |

#### Request Body

| Name        | Type   | Description               |
| ----------- | ------ | ------------------------- |
| userEmail   | string | userEmail                 |
| password    | string | password                  |
| accessToken | string | \`Bearer ${accessToken}\` |

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

```
{ message: "signOut" }
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

## DUPLICATE - EMAIL

<mark style="color:blue;">`GET`</mark> `https://server.birthwiki.space/user/exist`

#### Query Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| nickName  | string | nickName    |
| userEmail | string | userEmail   |

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

```
{ message: "available" }
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}

{% tab title="401 " %}

```
{ message: "not available" }
```

{% endtab %}
{% endtabs %}

## USERINFO - GET

<mark style="color:blue;">`GET`</mark> `https://server.birthwiki.space/user/info`

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | \`Bearer ${accessToken}\` |

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

```
```

{% endtab %}
{% endtabs %}

## USERINFO - UPDATE

<mark style="color:purple;">`PATCH`</mark> `https://server.birthwiki.space/user/update`

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | \`Bearer ${accessToken}\` |

#### Request Body

| Name         | Type   | Description     |
| ------------ | ------ | --------------- |
| profileImage | string | Image           |
| nickName     | string | change nickName |
| password     | string | change password |

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

```
{ message: "update userInfo" }
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

### DATA BY WIKI

## DATA BY DATE

<mark style="color:blue;">`GET`</mark> `https://server.birthwiki.space/data/date`

#### Query Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| date | string | yyyy-mm-dd  |

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

```
{
  data: {
    issueCard: {   //issue&birth&death card
       id: 3,
       date: 7-5,
       image: image url
       category: 'issue',
       contents: [[year, [content1, content2...]], ...]
    },
    birthCard: {...},
    deathCard: {...},
    musicCard: {
       id: 8,
       date: 1997-14,
       image: image url,
       category: 'music' or 'movie'
       korea: { title: '극한직업', poster: image url, singer: 아이유 }
       world: { title: 'peaches', poster: image url, singer: 비버}
    },
    movieCard: {
       id: 8,
       date: 1997-14,
       image: image url,
       category: 'music' or 'movie'
       korea: { title: '극한직업', poster: image url }
       world: { title: 'avengers', poster: image url }
    }
  },
  message: "data by date"
}
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

### DATA BY ME

## LIKES - LIKE or CANCEL

<mark style="color:green;">`POST`</mark> `https://server.birthwiki.space/like`

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | \`Bearer ${accessToken}\` |

#### Request Body

| Name     | Type   | Description   |
| -------- | ------ | ------------- |
| action   | string | like / cancel |
| cardId   | string | card Id       |
| category | string | card category |

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

```
{
  data: {
    likeCards: [       //new likeCards
      {...},
      {...}
    ]
  },
  message: "action success"
}
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

### DATA RECORD

## RECORD - CREATE

<mark style="color:green;">`POST`</mark> `https://server.bitrhwiki.space/record/create`

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | \`Bearer ${accessToken}\` |

#### Request Body

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| cardImage | string  |             |
| privacy   | boolean |             |
| date      | string  |             |
| contents  | string  |             |

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

```
{
  data: {
    recordCards: [    //new recordCards
      {...},
      {...}
    ]
  },
  message: "create record"
}
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

## RECORD - UPDATE

<mark style="color:purple;">`PATCH`</mark> `https://server.birthwiki.space/record/update`

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | \`Bearer ${accessToken}\` |

#### Request Body

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| cardImage | string  |             |
| privacy   | boolean |             |
| cardId    | string  |             |
| contents  | string  |             |

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

```
{
  data: {
    recordCards: [    //new recordCards
      {...},
      {...}
    ]
  },
  message: "update record"
}
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}

## RECORD - DELETE

<mark style="color:red;">`DELETE`</mark> `https://server.birthwiki.space/record/delete`

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | \`Bearer ${accessToken}\` |

#### Request Body

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| cardId | string |             |

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

```
{
  data: {
    recordCards: [    //new recordCards
      {...},
      {...}
    ]
  },
  message: "delete record"
}
```

{% endtab %}

{% tab title="400 " %}

```
{ message: "something wrong" }
```

{% endtab %}
{% endtabs %}
