Skip to main content
Creates a new student record in the school.

Request Body

document_type
string
required
Type of identification document. Valid values: TI (Tarjeta de Identidad), RC (Registro Civil), CC (Cédula de Ciudadanía), CE (Cédula de Extranjería), NUIP (Número Único de Identificación Personal), PASSPORT
document_number
string
required
Identification document number. Spaces and dots are automatically removed
full_name
string
required
Student’s full name
user_id
uuid
Link to an existing user account (if the student has a user account)
birth_date
date
Date of birth in YYYY-MM-DD format
gender
string
Student’s gender
extra_data
object
Additional custom data for the student. Must be a JSON object
piar_data
object
PIAR (Individual Plan for Reasonable Adjustments) data for students with special educational needs. Must be a JSON object
guardians
array
Array of guardian objects to associate with this student

Response

Returns the created student object with associated guardians.
id
uuid
Unique identifier for the created student
school_id
uuid
School identifier
is_active
boolean
Will always be true for newly created students
See the List Students endpoint for the complete response schema.

Validation Rules

  • The combination of document_type and document_number must be unique within the school
  • document_type must be one of the allowed values
  • document_number cannot be empty after normalization (removing spaces and dots)
  • If guardians are provided with the same document_type and document_number as an existing guardian, the existing guardian record will be updated and linked to the student

Permissions Required

One of the following permissions:
  • write:enrollment
  • write:all
curl -X POST "https://api.athena-erp.com/students" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "document_type": "TI",
    "document_number": "1234567890",
    "full_name": "Juan Pérez García",
    "birth_date": "2010-05-15",
    "gender": "M",
    "guardians": [
      {
        "document_type": "CC",
        "document_number": "98765432",
        "full_name": "María García",
        "relationship": "Mother",
        "phone": "+57 300 1234567",
        "email": "[email protected]",
        "is_primary": true,
        "priority": 1,
        "can_pickup": true,
        "is_emergency_contact": true
      }
    ]
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "school_id": "123e4567-e89b-12d3-a456-426614174000",
  "user_id": null,
  "document_type": "TI",
  "document_number": "1234567890",
  "full_name": "Juan Pérez García",
  "birth_date": "2010-05-15",
  "gender": "M",
  "is_active": true,
  "extra_data": {},
  "piar_data": {},
  "guardians": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "document_type": "CC",
      "document_number": "98765432",
      "full_name": "María García",
      "phone": "+57 300 1234567",
      "email": "[email protected]",
      "address": null,
      "occupation": null,
      "workplace": null,
      "is_active": true,
      "relationship": "Mother",
      "is_primary": true,
      "priority": 1,
      "can_pickup": true,
      "is_emergency_contact": true,
      "link_id": "770e8400-e29b-41d4-a716-446655440002",
      "created_at": "2024-03-10T10:30:00Z"
    }
  ],
  "created_at": "2024-03-10T10:30:00Z",
  "updated_at": "2024-03-10T10:30:00Z"
}

Build docs developers (and LLMs) love