---
title: "Emitir documento"
---

> Documentation Index
> Fetch the complete documentation index at: https://sovra-id-docs-1044960690985.us-central1.run.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Emitir documento

Path: Sovra ID API › Documentos firmados

`POST /api/v1/issuer/documents`

URL: `https://test-api-sovra.flagonsa.com/api/v1/issuer/documents`

Emite un documento con un schema previamente diseñado. Una sola llamada valida, firma y ancla: esperar hasta ~90 segundos.

→ 201 si se creó exitosamente. **Conservar el `credential`**: ese string es el documento, autocontenido y verificable.

Errores: 409 workspace_not_provisioned, 422 wrong_schema_kind / missing_claims / invalid_visibility, 503 chain_not_configured.

## Authentication

- `apiKey`, http bearer, header `Authorization`

## Request body

_Required._

- `schema_id` (`issueDocument.schema_id`; string, optional)
- `claims` (`issueDocument.claims`; object, optional)
  - `claim_key` (`issueDocument.claims.claim_key`; string, optional)
- `visibility` (`issueDocument.visibility`; string, optional)

## Example requests

### Emitir documento

```json
{
  "schema_id": "<schema_id>",
  "claims": {
    "claim_key": "valor"
  },
  "visibility": "private"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://test-api-sovra.flagonsa.com/api/v1/issuer/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "schema_id": "<schema_id>",
  "claims": {
    "claim_key": "valor"
  },
  "visibility": "private"
}
'
```

### TypeScript

```typescript
const url = 'https://test-api-sovra.flagonsa.com/api/v1/issuer/documents';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({schema_id: '<schema_id>', claims: {claim_key: 'valor'}, visibility: 'private'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://test-api-sovra.flagonsa.com/api/v1/issuer/documents"

payload = {
    "schema_id": "<schema_id>",
    "claims": { "claim_key": "valor" },
    "visibility": "private"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Respuesta exitosa. La colección de Postman de origen no incluye el cuerpo de la respuesta; ver la guía de referencia.


Source: https://sovra-id-docs-1044960690985.us-central1.run.app/api/issue-document/index.md
