October 2026 release is live Read More
Breadcrumbs

Org Directory Support

Org Directory: CSV Format Guide

Prepare a CSV file that maps your people to your organization. Mavvrik uses it to break down AI usage and spend by department, team, role and any other grouping you use.

What this file does

AI tools such as Claude, ChatGPT, GitHub Copilot and Cursor report usage and cost per user. Your org directory file adds your organizational context to each user. Once the file is loaded, you can filter and group AI spend and activity in Mavvrik by department, team, role and any custom attribute you include.

File format

  • CSV (comma-separated), UTF-8 encoded.

    • Excel (Windows/Mac): File → Save As → CSV UTF-8 (Comma delimited).

    • Google Sheets: File → Download → Comma-separated values (.csv).

  • The first row must be the header row.

  • One row per person. Each email must appear only once.

  • Leave a cell empty when you don't have a value. Don't use placeholders like N/A or -.

  • If a value contains a comma, wrap it in double quotes, for example "Brand, Content & Social". Excel and Google Sheets do this for you.

  • Columns can be in any order.

  • Include all six standard column headers (id, email, name, department, role, team), even if you leave some of them blank. A missing column makes the file invalid; blank cells are fine.

  • Include only the attributes you need for reporting. Don't include sensitive personal data such as salary or national ID numbers.

Tip: Excel removes leading zeros from numbers (00123 becomes 123). If your employee IDs start with zeros, format the id column as Text before you paste or type the values.

Standard columns

Column

Required?

Description

Example

email

Required

The email the person signs in to AI tools with. It links usage to the person, so it must match the email in those tools. Use lowercase.

jane.doe@example.com

id

Required

A unique, stable ID for the person, ideally your HR employee ID. Usage history is matched on email, so if a person’s email changes they appear as a new person, even if the id stays the same.

E1001

name

Value optional

Full name, shown in place of the email where available.

Jane Doe

department

Value recommended

Department or business unit. This is the main grouping for spend reports.

Engineering

team

Value recommended

Team or sub-group within the department.

Platform

role

Value optional

Job title or role.

Senior Software Engineer

Additional columns (your own attributes)

You can add any other columns you want to report on, such as cost_center, location, manager_email, business_unit or legal_entity. Add each one as an extra column with a header name. Each becomes a filter and grouping option in Mavvrik, labeled with the header you chose.

  • Use short names made of letters, digits and underscores, such as cost_center. Other characters are replaced with _ (Cost Center becomes Cost_Center), and that is the label shown in Mavvrik. Keep every header unique; a repeated header gets a _2 suffix.

  • All values are treated as text.

  • Empty cells are fine.

Sample file

Download the sample file below and use it as your starting template. Open it in Excel or Google Sheets, replace the example rows with your people, and save it as CSV UTF-8. In the sample, cost_center, location and manager_email are custom columns. A blank cell means the value isn't available.

org_directory_sample.csv

Sending updates

  • Send the complete, current list every time, not just the changes. We keep each file you send. A second file sent on the same day replaces that day’s data, and a file identical to the last one loaded is skipped.

  • Send an updated file whenever your org changes, for example after a reorg, team moves, new hires or departures. A monthly refresh is enough for most teams. To track changes within a month, send a file every week.

  • Send the file to your Mavvrik Customer Success contact.

  • Your first file is applied to the past 12 months of AI usage, so make sure it is accurate.

Available now: you can upload your org directory file with the API and automate updates as often as daily. Follow the steps below.

Upload the file through the API

You can send your org directory file to Mavvrik directly from your own systems, with no email needed. This lets you automate uploads and send updates as often as daily.

Before you start

  • Your tenant ID (the part of your API address after the base URL).

  • An API key for your tenant.

  • Your org directory file prepared as described in File format above.

Step 1: Get your API key

  1. Sign in to Mavvrik as an admin.

  2. Go to Menu-> Admin and create a new API key.

  3. Copy the key and store it securely. It is shown only once. Never share it by email or commit it to source control.

Step 2: Set your variables

export MAVVRIK_API_KEY="<your-api-key>"
export MAVVRIK_URL="https://api.mavvrik.ai/<your-tenant-id>"

Your API key is sent in the x-api-key header on every Mavvrik API call. The base URL is https://api.mavvrik.ai in production and https://api.mavvrik.io for EU tenants.

Step 3: Check your file

Make sure the file is CSV UTF-8, has a header row with all six standard columns (id, email, name, department, role, team), has a value in id and email on every row, and has one row per person. See File format above.

Step 4: Upload the file

Create a connection once (4a). For each upload, request a signed upload URL (4b), then upload the file to that URL (4c).

4a. Create a connection (one time)
Bash
curl -X POST "$MAVVRIK_URL/files/connections" \
  -H "x-api-key: $MAVVRIK_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "<label>", "source": "org-directory"}'

Do this once and save the returned id as your connection_id. Reuse it for every upload. Each connection has its own file status list.

4b. Request a signed upload URL (each upload)
Bash
curl -X POST "$MAVVRIK_URL/files/upload" \
  -H "x-api-key: $MAVVRIK_API_KEY" -H "Content-Type: application/json" \
  -d '{"connection_id": "<connection_id>", "files": [{"name": "org_directory-2026-10-07.csv", "size": 1398, "mimetype": "text/csv"}]}'

size is in bytes and mimetype must be text/csv. The file name must end in .csv, can’t contain / or .., and must be unique within the request.

4c. Upload to the signed URL (each upload)
Bash
curl -X PUT "<signed-url>" -H "Content-Type: text/csv" --data-binary @org_directory.csv

Don’t send your API key to the signed URL. The URL expires after 60 minutes, and the Content-Type must match the mimetype requested.

Step 5: Check the responses

4a: HTTP 200 with id, name, source, provider_code (null), account_id (null), created_by, created, updated.

4b: HTTP 200 with an array of {id, name, url}. The id has the form <connection_id>/<file name>.

4c: HTTP 200 with an empty body. The file is stored. It is not validated or loaded yet (see Step 6).

Keep the connection id (from 4a) and file name to check the status.

Step 6: Check the upload status

Bash
curl "$MAVVRIK_URL/files?connection_id=<connection_id>" \
  -H "x-api-key: $MAVVRIK_API_KEY"

Nothing is validated when you upload. A nightly job at 03:00 US Central checks and loads all uploaded files, so right after uploading the status is uploaded until the next morning. It then becomes valid or invalid, and finally ingested, when the new attributes appear as Filter and Group by options in Mavvrik.

If the status is invalid, the response lists the errors, such as a missing column, duplicate emails, a missing id or email, an empty file or a broken CSV. Fix the file and upload it again.

A file identical to the last one loaded shows ingested with details.skipped. It is not loaded again.

Step 7: Automate your updates

Run the upload on a schedule from your HR system or a job scheduler. Always send the complete, current list, not just the changes. Your script only needs steps 4b and 4c; the connection from 4a is created once. For example, a daily upload at 02:00 with cron:

0 2 * * * /path/to/upload_org_directory.sh

Limits and rules

  • Signed upload URLs expire after 60 minutes. Request a new one if it expires.

  • Each file is kept. A second file sent on the same day replaces that day’s data.

  • The same file format rules apply as for emailed files.

  • The API does not enforce a file size limit or a rate limit.

Troubleshooting

Response

What it means and what to do

401 Unauthorized (any call)

The x-api-key header is missing, wrong or expired. Create a new key and try again.

404 Not Found (4b)

The connection_id is unknown. Use the id returned in step 4a.

406 Not Acceptable (4a)

The source is not recognized. Use org-directory.

406 Not Acceptable (4b)

The file name does not end in .csv, contains / or .., or the same name appears twice in one request.

422 Unprocessable (4a, 4b)

The request is malformed: name, source or connection_id is missing, size is not a whole number, or there are more than 500 files.

422 Unprocessable (step 6)

The connection_id query parameter is missing.

If the upload to the signed URL (step 4c) fails with a 403 and an XML error, the URL has probably expired or the Content-Type did not match. Request a new URL (step 4b) and try again.

The upload calls never read your file, so problems with its content do not return an error here. A missing column, duplicate emails, a missing id or email, an empty file or a broken CSV show up later in step 6 as status invalid, with the errors.

Still stuck? Contact your Mavvrik Customer Success contact and include the connection ID and file name.