Skip to content

Institutions ​

Institutions, privacy policy and terms of use of each one.

List the institutions the person can see ​

GET /instituicoes

Access: Requires the capability LER, in some scope (the response only includes what the person can see). Success status: 200.

Query parameters

ParameterTypeRequiredConstraintsDescription
buscastringnoto 100 charactersSearch text (name or email, depending on the route).
limiteintegerno1…200; default: 50How many items per page (1 to 200; the default varies by route, usually 50).
deslocamentointegerno0…100000; default: 0How many items to skip, for paging (up to 100000).
inativos"true" | "false"nodefault: "false"true also includes inactive records.

Response

list of InstituicaoDto (+ total)

FieldTypeRequiredConstraintsDescription
idstring (uuid)yes
siglastringyes
nomestringyes
ativobooleanyes
locale"pt-BR" | "es" | "en-US" or nullyes
timezonestringyes
retencaoMesesinteger or nullyes
controladorNomestring or nullnoThe institution's privacy data; the API always sends them (null when not provided).
encarregadoNomestring or nullno
contatoPrivacidadestring or nullno

On error: ErroApi model.

Example

bash
curl -X GET "$API/instituicoes" -H "Authorization: Bearer $TOKEN"

Create an institution and invite its first curator ​

POST /instituicoes

Access: Requires the capability PLATAFORMA. Success status: 201.

Request body (InstituicaoCriar)

FieldTypeRequiredConstraintsDescription
siglastringyes^[A-Za-z0-9][A-Za-z0-9._-]{1,19}$
nomestringyes1–200 characters
locale"pt-BR" | "es" | "en-US" or nullno
timezoneFusono
retencaoMesesinteger or nullno1…600
curadorobjectnoThe institution's first curator: receives the invitation by email.
curador.emailEmailyes
curador.nomestringyes1–200 characters

Response

InstituicaoDto

FieldTypeRequiredConstraintsDescription
idstring (uuid)yes
siglastringyes
nomestringyes
ativobooleanyes
locale"pt-BR" | "es" | "en-US" or nullyes
timezonestringyes
retencaoMesesinteger or nullyes
controladorNomestring or nullnoThe institution's privacy data; the API always sends them (null when not provided).
encarregadoNomestring or nullno
contatoPrivacidadestring or nullno

On error: ErroApi model.

Example

bash
curl -X POST "$API/instituicoes" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"sigla":"texto","nome":"texto"}'

Read an institution ​

GET /instituicoes/{instituicaoId}

Access: Requires the capability LER over institution (params.instituicaoId). Success status: 200.

Path parameters

ParameterTypeRequiredConstraintsDescription
instituicaoIdstring (uuid)yesInstitution id.

Response

InstituicaoDto

FieldTypeRequiredConstraintsDescription
idstring (uuid)yes
siglastringyes
nomestringyes
ativobooleanyes
locale"pt-BR" | "es" | "en-US" or nullyes
timezonestringyes
retencaoMesesinteger or nullyes
controladorNomestring or nullnoThe institution's privacy data; the API always sends them (null when not provided).
encarregadoNomestring or nullno
contatoPrivacidadestring or nullno

On error: ErroApi model.

Example

bash
curl -X GET "$API/instituicoes/{instituicaoId}" -H "Authorization: Bearer $TOKEN"

Update an institution ​

PATCH /instituicoes/{instituicaoId}

Access: Requires the capability ADMINISTRAR over institution (params.instituicaoId). Success status: 200.

Path parameters

ParameterTypeRequiredConstraintsDescription
instituicaoIdstring (uuid)yesInstitution id.

Request body (InstituicaoAtualizar)

FieldTypeRequiredConstraintsDescription
nomestringno1–200 characters
locale"pt-BR" | "es" | "en-US" or nullno
timezoneFusono
retencaoMesesinteger or nullno1…600
controladorNomestring or nullno1–200 charactersPrivacy (LGPD): null clears the value and goes back to the platform default.
encarregadoNomestring or nullno1–200 characters
contatoPrivacidadeEmail or nullno
ativobooleanno

Response

InstituicaoDto

FieldTypeRequiredConstraintsDescription
idstring (uuid)yes
siglastringyes
nomestringyes
ativobooleanyes
locale"pt-BR" | "es" | "en-US" or nullyes
timezonestringyes
retencaoMesesinteger or nullyes
controladorNomestring or nullnoThe institution's privacy data; the API always sends them (null when not provided).
encarregadoNomestring or nullno
contatoPrivacidadestring or nullno

On error: ErroApi model.

Example

bash
curl -X PATCH "$API/instituicoes/{instituicaoId}" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{}'

Read the institution's current privacy policy ​

GET /instituicoes/{instituicaoId}/politica-privacidade

Access: Requires the capability LER over institution (params.instituicaoId). Success status: 200.

Path parameters

ParameterTypeRequiredConstraintsDescription
instituicaoIdstring (uuid)yesInstitution id.

Response

PoliticaDto

FieldTypeRequiredConstraintsDescription
versaointeger or nullyes
textosTermoTextosyes
publicadoEmstring (date-time) or nullyes
urlPublicastringyes

On error: ErroApi model.

Example

bash
curl -X GET "$API/instituicoes/{instituicaoId}/politica-privacidade" -H "Authorization: Bearer $TOKEN"

Publish a new version of the privacy policy ​

PUT /instituicoes/{instituicaoId}/politica-privacidade

Access: Requires the capability ADMINISTRAR over institution (params.instituicaoId). Success status: 200.

Path parameters

ParameterTypeRequiredConstraintsDescription
instituicaoIdstring (uuid)yesInstitution id.

Request body (TermoPublicar)

FieldTypeRequiredConstraintsDescription
textosTermoTextosyes

Response

PoliticaDto

FieldTypeRequiredConstraintsDescription
versaointeger or nullyes
textosTermoTextosyes
publicadoEmstring (date-time) or nullyes
urlPublicastringyes

On error: ErroApi model.

Example

bash
curl -X PUT "$API/instituicoes/{instituicaoId}/politica-privacidade" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"textos":{}}'

Read the institution's current terms of use ​

GET /instituicoes/{instituicaoId}/termo

Access: Requires the capability LER over institution (params.instituicaoId). Success status: 200.

Path parameters

ParameterTypeRequiredConstraintsDescription
instituicaoIdstring (uuid)yesInstitution id.

Response

TermoDto

FieldTypeRequiredConstraintsDescription
versaointeger or nullyes
textosTermoTextosyes
publicadoEmstring (date-time) or nullyes

On error: ErroApi model.

Example

bash
curl -X GET "$API/instituicoes/{instituicaoId}/termo" -H "Authorization: Bearer $TOKEN"

Publish a new version of the terms of use ​

PUT /instituicoes/{instituicaoId}/termo

Access: Requires the capability ADMINISTRAR over institution (params.instituicaoId). Success status: 200.

Path parameters

ParameterTypeRequiredConstraintsDescription
instituicaoIdstring (uuid)yesInstitution id.

Request body (TermoPublicar)

FieldTypeRequiredConstraintsDescription
textosTermoTextosyes

Response

TermoDto

FieldTypeRequiredConstraintsDescription
versaointeger or nullyes
textosTermoTextosyes
publicadoEmstring (date-time) or nullyes

On error: ErroApi model.

Example

bash
curl -X PUT "$API/instituicoes/{instituicaoId}/termo" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"textos":{}}'

contato@presente.app.br