Import persons from a CSV file

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-docs.kitsu.cloud/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Kitsu API MCP server": {
    "url": "https://api-docs.kitsu.cloud/mcp"
  }
}

Close
POST /import/csv/persons

Create persons from a CSV file. A line gives the name, email, phone, role, departments, studio, country, contract type, position, seniority, daily salary and active status. Send the CSV file in a multipart form. The route finds the separator of the file. Each line is imported in order. If a line is not valid, the import stops. Without update=true, the lines of the entities that exist are skipped. You must be an administrator.

Query parameters

  • update boolean

    Update the entities that exist

    Default value is false.

multipart/form-data

Body Required

  • file string(binary) Required

    CSV file with person data

Responses

  • 201 application/json

    The imported lines

    Hide response attributes Show response attributes object
    • id string(uuid)
    • first_name string
    • last_name string
    • email string(email)
    • phone string
    • role string
    • departments array[string(uuid)]
    • studio_id string(uuid)
    • country string

      ISO 3166-1 alpha-2 country code (nullable)

    • contract_type string
    • position string
    • seniority string
    • daily_salary integer
    • active boolean
  • 400 application/json

    A line of the file is not valid. The lines before this line are imported.

    Hide response attributes Show response attributes object
    • error boolean
    • message string
    • line_number integer

      Number of the line that is not valid

    • imported_rows integer

      Number of lines that are imported

  • 403

    You are not an administrator

POST /import/csv/persons
curl -X POST "http://api.example.com/import/csv/persons?update=false" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
import requests

url = "http://api.example.com/import/csv/persons"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
params = {
    "update": false
}
payload = None

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

response.raise_for_status()

if response.content:
    print(response.json())
Response examples (201)
[
  {
    "id": "a24a6ea4-ce75-4665-a070-57453082c250",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "phone": 1234567890,
    "role": "user",
    "departments": [
      "string"
    ],
    "studio_id": "string",
    "country": "FR",
    "contract_type": "open-ended",
    "position": "lead",
    "seniority": "senior",
    "daily_salary": 320,
    "active": true
  }
]
Response examples (400)
{
  "error": true,
  "message": "string",
  "line_number": 42,
  "imported_rows": 42
}