# POST /user/:userID/resume

## PDF/DOCX IMPORT

## Upload a resume file

<mark style="color:green;">`POST`</mark> `https://open-api.rezi.ai/v1/user/:userID/resume`

#### Path Parameters

| Name                                     | Type   | Description |
| ---------------------------------------- | ------ | ----------- |
| userID<mark style="color:red;">\*</mark> | String | User ID     |

#### Headers

| Name                                             | Type    | Description     |
| ------------------------------------------------ | ------- | --------------- |
| Content-Type<mark style="color:red;">\*</mark>   | String  | application/pdf |
| Content-Length<mark style="color:red;">\*</mark> | Integer | File length     |

#### Request Body

| Name                                   | Type | Description |
| -------------------------------------- | ---- | ----------- |
| file<mark style="color:red;">\*</mark> | file | file        |

{% tabs %}
{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized Token is not authorized" %}

```javascript
{
    "status": "error",
    "errorCode": "resume-upload-01",
    "errorMessage": "token unauthorized"
}
```

{% endtab %}

{% tab title="400: Bad Request File not supported" %}

```javascript
{
    "status": "error",
    "errorCode": "resume-upload-02",
    "errorMessage": "file format not supported"
}
```

{% endtab %}

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

```javascript
{    
    "status": "success",
    "data": {
        "resumeID": "123456789abc"
    }
}
```

{% endtab %}
{% endtabs %}

CURL Example:

```shell
curl --location --request POST 'https://open-api.rezi.ai/v1/user/{userID}/resume' \
--header 'Authorization: Bearer {YOUR PRIVATE TOKEN}' \
--form '=@"/path/to/file/resume.pdf"'
```

NODE JS (REQUEST) Example:

```javascript
var request = require('request');
var fs = require('fs');
var options = {
  'method': 'POST',
  'url': 'https://open-api.rezi.ai/v1/user/{userID}/resume',
  'headers': {
    'Authorization': 'Bearer {YOUR PRIVATE TOKEN}'
  },
  formData: {
    '': {
      'value': fs.createReadStream('/path/to/file/resume.pdf'),
      'options': {
        'filename': 'resume.pdf',
        'contentType': null
      }
    }
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

## JSON IMPORT

{% hint style="info" %}
To use JSON import, first contact your account administrator to get your custom JSON parser integrated to our system.
{% endhint %}

## Upload a resume file

<mark style="color:green;">`POST`</mark> `https://open-api.rezi.ai/v1/user/:userID/resume`

#### Path Parameters

| Name                                     | Type   | Description |
| ---------------------------------------- | ------ | ----------- |
| userID<mark style="color:red;">\*</mark> | String | User ID     |

#### Query Parameters

| Name                                   | Type   | Description                                                                   |
| -------------------------------------- | ------ | ----------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "JSON"                                                                        |
| client                                 | String | "your\_rms\_name", you need to communicate your json format to the team first |

#### Headers

| Name                                             | Type    | Description      |
| ------------------------------------------------ | ------- | ---------------- |
| Content-Type<mark style="color:red;">\*</mark>   | String  | application/json |
| Content-Length<mark style="color:red;">\*</mark> | Integer | File length      |

#### Request Body

| Name                               | Type   | Description |
| ---------------------------------- | ------ | ----------- |
| <mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized Token is not authorized" %}

```javascript
{
    "status": "error",
    "errorCode": "resume-upload-01",
    "errorMessage": "token unauthorized"
}
```

{% endtab %}

{% tab title="400: Bad Request File not supported" %}

```javascript
{
    "status": "error",
    "errorCode": "resume-upload-02",
    "errorMessage": "file format not supported"
}
```

{% endtab %}

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

```javascript
{    
    "status": "success",
    "data": {
        "resumeID": "123456789abc"
    }
}
```

{% endtab %}
{% endtabs %}

CURL Example:

```shell
curl --location --request POST 'https://open-api.rezi.ai/v1/user/{userID}/resume?type=json&client=your_rms_name' \
--header 'Authorization: Bearer {YOUR PRIVATE TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Result": {
        "Success": true,
        "ErrorMessage": ""
    },
    "Data": {
        "Student": {
           ...
        },
        "Records": [
            {...},
            {...}
        ]
    }
}'
```

NODE JS (REQUEST) Example:

```javascript
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://open-api.rezi.ai/v1/user/{userID}/resume?type=json&client=your_rms_name'
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer {YOUR PRIVATE TOKEN}'
  },
  body: JSON.stringify({
    "Result": {
      "Success": true,
      "ErrorMessage": ""
    },
    "Data": {
        "Student": {
           ...
        },
        "Records": [
            {...},
            {...}
        ]
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
```


---

# 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://rezi-1.gitbook.io/rms-guide/rezi-api/resume/post-user-userid-resume.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.
