Skip to content

API: Institution

Endpoints for managing the institution's profile data.

Base path

/institution

Endpoints

GET /institution

Return the institution's profile data.

Request:

No parameters.

Response:

StatusDescriptionBody
200Institution data{ id, name, slug, instagram, whatsapp, pixKey }
404Institution not found{ message: string }

Business rules:

  • Always targets the single institution record (no ID in the path).
  • Soft-deleted institution is treated as not found.

PATCH /institution

Update the institution's contact and identity fields. All fields are optional — only provided fields are updated.

Request:

LocationFieldTypeRequiredDescription
bodyinstagramstringnoInstagram handle (without @, max 255 chars)
bodywhatsappstringnoWhatsApp number — digits only (max 50 chars)
bodypixKeystringnoPIX key in any format (max 255 chars)

Response:

StatusDescriptionBody
200Institution updated{ id, name, slug, instagram, whatsapp, pixKey }
400Validation error{ message: string }
404Institution not found{ message: string }

Business rules:

  • At least one field must be provided in the request body.
  • whatsapp must contain only digits.
  • The request always targets the single institution record (no ID in the path).