> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.crehana.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.crehana.com/_mcp/server.

# Reinstatement User

POST https://www.crehana.com/api/v5/rest/org/{organization_slug}/users/reactivate-user/
Content-Type: application/json

**Purpose:** Reinstate a user in the platform who already existed but was previously removed.
**Scope:** Restores access to a preexisting user in the platform.

Reference: https://developer.crehana.com/api-reference/endpoints/users/reactivate-user

## Authentication

- `Api-Key` header (required) — API key of the organization. Always sent together with the `Secret-Access` header.

## Servers

- `https://www.crehana.com` (Production, default)
- `https://qa.creha.co` (QA)

## Request

### Path parameters

- `organization_slug` (string, required)

### Body (application/json)

This endpoint expects a CreateUserInput.

- `first_name` (string, required) — First name of the user
- `last_name` (string, required) — Last name of the user
- `email` (string, required) — Email of the user
- `area_level_1_id` (integer, required) — Id of the organization direction (Area level 1)
- `position_id` (integer, required) — Id of the position related to the user
- `position_category_id` (integer, required) — Id of the position category
- `area_level_2_id` (integer, optional) — Id of the organization department (Area level 2)
- `area_level_3_id` (integer, optional) — Id of the organization office (Area level 3)
- `area_level_4_id` (integer, optional) — Id of the organization suboffice (Area level 4)
- `headquarter_id` (integer, optional) — Id of the organization headquarter
- `boss_email` (string, optional) — Email of the user's boss
- `boss_id` (integer, optional) — User id of the user's boss
- `document_type` (enum, optional) — Document type of the user
  - Allowed values: `id`, `passport`, `cc`, `ce`, `dni`, `dui`, `ti`, `nit`, `rc`, `rut`, `ife`, `other`
- `document` (string, optional) — Document of the user
- `gender` (enum, optional) — Gender of the user
  - Allowed values: `men`, `women`, `other`
- `civil_status` (enum, optional) — Civil status of the user
  - Allowed values: `single`, `married`, `divorced`, `widowed`, `free_union`, `de_facto_union`, `other`
- `phone_1` (string, optional) — Phone number 1 of the user
- `phone_2` (string, optional) — Phone number 2 of the user
- `address` (string, optional) — Address of the user
- `city` (string, optional) — City of the user
- `country` (enum, optional) — Country of the user
  - Allowed values: `CO`, `US`, `MX`, `AR`, `CL`, `EC`, `BO`, `UY`, `PY`, `PE`, `other`
- `deactivation_date` (date, optional) — Deactivation date of the user in format YYYY-MM-DD
- `incorporation_date` (date, optional) — Incorporation date of the user in format YYYY-MM-DD
- `birth_date` (date, optional) — Birth date of the user in format YYYY-MM-DD
- `send_invitation` (boolean, optional) — If the value is true, it will send an activation invitation to the user's email.
- `username` (string, optional) — Username of the user

## Response

### 200

Successful Response

- `message` (string, required) — Message of the response
- `code` (string, required) — Internal code of the response
- `datetime` (string, required) — Datetime of the API in ISO Format
- `data` (CreateUserData, optional)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### CreateUserData

- `id` (integer, required)
- `first_name` (string, required)
- `last_name` (string, required)
- `email` (string, required)
- `is_active` (boolean, required)
- `created_at` (datetime, required)
- `username` (string, optional)
- `updated_at` (datetime, optional)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

## Examples

**Request**

```json
{
  "first_name": "John",
  "last_name": "Doe",
  "email": "jhondoe@example.com",
  "area_level_1_id": 1,
  "position_id": 1,
  "position_category_id": 1,
  "area_level_2_id": 1,
  "area_level_3_id": 1,
  "area_level_4_id": 1,
  "headquarter_id": 1,
  "boss_email": "boss@example.com",
  "boss_id": 1,
  "document_type": "id",
  "document": "123456789",
  "gender": "men",
  "civil_status": "single",
  "phone_1": "123456789",
  "phone_2": "123456789",
  "address": "Calle Siempre Viva 123",
  "city": "Bogota",
  "country": "CO",
  "deactivation_date": "2025-05-06",
  "incorporation_date": "1993-05-06"
}
```

**Response**

```json
{
  "message": "User created successfully.",
  "code": "users-004",
  "datetime": "2024-01-15T10:30:00.000000",
  "data": {
    "id": 1,
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "is_active": true,
    "created_at": "2024-01-15T10:30:00",
    "username": "johndoe"
  }
}
```

**SDK Code**

```python
import requests

url = "https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/"

payload = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "jhondoe@example.com",
    "area_level_1_id": 1,
    "position_id": 1,
    "position_category_id": 1,
    "area_level_2_id": 1,
    "area_level_3_id": 1,
    "area_level_4_id": 1,
    "headquarter_id": 1,
    "boss_email": "boss@example.com",
    "boss_id": 1,
    "document_type": "id",
    "document": "123456789",
    "gender": "men",
    "civil_status": "single",
    "phone_1": "123456789",
    "phone_2": "123456789",
    "address": "Calle Siempre Viva 123",
    "city": "Bogota",
    "country": "CO",
    "deactivation_date": "2025-05-06",
    "incorporation_date": "1993-05-06"
}
headers = {
    "Secret-Access": "Secret-Access",
    "Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/';
const options = {
  method: 'POST',
  headers: {
    'Secret-Access': 'Secret-Access',
    'Api-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"first_name":"John","last_name":"Doe","email":"jhondoe@example.com","area_level_1_id":1,"position_id":1,"position_category_id":1,"area_level_2_id":1,"area_level_3_id":1,"area_level_4_id":1,"headquarter_id":1,"boss_email":"boss@example.com","boss_id":1,"document_type":"id","document":"123456789","gender":"men","civil_status":"single","phone_1":"123456789","phone_2":"123456789","address":"Calle Siempre Viva 123","city":"Bogota","country":"CO","deactivation_date":"2025-05-06","incorporation_date":"1993-05-06"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/"

	payload := strings.NewReader("{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"email\": \"jhondoe@example.com\",\n  \"area_level_1_id\": 1,\n  \"position_id\": 1,\n  \"position_category_id\": 1,\n  \"area_level_2_id\": 1,\n  \"area_level_3_id\": 1,\n  \"area_level_4_id\": 1,\n  \"headquarter_id\": 1,\n  \"boss_email\": \"boss@example.com\",\n  \"boss_id\": 1,\n  \"document_type\": \"id\",\n  \"document\": \"123456789\",\n  \"gender\": \"men\",\n  \"civil_status\": \"single\",\n  \"phone_1\": \"123456789\",\n  \"phone_2\": \"123456789\",\n  \"address\": \"Calle Siempre Viva 123\",\n  \"city\": \"Bogota\",\n  \"country\": \"CO\",\n  \"deactivation_date\": \"2025-05-06\",\n  \"incorporation_date\": \"1993-05-06\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Secret-Access", "Secret-Access")
	req.Header.Add("Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Secret-Access"] = 'Secret-Access'
request["Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"email\": \"jhondoe@example.com\",\n  \"area_level_1_id\": 1,\n  \"position_id\": 1,\n  \"position_category_id\": 1,\n  \"area_level_2_id\": 1,\n  \"area_level_3_id\": 1,\n  \"area_level_4_id\": 1,\n  \"headquarter_id\": 1,\n  \"boss_email\": \"boss@example.com\",\n  \"boss_id\": 1,\n  \"document_type\": \"id\",\n  \"document\": \"123456789\",\n  \"gender\": \"men\",\n  \"civil_status\": \"single\",\n  \"phone_1\": \"123456789\",\n  \"phone_2\": \"123456789\",\n  \"address\": \"Calle Siempre Viva 123\",\n  \"city\": \"Bogota\",\n  \"country\": \"CO\",\n  \"deactivation_date\": \"2025-05-06\",\n  \"incorporation_date\": \"1993-05-06\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/")
  .header("Secret-Access", "Secret-Access")
  .header("Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"email\": \"jhondoe@example.com\",\n  \"area_level_1_id\": 1,\n  \"position_id\": 1,\n  \"position_category_id\": 1,\n  \"area_level_2_id\": 1,\n  \"area_level_3_id\": 1,\n  \"area_level_4_id\": 1,\n  \"headquarter_id\": 1,\n  \"boss_email\": \"boss@example.com\",\n  \"boss_id\": 1,\n  \"document_type\": \"id\",\n  \"document\": \"123456789\",\n  \"gender\": \"men\",\n  \"civil_status\": \"single\",\n  \"phone_1\": \"123456789\",\n  \"phone_2\": \"123456789\",\n  \"address\": \"Calle Siempre Viva 123\",\n  \"city\": \"Bogota\",\n  \"country\": \"CO\",\n  \"deactivation_date\": \"2025-05-06\",\n  \"incorporation_date\": \"1993-05-06\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/', [
  'body' => '{
  "first_name": "John",
  "last_name": "Doe",
  "email": "jhondoe@example.com",
  "area_level_1_id": 1,
  "position_id": 1,
  "position_category_id": 1,
  "area_level_2_id": 1,
  "area_level_3_id": 1,
  "area_level_4_id": 1,
  "headquarter_id": 1,
  "boss_email": "boss@example.com",
  "boss_id": 1,
  "document_type": "id",
  "document": "123456789",
  "gender": "men",
  "civil_status": "single",
  "phone_1": "123456789",
  "phone_2": "123456789",
  "address": "Calle Siempre Viva 123",
  "city": "Bogota",
  "country": "CO",
  "deactivation_date": "2025-05-06",
  "incorporation_date": "1993-05-06"
}',
  'headers' => [
    'Api-Key' => '<apiKey>',
    'Content-Type' => 'application/json',
    'Secret-Access' => 'Secret-Access',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/");
var request = new RestRequest(Method.POST);
request.AddHeader("Secret-Access", "Secret-Access");
request.AddHeader("Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"email\": \"jhondoe@example.com\",\n  \"area_level_1_id\": 1,\n  \"position_id\": 1,\n  \"position_category_id\": 1,\n  \"area_level_2_id\": 1,\n  \"area_level_3_id\": 1,\n  \"area_level_4_id\": 1,\n  \"headquarter_id\": 1,\n  \"boss_email\": \"boss@example.com\",\n  \"boss_id\": 1,\n  \"document_type\": \"id\",\n  \"document\": \"123456789\",\n  \"gender\": \"men\",\n  \"civil_status\": \"single\",\n  \"phone_1\": \"123456789\",\n  \"phone_2\": \"123456789\",\n  \"address\": \"Calle Siempre Viva 123\",\n  \"city\": \"Bogota\",\n  \"country\": \"CO\",\n  \"deactivation_date\": \"2025-05-06\",\n  \"incorporation_date\": \"1993-05-06\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Secret-Access": "Secret-Access",
  "Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "first_name": "John",
  "last_name": "Doe",
  "email": "jhondoe@example.com",
  "area_level_1_id": 1,
  "position_id": 1,
  "position_category_id": 1,
  "area_level_2_id": 1,
  "area_level_3_id": 1,
  "area_level_4_id": 1,
  "headquarter_id": 1,
  "boss_email": "boss@example.com",
  "boss_id": 1,
  "document_type": "id",
  "document": "123456789",
  "gender": "men",
  "civil_status": "single",
  "phone_1": "123456789",
  "phone_2": "123456789",
  "address": "Calle Siempre Viva 123",
  "city": "Bogota",
  "country": "CO",
  "deactivation_date": "2025-05-06",
  "incorporation_date": "1993-05-06"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://www.crehana.com/api/v5/rest/org/organization_slug/users/reactivate-user/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```