# SignUp API

## Overview

The **SignUp API** is used to register a new user in the Pokerscript poker platform. Once a user successfully signs up in your system, this API should be called to create the corresponding account in TronPoker.

## **Endpoint**

`POST http://admin.pokerurl.com/api/signin`

## Headers

| Key            | Value                | Description                        |
| -------------- | -------------------- | ---------------------------------- |
| `AuthKey`      | `489j4erwginerwgirn` | Client key provided by Pokerscript |
| `Accept`       | `application/JSON`   | Specifies response format          |
| `Content-Type` | `application/JSON`   | Specifies request format           |

## Request Body

The request body should be formatted in JSON and include the following fields:

```
{
    "username": "username",
    "password": "123456",
    "phone_number": "+19177649944",
    "email": "support@pokerscript.com"
}
```

#### Parameters

| Parameter      | Type   | Description                        |
| -------------- | ------ | ---------------------------------- |
| `username`     | string | Unique username for the player     |
| `password`     | string | Secure password for authentication |
| `phone_number` | string | Contact number of the player       |
| `email`        | string | Email address of the player        |

## Success Response

Upon successful signup, the API returns a `200 OK` status with the following response:

```
{
    "status": true,
    "message": "Signup Successfully"
}
```

#### Response Parameters

| Parameter | Type    | Description                                  |
| --------- | ------- | -------------------------------------------- |
| `status`  | Boolean | Indicates success (`true`)                   |
| `message` | String  | Confirmation message (`Signup Successfully`) |

## Error Responses

If the request fails, an error response is returned with the corresponding status code:

#### `401 Unauthorized`

```
{
    "status": false,
    "message": "Invalid Authorization Token"
}
```

#### `404 Not Found`

```
{
    "status": false,
    "message": "User Not Found"
}
```

#### `500 Internal Server Error`

```
{
    "status": false,
    "message": "Something Went Wrong"
}
```

## Additional Notes

* Ensure that all required fields are included in the request body to prevent errors.
* The signup process must be completed before attempting to log in or use other APIs.
