> For the complete documentation index, see [llms.txt](https://docs.certdox.com.br/gateway-de-registros/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.certdox.com.br/gateway-de-registros/reference/readme/url-de-documento.md).

# URL de Documento

Gerando URL de documentos

<mark style="color:green;">`POST`</mark> `https://registroeletronico-homolog.cdxti.com.br/api/document-urls`

#### Headers

| Name          | Type         | Description                              |
| ------------- | ------------ | ---------------------------------------- |
| Authorization | Bearer Token | Token gerado pelo método de autenticação |

#### Request Body

| Name                                           | Type   | Description                                                          |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------- |
| filename<mark style="color:red;">\*</mark>     | string | Nome do arquivo                                                      |
| organization<mark style="color:red;">\*</mark> | object | Organização autorizada a realizar essa operação                      |
| customerIdentifier                             | String | CPF/CNPJ do cliente/participante para o qual a url está sendo gerada |

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

```javascript
{
    "organization": {
        "id": 1051,
        "identifier": "00000000000000"
    },
    "url": "https://registro-eletronico-homolog-bucket.s3.us-east-2.amazonaws.com/20061411000102/year%3D2022/month%3D6/day%3D30/documento.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220630T133413Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=AKIAVJOLW6XB6RH7BDOA%2F20220630%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Signature=e8f9695b9be8d336ef2ac5363fa4fa3002ada7b940a63015e59427efb623cdaf",
    "filename": "documento.pdf"
}
```

{% endtab %}

{% tab title="401 Permission denied" %}

```json
{
    "type": "https://registroeletronico.certdox.com.br/problem/problem-with-message",
    "title": "Unauthorized",
    "status": 401,
    "detail": "Full authentication is required to access this resource",
    "path": "/api/document-urls",
    "message": "error.http.401"
}
```

{% endtab %}
{% endtabs %}

#### Organization - Schema

```json
{
    "identifier": "00000000000000" // CNPJ | String | Required | mix = 14, max = 14
}
```

#### Exemplo de Payload Completo

```json
{
    "organization": {
        "identifier": "00000000000000"
    },
    "customerIdentifier": "00000000000000", // CPF ou CNPJ | String | Required | min = 11, max = 14
    "filename": "documento.pdf"
}
```
