# 회원가입

## /api/accounts

<mark style="color:green;">`POST`</mark> `http://localhost:8080/api/accounts`

이메일, 비밀번호, 이름, 프로필 사진 이용하여 회원가입 요청을 할 수 있습니다.

#### Headers

| Name         | Type   | Description                    |
| ------------ | ------ | ------------------------------ |
| Content-Type | string | application/json;charset=UTF-8 |

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| email    | string | 이메일         |
| password | string | 비밀번호        |
| name     | string | 이름          |
| picture  | string | 프로필 사진      |

{% tabs %}
{% tab title="201 회원가입에 대한 결과를 반환합니다." %}

```
{
    "idx":1,
    "email":"test@email.com",
    "password":"{bcrypt}$2a$10$veTJPahkwHUeMjQ2StxPlO7Nwcb9wKwFHp2ZtqK4rNLhZUFlqq3NC",
    "name":"name",
    "picture":"picture",
    "_links":{
        "self":{
            "href":"http://localhost/api/accounts"
        }
    }
}
```

{% endtab %}

{% tab title="400 에러 메세지를 반환합니다." %}

```
{
    "message" : "Bad Request"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

```
GET https://ksyj8256.gitbook.io/login-base-token-api/undefined-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
